Link to home
Start Free TrialLog in
Avatar of doddeers668
doddeers668

asked on

Asterisk syntax errors

Hi,
I'm using asterisk 13 for a standalone voicemail.  It's currently producing the following errors:
Checking voicemailmain:

 WARNING[12549][C-00000067]: ast_expr2.fl:470 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '<token>', expecting $end; Input:
""44745XXXXXXX"<sip:447458XXXXXX@192.168.0.2:5060;user=phone>" != ""
  ^
[Jun 23 21:12:14] WARNING[12549][C-00000067]: ast_expr2.fl:474 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables

and
receiving voicemail which has been redirected:

WARNING[13094][C-00000069]: ast_expr2.fl:470 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '<token>', expecting $end; Input:
"<sip:447458XXXXXX@172.31.23.20>;reason="unconditional";privacy="full"" != ""
                                         ^
[Jun 23 21:22:36] WARNING[13094][C-00000069]: ast_expr2.fl:474 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables

My dialplan:

exten => 44745XXXXXXX,1,NoOp(Checking for Diversion Headers)
exten => 44745XXXXXXX,n(diversioncheck),GotoIf($["${SIP_HEADER(Diversion)}" != ""]?diversion:paicheck)
exten => 44745XXXXXXX,n(diversion),Set(DIVERSION=${SIP_HEADER(Diversion)})
exten => 44745XXXXXXX,n,Set(temp=${CUT(DIVERSION,\:,2)})
exten => 44745XXXXXXX,n,Set(CID=${CUT(temp,\@,1)})
exten => 44745XXXXXXX,n,GotoIf($[${VM_INFO(${CID},exists)} = 0]?paicheck)
exten => 44745XXXXXXX,n,VoiceMail(${CID},u)
exten => 44745XXXXXXX,n,Hangup()
exten => 44745XXXXXXX,n,NoOp(Checking for PAI Headers)
exten => 44745XXXXXXX,n(paicheck),GotoIf($["${SIP_HEADER(P-Asserted-Identity)}" != ""]?pai:usecid)
exten => 44745XXXXXXX,n(pai),Set(PAI=${SIP_HEADER(P-Asserted-Identity)})
exten => 44745XXXXXXX,n,Set(temp=${CUT(PAI,\:,2)})
exten => 44745XXXXXXX,n,Set(CID=${CUT(temp,\@,1)})
exten => 44745XXXXXXX,n,GotoIf($[${VM_INFO(${CID},exists)} = 0]?usecid)
exten => 44745XXXXXXX,n,VoiceMailMain(${CID},s)
exten => 44745XXXXXXX,n,Hangup()
exten => 447458800176,n(usecid),NoOp(Using CallerID to see if the callerid matches a mailbox)
exten => 447458800176,n,ExecIf($[${VM_INFO(${CID},exists)} = 1]?VoiceMailMain(${CID},s}))
exten => 447458800176,n,NoOp(all else fails just prompt for a mailbox number and pin)
exten => 447458800176,n,VoiceMailMain()
exten => 447458800176,n,Hangup()

The dialplan appears to be working, but I'd like to identify the cause of the errors and clearly avoid them.

TIA for any help.
Avatar of José Méndez
José Méndez

When exactly are these errors being generated?
Avatar of doddeers668

ASKER

They're generated at the beginning of the call, before the voicemail voice prompts begin.
Further information:

When calls are directed to voicemail, there are no errors.

The errors are only created when calls are directed to voicemailmain.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of José Méndez
José Méndez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Helpful and quick to respond.