This article is a partial translation of the page. 55–56 Asterisk ™: The Definitive Guide, Third Edition
Command shell Asterisk
Asterisk can be run as a daemon or as an application. Run asterisk application, when you collect, test, or look for problems, and as a daemon running on production servers.
The team for the start of the Asterisk the same regardless of whether you run it as a daemon or as an application.
asterisk
However, used without argument, this command to start the application in the background. In other words, without argument, this command is virtually useless. The following options are the most desired:
(h) use this option to get help on the Options command, asterisk, for a comprehensive reference, you can use the asterisk man
Asterisk-h
-c this option launches Asterisk application (foreground). This will mean that the Asterisk will snap to your session. In other words, if you close your terminal or the connection is lost Asterisk finished executing. Use this option only for testing, troubleshooting and Assembly, but it is not necessary to run Asterisk from this option the working servers. If you’re running Asterisk with option-s for shutdown command can be used:
Asterisk-c
core stop
–v,–vv,–vvv, vvvv, etc.–one of the most used options. This option can be used with other, more commonly with-r or–s (for example, vvvvvr), in order to increase the level of output in the output console. The same does command:
Asterisk–rvvvv
core set verbose n
where n is a number from 1 to 5 (of 5 more also work, but do not give more detailed information than the level 5, which is the highest). Sometimes you don’t need to see any output on the screen, sometimes only need level errors, alerts or warnings. Setting off from your other messages
-r is used, if you want to connect to the Asterisk when he started as a daemon process. This command only works if the Asterisk service already up and running. To exit the command prompt, use the Asterisk:
Asterisk–rvvv
exit
–T this option will add a timestamp to the conclusion of the Asterisk command-line interface.
–x this command in the command shell will help bring your team intrepretatora, so if you have the shell of the Asterisk:
Asterisk-rx “show interest“
view the queue without logging in Asterisk-CLI
view the queue without logging in Asterisk-CLI
-g option tells the Asterisk core dump file if it will fall.
Asterisk CLI commands:
Asterisk-rx “sip show users»
Asterisk-rx “sip show peers»
Peer user or friend type is defined in the sip conf. The friend type = peer + user. And here is the difference between a peer and user is Asterisk will interpret incoming SIP requests:
peer is an incoming request sootvetvie configuration entry using the IP address and port number
user — checks incoming requests configuration entry using the username field in the header of the SIP request From. The name must be consistent with section fajlike in the sip username with the name in square brackets
–reread the configuration file/etc/asterisk/logger.conf
Asterisk-rx “reload logger»
— to view the output for a specific peer.
Asterisk-rx “sip set debug peer 3128“
–turn off the debug Asterisk
Asterisk-rx “sip set debug off
–view the status of registrations of SIP channels
Asterisk-rx “sip show registry”
— view the status registration channels Asterisk IAX2
Asterisk-rx “iax2 show registry”
— see the queue of Asterisk
Asterisk-rx “show interest“
— see sostoâtnii channels
Asterisk-rx “core show channels»
— find out what codecs are supported by Asterisk
Asterisk-rx “show translation»
to see which modules are loaded with Asterisk:
show module