[ previous ] [ next ] [ threads ]
 To :  Ganapathi Chidambaram <ganapathi.rj@g...>,Yate mailing list <yate@v...>
 From :  Monica Tepelus <monica@v...>
 Subject :  Re: [yate] Parameter Assign on Another Module
 Date :  Thu, 1 Feb 2018 12:51:20 +0200
Hi,

It's not clear what you want to achieve.

Also:
chan.disconnected is a message (not a module).

If your purpose is to propagate a parameter you usually set it in 
routing (call.route/call.preroute message) and also need to add in it 
the "copyprams" parameter in which you set the names of the parameters 
you want to be copied. You could then modify it after receiving 
chan.disconnected. I don't think parameters added in chan.disconnected 
are copied, but you could send a call.update for that id when receiving 
the chan.disconnedted

Ex:

Yate::Install("call.route");

...

if ($message->called marches rule) {
          $message->params["call_direction"] = "..";
          $message->params["copyparams"] = 
"call_direction,another_param_if_needed";
}

You would also need to modify cdrbuild.conf

[parameters]
call_direction=true;


This is the documentation article:
http://docs.yate.ro/wiki/How_to_add_custom_parameters_in_CDR_from_routing

Regards,
Monica Tepelus

On 10/07/2017 03:30 PM, Ganapathi Chidambaram wrote:
> Hi
>
> As i need to assign one value while listening one 
> module(chan.disconnected) and need to assign the value on another 
> module(call.cdr) by using external module.
>
> Will you please guys help me for the same.
>
>
> Yate::Install("chan.disconnected",80);
>
> call_cdr->params["call_direction"]='xyz';
>
>
> Regards,
> Ganapathi
>
>





  
    
  
  
    Hi,

It's not clear what you want to achieve.

Also:
chan.disconnected is a message (not a module).

If your purpose is to propagate a parameter you usually set it in routing (call.route/call.preroute message) and also need to add in it the "copyprams" parameter in which you set the names of the parameters you want to be copied. You could then modify it after receiving chan.disconnected. I don't think parameters added in chan.disconnected are copied, but you could send a call.update for that id when receiving the chan.disconnedted

Ex:

Yate::Install("call.route");

...

if ($message->called marches rule) {
         $message->params["call_direction"] = "..";
         $message->params["copyparams"] = "call_direction,another_param_if_needed";
}

You would also need to modify cdrbuild.conf
[parameters]
call_direction=true;

This is the documentation article:
http://docs.yate.ro/wiki/How_to_add_custom_parameters_in_CDR_from_routing

Regards,
Monica Tepelus

On 10/07/2017 03:30 PM, Ganapathi Chidambaram wrote:
Hi

As i need to assign one value while listening one module(chan.disconnected) and need to assign the value on another module(call.cdr) by using external module.

Will you please guys help me for the same.


Yate::Install("chan.disconnected",80);

call_cdr->params["call_direction"]='xyz';


Regards,
Ganapathi