[Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Keith O'Brien



I am having some 
trouble implementing OR login in the GotoIf statement. I have 
followed the examples in the Wiki and I still am getting a syntax 
error.

Essentially I want 
to screen for CallerIDs set for "Anonymous" OR "Unknown Caller". If 
either of these are true I want to send it to statement 3 which clears the 
CallerID and proceeds to Privacy Manager.

I have also tried 
removing and adding quotes to no avail. I am running the 6/7/2005 CVS 
Head.

exten =5000,1,NoOp,${CALLERIDNAME}exten 
=5000,2,GotoIf($[$["${CALLERIDNAME}" = 
"Anonymous"] | $["${CALLERIDNAME}" = "Unknown Caller"]]?3:5)exten 
=5000,3,SetCIDNum()exten 
=5000,4,SetCIDName()exten 
=5000,5,PrivacyManagerexten 
=5000,6,GotoIfTime(19:00-7:00|*|*|*?afterhours,s,1)exten 
=5000,7,agi,astcalleridexten 
=5000,8,DIAL(SIP/5001)exten 
=5000,9,Voicemail(u5001)exten 
=5000,110,Hangup

 -- Executing NoOp("IAX2/[EMAIL PROTECTED]:4569-2", 
"Anonymous") in new stackJun 29 10:34:09 WARNING[3946]: ast_expr.y:486 
ast_yyerror: ast_yyerror(): syntax error: syntax error; Input:(Anonymous = 
"Anonymous")|(Anonymous = "Unknown 
Caller")^^^ 
^ -- Executing GotoIf("IAX2/[EMAIL PROTECTED]:4569-2", 
"0?3:5") in new stack -- Goto 
(in-out,7326031000,5)


smime.p7s
Description: S/MIME cryptographic signature
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Giorgio Incantalupo

Hi! Have you tried
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = 
Anonymous]|$[${CALLERIDNAME} = Unknown Caller]]?3:5)

instead of
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = Anonymous] | 
$[${CALLERIDNAME} = Unknown Caller]]?3:5)

?

Giorgio

Keith O'Brien wrote:

I am having some trouble implementing OR login in the GotoIf 
statement.   I have followed the examples in the Wiki and I still am 
getting a syntax error.
 
Essentially I want to screen for CallerIDs set for Anonymous OR 
Unknown Caller.   If either of these are true I want to send it to 
statement 3 which clears the CallerID and proceeds to Privacy Manager.
 
I have also tried removing and adding quotes to no avail.  I am 
running the 6/7/2005 CVS Head.
 
exten = 5000,1,NoOp,${CALLERIDNAME}
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = Anonymous] | 
$[${CALLERIDNAME} = Unknown Caller]]?3:5)

exten = 5000,3,SetCIDNum()
exten = 5000,4,SetCIDName()
exten = 5000,5,PrivacyManager
exten = 5000,6,GotoIfTime(19:00-7:00|*|*|*?afterhours,s,1)
exten = 5000,7,agi,astcallerid
exten = 5000,8,DIAL(SIP/5001)
exten = 5000,9,Voicemail(u5001)
exten = 5000,110,Hangup

_-- Executing NoOp(IAX2/[EMAIL PROTECTED]:4569-2 
mailto:IAX2/[EMAIL PROTECTED]:4569-2, Anonymous) in new stack
Jun 29 10:34:09 WARNING[3946]: ast_expr.y:486 ast_yyerror: 
ast_yyerror(): syntax error: syntax error; Input:

(Anonymous = Anonymous)|(Anonymous = Unknown Caller)
^^^
 ^
-- Executing GotoIf(IAX2/[EMAIL PROTECTED]:4569-2 
mailto:IAX2/[EMAIL PROTECTED]:4569-2, 0?3:5) in new stack

-- Goto (in-out,7326031000,5)_



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



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


Re: [Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Doug Lytle



Keith O'Brien wrote:

exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = Anonymous] | 
$[${CALLERIDNAME} = Unknown Caller]]?3:5)




One too many $s?

exten = 5000,2,GotoIf($[${CALLERIDNAME} =

Doug



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


Re: [Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Giorgio Incantalupo

Hi! Try
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = 
Anonymous]|$[${CALLERIDNAME} = Unknown Caller]]?3:5)

intead of
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = Anonymous] | 
$[${CALLERIDNAME} = Unknown Caller]]?3:5)

Deleting spaces before and after ANd or OR logic worked for me.

Giorgio


Keith O'Brien wrote:

I am having some trouble implementing OR login in the GotoIf 
statement.   I have followed the examples in the Wiki and I still am 
getting a syntax error.
 
Essentially I want to screen for CallerIDs set for Anonymous OR 
Unknown Caller.   If either of these are true I want to send it to 
statement 3 which clears the CallerID and proceeds to Privacy Manager.
 
I have also tried removing and adding quotes to no avail.  I am 
running the 6/7/2005 CVS Head.
 
exten = 5000,1,NoOp,${CALLERIDNAME}
exten = 5000,2,GotoIf($[$[${CALLERIDNAME} = Anonymous] | 
$[${CALLERIDNAME} = Unknown Caller]]?3:5)

exten = 5000,3,SetCIDNum()
exten = 5000,4,SetCIDName()
exten = 5000,5,PrivacyManager
exten = 5000,6,GotoIfTime(19:00-7:00|*|*|*?afterhours,s,1)
exten = 5000,7,agi,astcallerid
exten = 5000,8,DIAL(SIP/5001)
exten = 5000,9,Voicemail(u5001)
exten = 5000,110,Hangup

_-- Executing NoOp(IAX2/[EMAIL PROTECTED]:4569-2 
mailto:IAX2/[EMAIL PROTECTED]:4569-2, Anonymous) in new stack
Jun 29 10:34:09 WARNING[3946]: ast_expr.y:486 ast_yyerror: 
ast_yyerror(): syntax error: syntax error; Input:

(Anonymous = Anonymous)|(Anonymous = Unknown Caller)
^^^
 ^
-- Executing GotoIf(IAX2/[EMAIL PROTECTED]:4569-2 
mailto:IAX2/[EMAIL PROTECTED]:4569-2, 0?3:5) in new stack

-- Goto (in-out,7326031000,5)_



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



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


RE: [Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Damon Estep








If you need a fast solution put two gotoif
statements in a row, one to check for the first condition, another to check for
the next, you can leave out the redirect If the condition is not matched so it
just goes to the next priority.













From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Keith O'Brien
Sent: Wednesday, June 29, 2005
8:40 AM
To:
Asterisk-Users@lists.digium.com
Subject: [Asterisk-Users] Problems
with OR Logic in the GotoIf Statement







I am having some trouble implementing OR login in the
GotoIf statement. I have followed the examples in the Wiki and I
still am getting a syntax error.











Essentially I want to screen for CallerIDs set for
Anonymous OR Unknown Caller. If either of
these are true I want to send it to statement 3 which clears the CallerID and
proceeds to Privacy Manager.











I have also tried removing and adding quotes to no
avail. I am running the 6/7/2005 CVS Head.











exten =5000,1,NoOp,${CALLERIDNAME}
exten =5000,2,GotoIf($[$[${CALLERIDNAME} =
Anonymous] | $[${CALLERIDNAME} = Unknown
Caller]]?3:5)
exten =5000,3,SetCIDNum()
exten =5000,4,SetCIDName()
exten =5000,5,PrivacyManager
exten =5000,6,GotoIfTime(19:00-7:00|*|*|*?afterhours,s,1)
exten =5000,7,agi,astcallerid
exten =5000,8,DIAL(SIP/5001)
exten =5000,9,Voicemail(u5001)
exten =5000,110,Hangup





 -- Executing NoOp(IAX2/[EMAIL PROTECTED]:4569-2, Anonymous) in new stack
Jun 29 10:34:09 WARNING[3946]: ast_expr.y:486 ast_yyerror: ast_yyerror():
syntax error: syntax error; Input:
(Anonymous = Anonymous)|(Anonymous = Unknown Caller)
^^^

^
 -- Executing GotoIf(IAX2/[EMAIL PROTECTED]:4569-2, 0?3:5) in new stack
 -- Goto (in-out,7326031000,5)










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

Re: [Asterisk-Users] Problems with OR Logic in the GotoIf Statement

2005-06-29 Thread Keith O'Brien



Yup, that did the 
trick. Thanks.


--
Hi! Try
exten = 5000,2,GotoIf($[$["${CALLERIDNAME}" = 
"Anonymous"]|$["${CALLERIDNAME}" = "Unknown Caller"]]?3:5) intead of
exten = 5000,2,GotoIf($[$["${CALLERIDNAME}" = "Anonymous"] | 
$["${CALLERIDNAME}" = "Unknown Caller"]]?3:5) Deleting spaces before and after ANd or OR logic worked for me.




smime.p7s
Description: S/MIME cryptographic signature
___
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users