By definition you are doing if not equal go to 3.
Gotoif($[condition]?[true]:false).  Look at your CLI output and you will see
the evaluation of the condition as 1 or 0.

 

From: [email protected]
[mailto:[email protected]] On Behalf Of David
Klaverstyn
Sent: Wednesday, September 05, 2012 4:31 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
([email protected])
Subject: [asterisk-users] Help with GotoIf Command

 

Hi All,

 

For some reason I can't get this GotoIf statement to work.  Even if the name
and number are the same it jumps to line 3.  I've tried with and without the
quotes around each variable.

 

exten => s,1,GotoIf($["${CALLERID(name)}" = "${CALLERID(num)}"]?:3)

exten => s,2,NoOp(they are the Same)

exten => s,3,NoOp(they are different)

 

The wisdom of this group is much appreciated.

 

This is an example only.  I know the code will display both NoOp lines if
the name and number is the same.

 


Regards
David Klaverstyn


 

 

 


 

 

 


 

 

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to