Forrest logo
back to the asterisk tool

asterisk:tldr:074bd

asterisk: Show chan_SIP clients (phones).
$ asterisk -r -x "sip show peers"
try on your machine

The command "asterisk -r -x "sip show peers"" is used to access the Asterisk Command Line Interface (CLI) and execute a specific command within the CLI. Let's break down the command and its components:

  1. "asterisk": This is the command used to launch the Asterisk software. It is followed by some options and parameters.

  2. "-r": This option tells Asterisk to run in interactive mode and start the CLI. The CLI provides a command-line interface for interacting with Asterisk.

  3. "-x": This option is used to execute a command within the CLI automatically, bypassing the need to enter commands manually after starting the CLI.

  4. "sip show peers": This is the command that will be executed within the CLI. It is used to display information about the SIP peers or endpoints connected to the Asterisk server.

So, when you run the command "asterisk -r -x "sip show peers"", it will launch Asterisk in interactive mode, start the CLI, and automatically execute the command "sip show peers", which will display information about the SIP peers connected to the Asterisk server.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the asterisk tool