Discrepancy Between Asterisk Console And Asterisk Manager DeviceStateChange

Home » Asterisk Users » Discrepancy Between Asterisk Console And Asterisk Manager DeviceStateChange
Asterisk Users 3 Comments

Hello

I notice a major difference in what Asterisk console is telling me
(which seems correct) and what Asterisk Manager is telling.

A SIP user is called, and the phone does not ring. This is the situation.

On Asterisk console I see (which seems to be in line with an unreachable phone) :

[Feb 11 11:31:31] VERBOSE[15653][C-00000319] app_dial.c: Called SIP/mysipuser6
[Feb 11 11:31:37] VERBOSE[15653][C-00000319] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[Feb 11 11:31:37] VERBOSE[15653][C-00000319] pbx.c: Executing
[202@from-PBX:253] NoOp(“SIP/mysipuser12-0000157d”,
“DIALSTATUS=CHANUNAVAIL”) in new stack

However on Asterisk Manager interface I see the event :

11:31:31
Array
(
    [0] => Event: DeviceStateChange
    [1] => Privilege: call,all
    [2] => SystemName: voipserver1
    [3] => Device: SIP/mysipuser6
    [4] => State: RINGING
)

I can reproduce this easily every time :

[Feb 11 11:31:46] VERBOSE[15719][C-0000031a] app_dial.c: Called SIP/mysipuser6
[Feb 11 11:31:53] VERBOSE[15719][C-0000031a] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
[Feb 11 11:31:53] VERBOSE[15719][C-0000031a] pbx.c: Executing
[202@from-PBX:253] NoOp(“SIP/mysipuser12-0000157f”,
“DIALSTATUS=CHANUNAVAIL”) in new stack

11:31:46
Array
(
    [0] => Event: DeviceStateChange
    [1] => Privilege: call,all
    [2] => SystemName: voipserver1
    [3] => Device: SIP/mysipuser6
    [4] => State: RINGING
)

Why is Asterisk Manager reporting a RINGING state if there is no SIP 180
RINGING received ?! When issuing a SIP DEBUG, I see a SIP INVITE but no response (so no SIP 180 or 183).

Kind regards.

3 thoughts on - Discrepancy Between Asterisk Console And Asterisk Manager DeviceStateChange

  • The answer seems to be, because that’s the way chan_sip was written. As soon as an outgoing call is attempted it sets some internal state to ringing, which is then used when it reports device state information. DeviceStateChange is just reporting what chan_sip told it.

  • So if “DeviceStateChange” is not reporting the real state of a SIP
    user/device (like 180-ringing), which event does ?!

    Kind regards.