DIALSTATUS Not Being Set

Home » Asterisk Users » DIALSTATUS Not Being Set
Asterisk Users 1 Comment

Hi,

I’m having a strange problem with Asterisk 13 i can’t seem to find out whats causing it. After a Dial call from one SIP peer to another, if the calling side hangs up, DIALSTATUS is not set, but when the called side hangs up, it does. The strangest thing is when debugging SIP, it sends/receives the BYE signal normaly on both situations. I’m using DIALSTATUS on my accounting/billing scripts, so when this happens it break the routine.

Can anyone shed some light into this for me? i’m running out of ideas here.

Thanks.

Marcos O.

One thought on - DIALSTATUS Not Being Set

  • Works for me. Given the following dialplan, which has a hardcoded Dial to PJSIP endpoint ‘alice’:

    exten => _XXXX,1,NoOp()
    same => n,Dial(PJSIP/alice,15)
    same => n,Hangup()

    exten => h,1,NoOp()
    same => n,Log(NOTICE, ${DIALSTATUS})

    Calling party (bob) hangs up first:

    — Executing [1000@default:1] NoOp(“PJSIP/bob-00000001”, “”) in new stack
    — Executing [1000@default:2] Dial(“PJSIP/bob-00000001”,
    “PJSIP/alice,15”) in new stack
    — Called PJSIP/alice
    — PJSIP/alice-00000002 is ringing
    — PJSIP/alice-00000002 answered PJSIP/bob-00000001
    — Channel PJSIP/alice-00000002 joined ‘simple_bridge’ basic-bridge
    <593321e8-d105-4075-94f3-20480cae3c45>
    — Channel PJSIP/bob-00000001 joined ‘simple_bridge’ basic-bridge
    <593321e8-d105-4075-94f3-20480cae3c45>
    — Channel PJSIP/bob-00000001 left ‘native_rtp’ basic-bridge
    <593321e8-d105-4075-94f3-20480cae3c45>
    == Spawn extension (default, 1000, 2) exited non-zero on
    ‘PJSIP/bob-00000001’
    — Channel PJSIP/alice-00000002 left ‘native_rtp’ basic-bridge
    <593321e8-d105-4075-94f3-20480cae3c45>
    — Executing [h@default:1] NoOp(“PJSIP/bob-00000001”, “”) in new stack
    — Executing [h@default:2] Log(“PJSIP/bob-00000001”, “NOTICE, ANSWER”)
    in new stack
    [Dec 22 16:32:47] NOTICE[9668][C-00000001]: Ext. h:2 @ default: ANSWER

    Called party (alice) hangs up first:

    *CLI> — Executing [1000@default:1] NoOp(“PJSIP/bob-00000000”, “”) in new stack
    — Executing [1000@default:2] Dial(“PJSIP/bob-00000000”,
    “PJSIP/alice,15”) in new stack
    — Called PJSIP/alice
    — PJSIP/alice-00000001 is ringing
    — PJSIP/alice-00000001 answered PJSIP/bob-00000000
    — Channel PJSIP/alice-00000001 joined ‘simple_bridge’ basic-bridge
    <0be9ceeb-014b-477c-b993-a4600ad7f9b0>
    — Channel PJSIP/bob-00000000 joined ‘simple_bridge’ basic-bridge
    <0be9ceeb-014b-477c-b993-a4600ad7f9b0>
    — Channel PJSIP/alice-00000001 left ‘native_rtp’ basic-bridge
    <0be9ceeb-014b-477c-b993-a4600ad7f9b0>
    — Channel PJSIP/bob-00000000 left ‘native_rtp’ basic-bridge
    <0be9ceeb-014b-477c-b993-a4600ad7f9b0>
    == Spawn extension (default, 1000, 2) exited non-zero on
    ‘PJSIP/bob-00000000’
    — Executing [h@default:1] NoOp(“PJSIP/bob-00000000”, “”) in new stack
    — Executing [h@default:2] Log(“PJSIP/bob-00000000”, “NOTICE, ANSWER”)
    in new stack
    [Dec 22 16:34:17] NOTICE[9740][C-00000000]: Ext. h:2 @ default: ANSWER