[asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Carlos Alvarez
I'm getting the following error, and none of us can figure out why:

 [Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected 'token', expecting
$end; Input:
 = 
  ^


Here is the code that generates it:

[scottsdale#queues-account]
exten = s,1,GotoIfTime(8:00-16:55,mon-fri,*,*?queue)
exten = s,n,Goto(scottsdale#queues-closed,s,1)
exten = s,n(queue),ExecIf($[${prefix} =
]?Queue(azenglish):Queue(azspanish))
exten = s,n(callback),Playback(scottsdale-q/${prefix}callbackmessage)
exten = s,n,Voicemail(@scottsdale,s)
exten = s,n,Hangup


Here is the rest of the call progress surrounding it, which seems to be
working anyway:

-- Executing [2@scottsdale#queues-aax:1]
Goto(SIP/televolve-1-1c7d, scottsdale#queues-account,s,1) in new
stack
-- Goto (scottsdale#queues-account,s,1)
-- Executing [s@scottsdale#queues-account:1]
GotoIfTime(SIP/televolve-1-1c7d, 8:00-16:55,mon-fri,*,*?queue) in
new stack
-- Goto (scottsdale#queues-account,s,3)
[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected 'token', expecting
$end; Input:
 = 
  ^
[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:472 ast_yyerror: If you have
questions, please refer to
https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
-- Executing [s@scottsdale#queues-account:3]
ExecIf(SIP/televolve-1-1c7d, ?Queue(azenglish):Queue(azspanish))
in new stack


-- 
Carlos Alvarez
TelEvolve
602-889-3003
--
_
-- 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

Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Eric Wieling
Looks to me like ${prefix} contains nothing but two quotes.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Carlos Alvarez
Sent: Friday, January 25, 2013 11:09 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Quoting error with gotoiftime

I'm getting the following error, and none of us can figure out why:

 [Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror: ast_yyerror(): 
 syntax error: syntax error, unexpected 'token', expecting $end; Input:
 = 
  ^


Here is the code that generates it:

[scottsdale#queues-account]
exten = s,1,GotoIfTime(8:00-16:55,mon-fri,*,*?queue)
exten = s,n,Goto(scottsdale#queues-closed,s,1)
exten = s,n(queue),ExecIf($[${prefix} = 
]?Queue(azenglish):Queue(azspanish))
exten = s,n(callback),Playback(scottsdale-q/${prefix}callbackmessage)
exten = s,n,Voicemail(@scottsdale,s) exten = s,n,Hangup


Here is the rest of the call progress surrounding it, which seems to be working 
anyway:

-- Executing [2@scottsdale#queues-aax:1] Goto(SIP/televolve-1-1c7d, 
scottsdale#queues-account,s,1) in new stack
-- Goto (scottsdale#queues-account,s,1)
-- Executing [s@scottsdale#queues-account:1] 
GotoIfTime(SIP/televolve-1-1c7d, 8:00-16:55,mon-fri,*,*?queue) in new 
stack
-- Goto (scottsdale#queues-account,s,3) [Jan 25 09:07:19] WARNING[19258]: 
ast_expr2.fl:468 ast_yyerror: ast_yyerror():  syntax error: syntax error, 
unexpected 'token', expecting $end; Input:
 = 
  ^
[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:472 ast_yyerror: If you have 
questions, please refer to 
https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
-- Executing [s@scottsdale#queues-account:3] 
ExecIf(SIP/televolve-1-1c7d, ?Queue(azenglish):Queue(azspanish)) in 
new stack


-- 

Carlos Alvarez
TelEvolve
602-889-3003


--
_
-- 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


Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Danny Nicholas
Error doesn't occur in 11.2.1

   -- Executing [1260@default:1] Answer(SIP/sipuser-0001, ) in new
stack

-- Executing [1260@default:2] Goto(SIP/sipuser-0001,
scottsdale#queues-account,s,1) in new stack

-- Goto (scottsdale#queues-account,s,1)

-- Executing [s@scottsdale#queues-account:1]
GotoIfTime(SIP/sipuser-0001, 8:00-16:55,mon-fri,*,*?queue) in new
stack

-- Goto (scottsdale#queues-account,s,3)

-- Executing [s@scottsdale#queues-account:3]
ExecIf(SIP/sipuser-0001, 1?Queue(azenglish):Queue(azspanish)) in new
stack

  == Spawn extension (scottsdale#queues-account, s, 3) exited non-zero on
'SIP/sipuser-0001'

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Carlos Alvarez
Sent: Friday, January 25, 2013 10:09 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Quoting error with gotoiftime

 

I'm getting the following error, and none of us can figure out why:

 

 [Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected 'token', expecting
$end; Input:

 = 

  ^

 

 

Here is the code that generates it:

 

[scottsdale#queues-account]

exten = s,1,GotoIfTime(8:00-16:55,mon-fri,*,*?queue)

exten = s,n,Goto(scottsdale#queues-closed,s,1)

exten = s,n(queue),ExecIf($[${prefix} =
]?Queue(azenglish):Queue(azspanish))

exten = s,n(callback),Playback(scottsdale-q/${prefix}callbackmessage)

exten = s,n,Voicemail(@scottsdale,s)

exten = s,n,Hangup

 

 

Here is the rest of the call progress surrounding it, which seems to be
working anyway:

 

-- Executing [2@scottsdale#queues-aax:1]
Goto(SIP/televolve-1-1c7d, scottsdale#queues-account,s,1) in new
stack

-- Goto (scottsdale#queues-account,s,1)

-- Executing [s@scottsdale#queues-account:1]
GotoIfTime(SIP/televolve-1-1c7d, 8:00-16:55,mon-fri,*,*?queue) in
new stack

-- Goto (scottsdale#queues-account,s,3)

[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected 'token', expecting
$end; Input:

 = 

  ^

[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:472 ast_yyerror: If you have
questions, please refer to
https://wiki.asterisk.org/wiki/display/AST/Channel+Variables

-- Executing [s@scottsdale#queues-account:3]
ExecIf(SIP/televolve-1-1c7d, ?Queue(azenglish):Queue(azspanish))
in new stack

 

 

-- 

Carlos Alvarez

TelEvolve

602-889-3003

 

--
_
-- 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

Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Eric Wieling
What version does the error occur on?  I suspect more recent versions of 
Asterisk removes extraneous quotes.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Danny Nicholas
Sent: Friday, January 25, 2013 11:20 AM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Quoting error with gotoiftime

Error doesn't occur in 11.2.1

   -- Executing [1260@default:1] Answer(SIP/sipuser-0001, ) in new stack

-- Executing [1260@default:2] Goto(SIP/sipuser-0001, 
scottsdale#queues-account,s,1) in new stack

-- Goto (scottsdale#queues-account,s,1)

-- Executing [s@scottsdale#queues-account:1] 
GotoIfTime(SIP/sipuser-0001, 8:00-16:55,mon-fri,*,*?queue) in new stack

-- Goto (scottsdale#queues-account,s,3)

-- Executing [s@scottsdale#queues-account:3] ExecIf(SIP/sipuser-0001, 
1?Queue(azenglish):Queue(azspanish)) in new stack

  == Spawn extension (scottsdale#queues-account, s, 3) exited non-zero on 
'SIP/sipuser-0001'

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Carlos Alvarez
Sent: Friday, January 25, 2013 10:09 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Quoting error with gotoiftime

 

I'm getting the following error, and none of us can figure out why:

 

 [Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror: ast_yyerror(): 
 syntax error: syntax error, unexpected 'token', expecting $end; Input:

 = 

  ^

 

 

Here is the code that generates it:

 

[scottsdale#queues-account]

exten = s,1,GotoIfTime(8:00-16:55,mon-fri,*,*?queue)

exten = s,n,Goto(scottsdale#queues-closed,s,1)

exten = s,n(queue),ExecIf($[${prefix} = 
]?Queue(azenglish):Queue(azspanish))

exten = s,n(callback),Playback(scottsdale-q/${prefix}callbackmessage)

exten = s,n,Voicemail(@scottsdale,s)

exten = s,n,Hangup

 

 

Here is the rest of the call progress surrounding it, which seems to be working 
anyway:

 

-- Executing [2@scottsdale#queues-aax:1] Goto(SIP/televolve-1-1c7d, 
scottsdale#queues-account,s,1) in new stack

-- Goto (scottsdale#queues-account,s,1)

-- Executing [s@scottsdale#queues-account:1] 
GotoIfTime(SIP/televolve-1-1c7d, 8:00-16:55,mon-fri,*,*?queue) in new 
stack

-- Goto (scottsdale#queues-account,s,3)

[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:468 ast_yyerror: ast_yyerror():  
syntax error: syntax error, unexpected 'token', expecting $end; Input:

 = 

  ^

[Jan 25 09:07:19] WARNING[19258]: ast_expr2.fl:472 ast_yyerror: If you have 
questions, please refer to 
https://wiki.asterisk.org/wiki/display/AST/Channel+Variables

-- Executing [s@scottsdale#queues-account:3] 
ExecIf(SIP/televolve-1-1c7d, ?Queue(azenglish):Queue(azspanish)) in 
new stack

 

 

-- 

Carlos Alvarez

TelEvolve

602-889-3003

 


--
_
-- 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


Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Carlos Alvarez
On Fri, Jan 25, 2013 at 9:20 AM, Eric Wieling ewiel...@nyigc.com wrote:

 Looks to me like ${prefix} contains nothing but two quotes.


Which is as it should be unless they choose the Spanish option, but yeah,
maybe that's what is choking Asterisk.

We do this:
exten = _X.,n,Set(prefix=) ;Initialize variable used in
scottsdale#queues-aax

Then in the AAX if they choose 5:
exten = 5,1,Set(prefix=s-); SPANISH

That way we just carry along their preference for Spanish throughout the
system.  Perhaps I need to initialize the variable as e-, but then would
have to rename everything.


-- 
Carlos Alvarez
TelEvolve
602-889-3003
--
_
-- 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

Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Eric Wieling
Don't do that.  Set(prefix=)   You are setting the prefix to have two quotes.  
You WANT prefix to be empty.  

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Carlos Alvarez
Sent: Friday, January 25, 2013 11:25 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Quoting error with gotoiftime

On Fri, Jan 25, 2013 at 9:20 AM, Eric Wieling ewiel...@nyigc.com wrote:


Looks to me like ${prefix} contains nothing but two quotes.



Which is as it should be unless they choose the Spanish option, but yeah, maybe 
that's what is choking Asterisk.

We do this:
exten = _X.,n,Set(prefix=) ;Initialize variable used in scottsdale#queues-aax

Then in the AAX if they choose 5:
exten = 5,1,Set(prefix=s-); SPANISH

That way we just carry along their preference for Spanish throughout the 
system.  Perhaps I need to initialize the variable as e-, but then would have 
to rename everything.


-- 

Carlos Alvarez
TelEvolve
602-889-3003


--
_
-- 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


Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Carlos Alvarez
On Fri, Jan 25, 2013 at 9:22 AM, Eric Wieling ewiel...@nyigc.com wrote:

 What version does the error occur on?  I suspect more recent versions of
 Asterisk removes extraneous quotes.


This is in 1.8.

Danny's test does support your theory.  It looks like the var is being set
as the quotes, rather than empty.

-- 
Carlos Alvarez
TelEvolve
602-889-3003
--
_
-- 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

Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Danny Nicholas
Where possible you should have a VM to try these things as needed.  Where
not, it isn't too difficult to duplicate the contexts and do something like
this

[default]

.

.

Exten = 1260,1,answer

Exten = 1260,n,goto(test-context,s,1)

.

 

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Carlos Alvarez
Sent: Friday, January 25, 2013 10:29 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Quoting error with gotoiftime

 

 

On Fri, Jan 25, 2013 at 9:27 AM, Eric Wieling ewiel...@nyigc.com wrote:

Don't do that.  Set(prefix=)   You are setting the prefix to have two
quotes.  You WANT prefix to be empty.

 

I'll give that a try during non-production hours.  Odd that the same code
works in earlier versions and later, but not this one.

 

 

-- 

Carlos Alvarez

TelEvolve

602-889-3003

 

--
_
-- 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

Re: [asterisk-users] Quoting error with gotoiftime

2013-01-25 Thread Carlos Alvarez
On Fri, Jan 25, 2013 at 9:31 AM, Danny Nicholas da...@debsinc.com wrote:

 Where possible you should have a VM to try these things as needed.  Where
 not, it isn’t too difficult to duplicate the contexts and do something like
 this

 [default]


I do have a test VM, but I also have a maintenance window for this customer
later tonight for other things, so I was being lazy.  Poor excuse.

Tested it, and it works, thanks guys!

-- 
Carlos Alvarez
TelEvolve
602-889-3003
--
_
-- 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