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

Ken Williams ken at intermountainelectronics.com
Tue Mar 13 12:02:22 MST 2007


Try

exten => s,1,GotoIf($["${ARG1:0:5}"="220408"]?2:3)

This looks at the first 5 digits of ARG1. 

-----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 12: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


More information about the asterisk-users mailing list