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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Apr 15 09:47:14 MST 2005


On Friday 15 April 2005 11:09, Brian West wrote:
> On Apr 15, 2005, at 6:37 AM, Andrew Kohlsmith wrote:
> > On April 14, 2005 03:07 pm, Brian West wrote:
> >>> I disagree; This bounty's created some VERY GOOD discussion, and
> >>> I would love
> >>> to see some real-life useful examples of using _. to capture
> >>> special extensions.
> >>
> >> [contexta]
> >> include => catchall
> >>
> >> exten => _NXXNXX,1,Dial(blah)
> >>
> >> exten => h,1,Hangup
> >>
> >> [catchall]
> >> exten => _.,1,Playback(yousuck)
> >
> > exten => i,1,Playback(yousuck)
> >
> > Hardly "NEXT!!!", as the 'i' extension is *designed* for this.
>
> i, doesn't let you catch the true ${EXTEN} that they tried to dial
> now does it.  ${EXTEN} would = i which is NOT WHAT YOU WANT.

This is why the i extension defines a special variable ${INVALID_EXTEN},
which _is_ what you want.

> NEXT!!!

-- 
Tilghman



More information about the asterisk-dev mailing list