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

Mikael Magnusson mikaelmagnusson at glocalnet.net
Thu Apr 14 10:34:14 MST 2005


On Thu, Apr 14, 2005 at 11:46:58AM -0600, Rich Adamson wrote:
> > > 
> > > ; This section is the Last and handles 'no valid extension'
> > > [no-match]
> > > exten => _.,1,Answer
> > > exten => _.,2,Playback(invalid,skip)
> > > exten => _.,3,Hangup
> > 
> > This is the "funky".  You call Hangup and so exten => h is called, 
> > which is matched by _.  Yet another evilness of _.
> 
> So, if in the above section I remove priority 3, how would one
> forcibly hang up the extension that called an undefined extension?
> 
> I've not found a reasonable way to do that. 
> 

You could try something like:

exten => _.,1,GotoIF($[${EXTEN} != h]?10)
exten => _.,10,Playback(invalid,skip)
exten => _.,11,Hangup

/Mikael Magnusson




More information about the asterisk-dev mailing list