[ previous ] [ next ] [ threads ]
 To :  aucyxob <aucyxob@y...>
 From :  Rodrigo Ricardo Passos <rodrigopassos@g...>
 Subject :  Re: [yate] Additional variable
 Date :  Fri, 05 Apr 2013 11:20:20 -0300
Hello Anton,

I'm using jate-yate a some days and it's function perfect to routing, 
but at this moment i don't know how i will use call.execute to create 
one call.
The main function of this code is routing calls and, if my user needs to 
record these call, i will use chan.record. Chan.record doesn't is the 
problem, because it's ok, and the call is recording, and the routing 
calls are making in call.routing.
Do you know if exist a form of the executing the call.execute when i 
need to forward the call to another server dispatching a call over an 
message like:

YateMessage msg = new YateMessage("call.execute");
msg.params.put("id", "");
msg.params.put("caller", caller);
msg.params.put("called", called);
msg.params.put("direct", "sip/sip:" + called + 
"@s...:5060");
try {
         Yate.dispatch(msg);
}
catch(Exception e){
     Yate.output(e.getMessage());
}

The code above doesn't is functional.


The actual code that is in operation is:

currentEvent.params.put("gwname", "MRH-OP-
String caller = null;
caller = currentEvent.params.get("caller");
String called = null;
called = currentEvent.params.get("called");
String retGw = null;
retGw = "sip/" + called + "@s...";
currentEvent.retVal = retGw;
currentEvent.handled = true;
try{
     Yate.acknowledge(Main.currentEvent);
}
catch(Exception e){
     Yate.output(e.getMessage());
}

Regards,

Rodrigo



Em 05/04/2013 02:24, aucyxob escreveu:
> Hello Rodrigo.
>
> As for using java with yate look this project https://code.google.com/p/jate-yate/
> may be you find this useful.
>
> Regards, Anton
>
> 01.04.2013, 18:28, "Rodrigo Ricardo Passos" :
>> Monica,
>> Thanks again
>> About java, exist some project to have an extmodule?
>> About socket using extmodule, what is the fundamental information to
>> return for Yate?
>> What is the structure of these return commands?
>>
>> Regards,
>>
>> Rodrigo
>>
>> Em 01/04/2013 10:34, Monica Tepelus escreveu:
>>
>>>   Hi Rodrigo,
>>>
>>>   In php I have something like this:
>>>   $info = array();
>>>   $info["sip/31"] = array(
>>>      "customer_id" => "value",
>>>      "customer_dir_path" => "value"
>>>   );
>>>
>>>   And in the functions I add: global $info;  -- make the variable global
>>>   in all the script
>>>   You would have to see the equivalent for that in perl.
>>>
>>>   Regards,
>>>   Monica Tepelus
>>>
>>>   Rodrigo Ricardo Passos wrote:
>>>>   Hello Monica, thanks for your return.
>>>>   So Monica, could you send me one example about how can i use the
>>>>   global array?
>>>>
>>>>   Regards,
>>>>
>>>>   Rodrigo
>>>>
>>>>   Em 01/04/2013 05:12, Monica Tepelus escreveu:
>>>>>   Hello Rodrigo,
>>>>>
>>>>>   I believe custom variables are not copied in call.answered messages.
>>>>>   When I needed additional parameters in messages where I couldn't
>>>>>   have them I saved them in a global array where the key was the
>>>>>   channel id. You can later use them when other messages are
>>>>>   triggered. Don't forget to clean them in chan.hangup
>>>>>
>>>>>   Custom parameters can be copied in call.cdr messages.
>>>>>
>>>>>   Regards,
>>>>>   Monica Tepelus
>>>>>
>>>>>   Rodrigo Ricardo Passos wrote:
>>>>>>   Hi all,
>>>>>>
>>>>>>   I'm using yate extmodule with perl, passing chan.record over
>>>>>>   chan.masquerade  to record calls. It's wotk fine. Now, i need to
>>>>>>   configure one variable in call.route to be used in call.answered
>>>>>>   before the chan.masquerade event.
>>>>>>
>>>>>>   Someone can help me to create this variable in call.route to be
>>>>>>   getting in call.answered?
>>>>>>
>>>>>>   Regards,
>>>>>>
>>>>>>   Rodrigo