Date created: 02/03/13 14:22:52. Last modified: 12/19/13 15:22:37

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)           [email protected]  0x0 (nothing)    No       Rx: OPTIONS               
1.1.1.1           (None)           [email protected]  0x0 (nothing)    No       Rx: OPTIONS               
1.1.1.1           (None)           [email protected]  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