Nitesh Divecha wrote:
> Hello All,
>
> Is there any way to pass additional parameters while calling AGI from 
> *.call file?
>
> Channel: Local/[EMAIL PROTECTED]
> MaxRetries: 0
> RetryTime: 15
> WaitTime: 15
> Application: AGI
> Data: recordvoice.php
>
> Something like Data: recordvoice.php?id=3453&name=asterisk
>
> Cheers,
> Nitesh
>
>
>
> _______________________________________________
> --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
>   
I'm not 100% sure if you can pass it directly, but you can use the "set" 
option in the call file to set local variables within Asterisk and then 
pass them to the AGI script. So for your example it would be.

Set: name=asterisk

This will set the variable ${name} in asterisk and depending how your 
script was created you should be able to grab the variable to use within 
the script. If you are using say the PHP AGI you can use something like 
the following:

$var = $agi->get_variable("name");

This will create an array with $var['data'] holding 'asterisk';

Now one more thing I am not sure of is for multiple variables (haven't 
tried it yet ;D ). You may have to do it one of two ways.

Set: name=asterisk, id=3453

or

Set: name=asterisk
Set: id=3453

and if those don't work, just format it so you can filter it out with PHP.

Hopefully this will help.

Kevin



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