AW: [Asterisk-Users] syntax error

Marc Rohlfing marc.rohlfing at oasy.de
Wed Jun 21 05:38:39 MST 2006


  Hi,

> Does anyone know why this row:
>  exten => s,2,GotoIf($[${CALLERIDNAME:0:${LEN(${RGPREFIX})}} !=
> ${RGPREFIX}]?4:3)

took me some squinting, but the parantheses seem correct - so I presume
the Asterisk parser can't cope with that convoluted an expression (using
a function within a variable, basically).
Try putting LEN(${RGPREFIX}) into a separate variable first, then refer
to it in your GotoIf in a second statement.

  Marc




More information about the asterisk-users mailing list