Re: [Asterisk-java-users] Passing Information through AMI
Brought to you by:
srt
|
From: Mohammad D. <mo...@gm...> - 2013-07-02 08:35:43
|
I think the answer to your first question is:
originateAction.setVariable("variableName", value);
On Mon, Jul 1, 2013 at 12:39 PM, Rounak Saha <rou...@gm...> wrote:
> Can you provide me the function to pass channel variables?Is it
> setVariables(Map<String,String>)<http://www.asterisk-java.org/development/apidocs/org/asteriskjava/manager/action/OriginateAction.html#setVariables(java.util.Map)>
> ?
>
> This is what I am doing.My doubts are in red.Sorry for making it so
> colourful. :-)
>
> JAVA CODE:
> originateAction = new OriginateAction();
> originateAction.setChannel("dahdi/g0/01234567");
> originateAction.setContext("medicine");
> originateAction.setExten("s");
> originateAction.setPriority(1);
> originateAction.setTimeout(30000l);
> originateAction.setAsync(true);
> // Here I want to send some values maybe 3 or 4.
>
> Extensions.conf
> [medicine]
> exten => s,1,Answer()
> exten => s,n,AGI(agi://127.0.0.1/hello.agi) //How will I send the
> values to my AGI?
> exten => s,n,Hangup()
>
>
> AGI
> public void service(AgiRequest request, AgiChannel channel)
> throws AgiException
> {
> // How to obtain the value??channel.getVariable will work??
> }
>
>
>
>
>
>
>
> On Mon, Jul 1, 2013 at 3:24 AM, Mordechay Kaganer <mka...@gm...>wrote:
>
>> B.H.
>>
>> On Sat, Jun 29, 2013 at 11:02 AM, Rounak Saha <rou...@gm...>wrote:
>>
>>> To make a outbound call I have to use Manager AMI ri8?I cant use AGi?
>>>
>>> I am making a dynamic IVR . This(below) is what I am doing.
>>>
>>> I search my database,get a "phone number and filelocation of a song ".
>>> Now I want to call that phone number and play the song;
>>>
>>> How to pass infromation (phonenumber and address where the song is) to
>>> asterisk dynamically.
>>>
>>>
>>>
>> You can pass channel variables through OriginateAction - this way you can
>> pass data from your java app to asterisk's dialplan.
>>
>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> This SF.net email is sponsored by Windows:
>>>
>>> Build for Windows Store.
>>>
>>> http://p.sf.net/sfu/windows-dev2dev
>>> _______________________________________________
>>> Asterisk-java-users mailing list
>>> Ast...@li...
>>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users
>>>
>>>
>>
>>
>> --
>> משיח NOW!
>> Moshiach is coming very soon, prepare yourself!
>> יחי אדוננו מורינו ורבינו מלך המשיח לעולם ועד!
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Windows:
>>
>> Build for Windows Store.
>>
>> http://p.sf.net/sfu/windows-dev2dev
>> _______________________________________________
>> Asterisk-java-users mailing list
>> Ast...@li...
>> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Asterisk-java-users mailing list
> Ast...@li...
> https://lists.sourceforge.net/lists/listinfo/asterisk-java-users
>
>
|