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

sean darcy seandarcy2 at gmail.com
Thu Apr 12 16:44:28 CDT 2012


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 at sendPDFasFax:1] NoOp("DAHDI/4-1", "**** SENDING
>> FAX ****") in new stack
>>      -- Executing [send at 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 at 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




More information about the asterisk-users mailing list