Re: [asterisk-users] syntax error from digium fax manual ??

2012-04-12 Thread sean darcy

On 04/09/2012 08:51 PM, Barry Miller wrote:

On Mon, Apr 09, 2012 at 06:21:40PM -0400, sean darcy wrote:

I've cut and pasted from the digium fax admin manual:

exten =  send,1,NoOp( SENDING FAX )
exten =  send,n,Wait(6)
exten =  send,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
exten =  send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})

 -- Executing [send@sendPDFasFax:1] NoOp(DAHDI/4-1,  SENDING
FAX ) in new stack
 -- Executing [send@sendPDFasFax:2] Wait(DAHDI/4-1, 6) in new stack
 -- Channel 4 detected a CED tone from the network.
[Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:468 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected '+', expecting
$end; Input:
   + 1
   ^
[Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:472 ast_yyerror: If you
have questions, please refer to
https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
 -- Executing [send@sendPDFasFax:3] Set(DAHDI/4-1,
GLOBAL(FAXCOUNT)=) in new stack
   == Setting global variable 'FAXCOUNT' to ''

The error seems to be saying that I need a closing } or ], but it
looks like it has closing brackets.

Any suggestions?


This is exactly the error you'd get if FAXCOUNT is null or not set.
(Because then the expression would be the invalid '$[ + 1]'.)


 Yup. Inserted a set to zero if null before test. Thanks.

sean


--
_
-- 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] syntax error from digium fax manual ??

2012-04-09 Thread Barry Miller
On Mon, Apr 09, 2012 at 06:21:40PM -0400, sean darcy wrote:
 I've cut and pasted from the digium fax admin manual:
 
 exten = send,1,NoOp( SENDING FAX )
 exten = send,n,Wait(6)
 exten = send,n,Set(GLOBAL(FAXCOUNT)=$[ ${GLOBAL(FAXCOUNT)} + 1 ])
 exten = send,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
 
 -- Executing [send@sendPDFasFax:1] NoOp(DAHDI/4-1,  SENDING 
 FAX ) in new stack
 -- Executing [send@sendPDFasFax:2] Wait(DAHDI/4-1, 6) in new stack
 -- Channel 4 detected a CED tone from the network.
 [Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:468 ast_yyerror: 
 ast_yyerror():  syntax error: syntax error, unexpected '+', expecting 
 $end; Input:
   + 1
   ^
 [Apr  9 15:29:02] WARNING[2912]: ast_expr2.fl:472 ast_yyerror: If you 
 have questions, please refer to 
 https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
 -- Executing [send@sendPDFasFax:3] Set(DAHDI/4-1, 
 GLOBAL(FAXCOUNT)=) in new stack
   == Setting global variable 'FAXCOUNT' to ''
 
 The error seems to be saying that I need a closing } or ], but it 
 looks like it has closing brackets.
 
 Any suggestions?

This is exactly the error you'd get if FAXCOUNT is null or not set.
(Because then the expression would be the invalid '$[ + 1]'.)

-- 
Barry

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