kleis-asterisk-dev@tiscali.it
2006-Jan-14  02:03 UTC
[Asterisk-Users] "Catch all" extension
Hi all,
What do you think about having a single extension in the dialplan that matches
everything and then delegates the next action to an external application
through AGI? I mean something like this:
exten => _.,1,AGI,catchall.agi,${EXTEN}
Then, catchall.agi could EXEC dialplan macros in function of choices (e.g.
SQL queries to perform LCR, ...)
I think it could be powerful... but what could I miss here?
Cheers,
Alex
_________________________________________________________________
TISCALI ADSL Web&Mail
Solo con Tiscali Adsl navighi e telefoni senza canone Telecom a partire da
14,95 Euro/mese. Attivala subito!
Per te 500 MB inclusi per navigare, inviare e ricevere messaggi e-mail, foto
ed mp3.
http://abbonati.tiscali.it/adsl/sa/2wam_tc/
exten => _X.,1,AGI,catchall.agi,${EXTEN}
should do it for u
> Hi all,
> 
> What do you think about having a single extension in the dialplan that
> matches everything and then delegates the next action to an external
> application through AGI? I mean something like this:
> 
> exten => _.,1,AGI,catchall.agi,${EXTEN}
> 
> Then, catchall.agi could EXEC dialplan macros in function of choices
> (e.g. SQL queries to perform LCR, ...)
> 
> I think it could be powerful... but what could I miss here?
> 
> Cheers,
> 
> Alex
> 
> _________________________________________________________________
> TISCALI ADSL Web&Mail Solo con Tiscali Adsl navighi e telefoni senza
> canone Telecom a partire da 14,95 Euro/mese. Attivala subito! Per te
> 500 MB inclusi per navigare, inviare e ricevere messaggi e-mail, foto
> ed mp3. http://abbonati.tiscali.it/adsl/sa/2wam_tc/
> 
> 
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
Super Technologies Inc., Pensacola, Florida
http://www.SuperTec.com - Technologies from tomorrow, Today!
> exten => _X.,1,AGI,catchall.agi,${EXTEN} > > > should do it for uHi, since I also have some "applications" that starts with "*", like [app-clir] exten => _*67.,1,SetCallerPres(prohib) exten => _*67.,2,Goto(${EXTEN:3},1) I thought I could use "_." instead of "_X.", that would match only numbers. However, what do you think about this single extension replacing the *whole* dialplan? I mean that exten => 200,1,Dial(SIP/200) exten => 300,1,Dial(IAX/300) exten => _0.,1,Macro(dialout,${EXTEN}) and so on would be replaced by that single extension, and then the script will do the rest. Thanks, Alex
Alex wrote:>> exten => _X.,1,AGI,catchall.agi,${EXTEN} >> >> >> should do it for u > > > > Hi, > > since I also have some "applications" that starts with "*", like > > [app-clir] > exten => _*67.,1,SetCallerPres(prohib) > exten => _*67.,2,Goto(${EXTEN:3},1) > > I thought I could use "_." instead of "_X.", that would match only numbers. > However, what do you think about this single extension replacing the > *whole* dialplan? > I mean that > > exten => 200,1,Dial(SIP/200) > exten => 300,1,Dial(IAX/300) > exten => _0.,1,Macro(dialout,${EXTEN}) > > and so on would be replaced by that single extension, and then the > script will do the rest.It would also need to deal with s,h,i,t,a extensions also if you match by _. This also means that you have to be really carefull about calling hangup etc from inside the macro. -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
Alex wrote:>> exten => _X.,1,AGI,catchall.agi,${EXTEN} >> >> >> should do it for u > > > > Hi, > > since I also have some "applications" that starts with "*", like > > [app-clir] > exten => _*67.,1,SetCallerPres(prohib) > exten => _*67.,2,Goto(${EXTEN:3},1) > > I thought I could use "_." instead of "_X.", that would match only numbers. > However, what do you think about this single extension replacing the > *whole* dialplan? > I mean that > > exten => 200,1,Dial(SIP/200) > exten => 300,1,Dial(IAX/300) > exten => _0.,1,Macro(dialout,${EXTEN}) > > and so on would be replaced by that single extension, and then the > script will do the rest.You would be better off with two extensions rather than _. _X.,1 _a.,1 Which would also catch the asterisk. -- Cheers, Matt Riddell _______________________________________________ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)