Yate Community Forum

General Category => Yate users hangout place => Topic started by: ganapathi on September 06, 2018, 01:03:16 PM

Title: Channel Message Direction Modification
Post by: ganapathi on September 06, 2018, 01:03:16 PM
Hi

Help me on direction for channel message alteration because in my cases both leg are considered as outgoing, so i need to modify one leg  as incoming for proper clearance on CDR and other related information.

Steps Followed :

 My both leg are considered as outgoing under cdrtracking scheme. And there is no incoming, so cdrcombine is not finalized and my other CDR logging also difficult to find the both leg due to both are as incoming leg.

So clarify me few things.

Yate Version :6.0.1
Calling Medium : PRI with Zaptel module


Kindly help me out !
Title: Re: Channel Message Direction Modification
Post by: marian on September 18, 2018, 07:35:46 AM
Hi,

You should not use cdrcombine for this kind of application.

You should use your own logic to track and manage channels belonging to the same call. Your script may retain any information it needs to implement your application (remember: for outgoing calls you may dispatch the call.execute message and learn the target channel's id on return).

You may also use custom CDR parameters for this: when you start a call custom parameters (given in 'copyparams': comma separated list of parameter names) may be copied in chan.startup message which will be stored and used by cdrbuild if configured so.
Custom parameters will be set in all call.cdr messages sent by cdrbuild.
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 18, 2018, 08:03:54 AM
Thanks a lot  for reply !!

So it means nothing wrong on direction and handling of leg.

I am not using cdrcombine module nowadays. but only if i use custom parameters then it won't copy into both outbound cdr leg right. ?. As i seen some of parameters are copied on both leg at long back.

And yes for outgoing calls am using target channel ID to dispatch new local leg .

But for some reason i didn't disabled cdrcombine , so in that case any possiblities to remove cdrcombine entry forcefully by sending message?
Title: Re: Channel Message Direction Modification
Post by: marian on September 18, 2018, 08:13:08 AM
When used in call.execute parameters set in 'copyparams' are copied in outbound call leg's chan.startup.

Please unload cdrcombine.
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 18, 2018, 08:34:06 AM
Ok
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 24, 2018, 02:36:41 AM
Hi

As i added one new custom parameters in cdrbuild.conf as

custom_direction = true

And added custom_direction field into copyparams of both leg. And assigned different value on each leg. But values are overridden on each leg.

As i need to maintain different value in custom_direction on each leg with same name to identify the call leg.

How do i that. Please help me !
Title: Re: Channel Message Direction Modification
Post by: marian on September 24, 2018, 02:47:03 AM
Please post a log with message sniffer enabled.
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 24, 2018, 03:17:45 AM
Hi

Field = TB_Direction.

For Sig Channel
TB_direction = external
For Sip Channel
TB_direction = incoming

further both channel cdr also have same value as "incoming".

Log : https://paste.linux.community/view/2c14381c
Title: Re: Channel Message Direction Modification
Post by: marian on September 24, 2018, 03:49:27 AM
TB_direction is missing in initial call.execute message 'copyparams' parameter list
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 24, 2018, 11:45:28 PM
Attached revised log with two different cases.

1.Once first leg(sig channel) then call.route doesn't have TB_direction value.But call.execute of second leg assigning it properly.

2.Emit TB_direction value on call.route as well.(https://paste.linux.community/view/07e04e04)

Title: Re: Channel Message Direction Modification
Post by: marian on September 24, 2018, 11:59:30 PM
How did you configure parameter storage in cdrbuild?
Did you disabled override?
See https://docs.yate.ro/wiki/CDR_Build_Module
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 25, 2018, 12:16:24 AM
Hi
 I configured cdrbuild parameters like mentioned below in cdrbuild.conf configuration.

[parameters]

TB_direction=true

Anything else need to be configure ?
Title: Re: Channel Message Direction Modification
Post by: marian on September 25, 2018, 12:31:02 AM
You are allowing changing this parameter after creation.
Set it to false.
Title: Re: Channel Message Direction Modification
Post by: ganapathi on September 25, 2018, 08:50:58 AM
Thanks. It's working as excepted for this scenario.

So if i want to re-modify in-between on handler but only on particular leg then it's possible ?
Title: Re: Channel Message Direction Modification
Post by: marian on September 25, 2018, 11:57:29 PM
No.
You may use another parameter that can be updated in cdrbuild.