[Asterisk-Users] 'Hangup' not hanging-up, is this intended behaviour?

JP Hindin jplist at kiwigeek.com
Wed Sep 8 12:42:16 MST 2004


Greetings folks;

I have a bit of a conundrum, and I can't tell if Asterisk is doing
something daft, or whether I'm clean missing out why it's doing what it's
doing. So, I have a dialplan that looks a little like this:

--------------------
[start]
include => dids
include => everythingelse

[dids]
; Test
exten => 8378,1,SetCallerID(3015551212)
exten => 8378,2,Hangup

[everythingelse]
exten => _.,1,AGI,MyScript|${EXTEN} ${ACCOUNTCODE}
--------------------

The 'Hangup' on 8378 doesn't hang up. Instead it falls through to
'everythingelse' context, and the AGI is executed in the hangup priority.

    -- Executing SetCallerID("SIP/3015551212-5acc", "3015551212") in new stack
    -- Executing Hangup("SIP/3015551212-5acc", "") in new stack
  == Spawn extension (start, 8378, 2) exited non-zero on 'SIP/3015551212-5acc'
    -- Executing AGI("SIP/3015551212-5acc", "MyScript|h 3015551212") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/MyScript
    -- AGI Script MyScript completed, returning 0

If I dial something else (MyScript processes outbound toll/intl calls),
the same as the above happens - the script is again run immediately after
it ends, in the hangup priority. The script is exiting with 0 as a return
code on completion.

When I ask it to Hangup, I expect it to Hangup. I'm guessing that the
_. catch-all is also catching priorities as well as all extensions, which
may or may not be a "feature" of Asterisk. How do I stop this from
happening?


Thanks all for your help;
JP




More information about the asterisk-users mailing list