Date created: Sunday, February 3, 2013 2:22:52 PM. Last modified: Thursday, December 19, 2013 3:22:37 PM

CLI examples

Debugging;

 core set verbose 10 (same as `asterisk -rvvvvvvvvvv)
 agi set debug on
 
 logger set level DTMF off (actually turns it on, and ON turns it off in certain Asterisk versions when executed over SSH, Asterisk bug!)

 sip set debug on

asterisk-box1*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status     
5558/5558                  (Unspecified)    D   N      5060     Unmonitored 
james/james                10.224.85.121    D   N      2048     Unmonitored 
pbx1/trunkpeer          1.2.3.4                 N      5060     OK (19 ms) 
3 sip peers [Monitored: 1 online, 0 offline Unmonitored: 2 online, 0 offline]

another-box*CLI> sip show registry
Host                           dnsmgr Username       Refresh State                Reg.Time                 
55.55.55.55:5060              N      67761000           105 Registered           Tue, 05 Feb 2013 12:26:01
1 SIP registrations.

another-bpx*CLI> core show channels
Channel              Location             State   Application(Data)             
0 active channels
0 active callsLI> 
21274 calls processed
another-bpx*CLI> sip show channels
Peer             User/ANR         Call ID          Format           Hold     Last Message    Expiry
1.1.1.1             (None)           1833334682@127.  0x0 (nothing)    No       Rx: OPTIONS               
1.1.1.1           (None)           1602592332@127.  0x0 (nothing)    No       Rx: OPTIONS               
1.1.1.1           (None)           433793409@127.0  0x0 (nothing)    No       Rx: OPTIONS               
2.2.2.2           (None)           6a4a37c5092a7f2  0x0 (nothing)    No       Init: OPTIONS             
4 active SIP dialogs


channel request hangup all

Unloading modules;

node1*CLI> module show like skinny
Module                         Description                              Use Count 
chan_skinny.so                 Skinny Client Control Protocol (Skinny)  0         
1 modules loaded
node1*CLI> module unload chan_skinny
Unloaded chan_skinny
  == Unregistered RTP glue 'Skinny'
  == Unregistered channel type 'Skinny'
  == Manager unregistered action SKINNYdevices
  == Manager unregistered action SKINNYshowdevice
  == Manager unregistered action SKINNYlines
  == Manager unregistered action SKINNYshowline
node1*CLI> module show like unis
Module                         Description                              Use Count 
chan_unistim.so                UNISTIM Protocol (USTM)                  0         
1 modules loaded
node1*CLI> module unload chan_unistim
Unloaded chan_unistim
  == Unregistered channel type 'USTM'
  == Unregistered RTP glue 'USTM'

Reloads;

extensions.conf
dialplan reload

features.conf
features reload

sip.conf
sip reload

musiconhold.conf
moh reload

Previous page: DAHDI Monitoring
Next page: Hold Music From Ogg Stream