[asterisk-users] How to match wild card inside a GoToIf?

Eric "ManxPower" Wieling eric at fnords.org
Tue Mar 13 12:59:42 MST 2007


[default]
exten => _220408XXX,1,Hangup
exten => _2XXXXXXXX,1,Macro(outcall,${EXTEN})


Ken Williams wrote:
> I don't believe this will work.  He wants it to goto if EXTEN =
> 220408235 or 220408743 or any other digits for the last 3 of the
> extension block 220408xxx.  When Asterisk processes both his and your
> line it's going to look to see if the EXTEN is exactly 220408XXX, which
> of course it will never be.
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Connolly,
> Tim
> Sent: Tuesday, March 13, 2007 12:54 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [asterisk-users] How to match wild card inside a GoToIf?
> 
> Try  
> 
> exten => s,1,GotoIf($["${MACRO_EXTEN}" = "220408XXX"]?2:3) exten =>
> s,2,Hangup
> 
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ricardo
> Carvalho
> Sent: Tuesday, March 13, 2007 1:39 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] How to match wild card inside a GoToIf?
> 
> How can I match wildcards inside a GoToIf?
> 
> I have something like this, but it doesn't work:
> 
> [default]
> exten => _2XXXXXXXX,1,Macro(outcall,${EXTEN})
> [macro-outcall]
> exten => s,1,GotoIf($["${ARG1}" = "220408XXX"]?2:3) exten => s,2,Hangup
> 
> Any ideas?
> 
> Regards,
> Ricardo.
> 
> 
> _______________________________________________
> --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
> _______________________________________________
> --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
> _______________________________________________
> --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
> 



More information about the asterisk-users mailing list