Vincent wrote:

> exten => 777,n,ExecIf($[${LEN(${CALLERIDNUM})} =
> 10],AGI(/root/dummy.php),${CALLERIDNUM})

The line break is not a good idea.

> It doesn't look like ExecIf() is the right way to have Asterisk run an
> AGI script conditionnally. What would be the right way to do this?

Wrong syntax.
ExecIf(<expr>|<app>|<data>)
So:
ExecIf($[${LEN(${CALLERIDNUM})} = 10],AGI,/root/dummy.php)

Not sure about more than one argument. Maybe
ExecIf($[${LEN(${CALLERIDNUM})} = 10],AGI,/root/dummy.php,${CALLERIDNUM})
or
ExecIf($[${LEN(${CALLERIDNUM})} = 10],AGI,/root/dummy.php|${CALLERIDNUM})

Asterisk's syntax is strange sometimes ...

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
    Let's use IT to solve problems and not to create new ones.
          Asterisk? -> http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to