[asterisk-users] .call file

Paul ast2005 at 9ux.com
Fri Jun 29 10:57:26 CDT 2007


I'm going to top post in this situation.

Kevin - Commands that operate on the channel variables won't help if we
are using a call file. We will have a new channel.

This syntax works with asterisk 1.2.x for me:

Application: AGI
Data: say_it.php|call_status_message

I have done other things where a bunch of parameters are stored in
postgres or mysql and the only parameter I pass via the call file is the
record key. The php script receives the key as a parameter and gets
everything else from the db. Something like this:

Application: AGI
Data: inform.php|68456943

Kevin Smith wrote:

>Nitesh Divecha wrote:
>  
>
>>Hello All,
>>
>>Is there any way to pass additional parameters while calling AGI from 
>>*.call file?
>>
>>Channel: Local/1000 at from-internal
>>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
>  
>




More information about the asterisk-users mailing list