I want to ask a question about a behaviour that I am seeing on multiple versions of Asterisk 1.8. The bug has to do with SIP channels not being hung properly in Asterisk. These are the symptoms:
The “core show channels” shows the correct ammount of concurrent calls and active channels on the system:
Channel Location State Application(Data)
0 active channels
0 active call
33158 calls processed
But the “sip show channelstats” returns a totally different output:
EXTRALUX-IP-PBX*CLI> sip show channelstats
Peer Call ID Duration Recv: Pack Lost ( %) Jitter Send: Pack Lost ( %) Jitter
172.16.8.155 88c454870bf 0000004564 0000000000 ( 0.00%) 0.0000 0000004577 0000000000 ( 0.00%) 0.0000
192.168.2.30 4b075265579 0000011854 0000000000 ( 0.00%) 0.0000 0000011846 0000000000 ( 0.00%) 0.0001
172.16.8.145 52f58e9a56f 0000001707 0000000000 ( 0.00%) 0.0000 0000001729 0000000000 ( 0.00%) 0.0000
10.10.10.10 0c2da8a6079 0000003638 0000000000 ( 0.00%) 0.0000 0000003616 0000000000 ( 0.00%) 0.0001
172.16.8.164 7bbda4cce6a 0000011846 0000000000 ( 0.00%) 0.0000 0000011854 0000000000 ( 0.00%) 0.0000
172.16.8.112 4543acfe0a3 0000000581 0000000000 ( 0.00%) 0.0000 0000000594 0000000000 ( 0.00%) 0.0001
10.10.10.10 31792474079 0000001729 0000000000 ( 0.00%) 0.0000 0000001707 0000000000 ( 0.00%) 0.0000
172.16.8.11 3837e7e8335 0000004577 0000000000 ( 0.00%) 0.0000 0000004564 0000000000 ( 0.00%) 0.0000
172.16.8.162 d5b6a4934b7 0000000594 0000000000 ( 0.00%) 0.0000 0000000581 0000000000 ( 0.00%) 0.0001
10.10.10.10 0f75d0d6079 0000008660 0000000000 ( 0.00%) 0.0000 0000008637 0000000000 ( 0.00%) 0.0000
172.16.8.163 22d65b7c6f2 0000008637 0000000000 ( 0.00%) 0.0000 0000008659 0000000000 ( 0.00%) 0.0000
172.16.8.162 363bc836336 0000003616 0000000000 ( 0.00%) 0.0000 0000003638 0000000000 ( 0.00%) 0.0001
12 active SIP channels
Interesting thing is that the number of SIP channels shown by the commands does not math. One more way to identify these “hung channels” is also, that there is no value for Duration in the “sip show channelstats” output. For the calls, that actually are active, the Duration parameter is visible and increasing by time.
A command “sip show channels” is also showing a strange output:
172.16.8.155 670 88c454870bf7e6d 0x0 (nothing) No Rx: BYE 670
192.168.2.30 790 4b075265579e86f 0x0 (nothing) No Rx: BYE 790
10.10.10.10 0031111111 a1388d0c07ab11e 0x8 (alaw) No Rx: ACK RM_T2_Trun
172.16.8.145 681 52f58e9a56f494e 0x0 (nothing) No Rx: BYE 681
10.10.10.10 004222222 0c2da8a6079b11e 0x0 (nothing) No Rx: BYE RM_T2_Trun
172.16.8.164 671 7bbda4cce6a9dd9 0x0 (nothing) No Rx: BYE 671
172.16.8.112 678 4543acfe0a3332c 0x0 (nothing) No Rx: BYE 678
10.10.10.10 005333333 31792474079a11e 0x0 (nothing) No Rx: BYE RM_T2_Trun
172.16.8.11 06444444 3837e7e833554a7 0x0 (nothing) No Rx: BYE GSM_Trunk_
172.16.8.145 (None) 6c33cd8d03dd5dc 0x0 (nothing) No Rx: REGISTER <guest>
172.16.8.162 668 d5b6a4934b772ee 0x0 (nothing) No Rx: BYE 668
172.16.8.151 (None) 82ba2d4384daca3 0x0 (nothing) No Rx: REGISTER <guest>
10.10.10.10 0075555555 0f75d0d6079811e 0x0 (nothing) No Rx: BYE RM_T2_Trun
192.168.1.10 (None) 84ccd25614f811b 0x0 (nothing) No Rx: REGISTER <guest>
172.16.8.161 (None) f909811561ddffd 0x0 (nothing) No Rx: REGISTER <guest>
172.16.8.112 678 2b21d7c073f1b45 0x8 (alaw) No Tx: ACK 678
172.16.8.163 669 22d65b7c6f28804 0x0 (nothing) No Rx: BYE 669
172.16.8.162 668 363bc836336a37d 0x0 (nothing) No Rx: BYE 668
18 active SIP dialogs
Does anyone know how to explain these strange outputs?
I think that the issue must be quite common, since I am seeing this on majority of my production systems (small PBX-es, up to 30 users). The problem is harmless and can be cured by a simple asterisk restart, but it is sill bothering me.