[asterisk-users] Discrepancy between Asterisk console and Asterisk Manager DeviceStateChange

Joshua C. Colp jcolp at sangoma.com
Fri Feb 11 07:37:18 CST 2022


On Fri, Feb 11, 2022 at 9:31 AM Jonas Kellens <jonas.kellens at telenet.be>
wrote:

> 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 at 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 at 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).
>

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.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20220211/d63a0582/attachment.html>


More information about the asterisk-users mailing list