[Asterisk-Dev] BOUNTY: app_hangup from exten => h

Rich Adamson radamson at routers.com
Thu Apr 14 10:18:25 MST 2005


> > This is a bounty for a patch to app_hangup.c to generate an error when
> > Hangup is called from exten => h.
> >
> > You should not call Hangup from exten => h.
> >
> > The bounty is US$10 and will be paid via Paypal.  The patch must be
> > accepted into CVS-HEAD before the bounty will be paid.
> >
> > --Eric
> >
> This is not a problem, and does not need to be rectified.  I have, 
> myself, called Hangup() from the h extension and it has not caused any 
> issues.  Generally I use SoftHangup(${CHANNEL}) in the 'h' extension to 
> make certain that the call/channel gets disconnected and no zombies are 
> left around.  If you're having issues with calling Hangup() from the h 
> extension, make sure you are not doing any sort of wildcard matching ( 
> ie, exten => _.,1,Blah ), as the h extension WILL be matched if it can 
> reach the wildcard extension from the context hangup is called from.

I'm going to jump in here and suggest there _is_ something rather
funcky going on with the "h" extension. I'm using:

[from-sip]
include => local-extns
include => local-calls
include => bus-dialing  ; 9 plus anything outbound
include => misc-extns
include => outgoing-calls
include => parkedcalls
include => zaptel700
include => livevoip-ld
include => special-3digit
include => no-match
exten => h,1,Hangup


; This section for 311, 411, 511, 911, etc.           
[special-3digit]                                      
exten => _X11,1,Dial(Zap/3/${EXTEN})                  
exten => _X11,2,Congestion

; This section is the Last and handles 'no valid extension'
[no-match]
exten => _.,1,Answer
exten => _.,2,Playback(invalid,skip)
exten => _.,3,Hangup

If I dial x3123 (which is undefined anywhere in the dialplan), the
"no-match" section does execute. However, without both the
exten=>_.,3,Hangup AND exten=>h,1,Hangup I'll get the invalid
message played back twice.

If I leave off the exten=>_.,3,Hangup, the sip phone remains
connected (no hangup).

If I leave off the exten=>h,1,Hangup, I get two invalid messages.

So, there is something weird about the "h" stuff.





More information about the asterisk-dev mailing list