Yate Community Forum
General Category => Yate users hangout place => Topic started 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 :
- Enqueue the call.execute using dumb with billid. And dumb channel are considered as incoming but cdrtrack is set as false where-as it's not necessary.
- Sig Channel generated from call.execute for ISDN call. CDR initialized with direction as outgoing.
- Once ISDN call answered then dispatching call.route to find the routing part. Handler installed for call.answered message.
- Check the result call.route and Enqueue chan.masquerade with message of call.execute with id = Sig Channel(sig/1) / id of call.answered message
- So this call.execute also executing with direction as incoming.
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.
- Is it Normal Behavior ?
- Is there any wrong handled the message by this logic ?
- Changing direction is good idea ?.If then point me the direction out !
- Some extra logic need to apply to find each leg on this call is the proper solution on this cases ?.
- Extra logic need to track this Sig ISDN call for hangup to clean-up blank entry with billid on cdrcombine and how to clean entry ?
Yate Version :6.0.1
Calling Medium : PRI with Zaptel module
Kindly help me out !
-
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.
-
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?
-
When used in call.execute parameters set in 'copyparams' are copied in outbound call leg's chan.startup.
Please unload cdrcombine.
-
Ok
-
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 !
-
Please post a log with message sniffer enabled.
-
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
-
TB_direction is missing in initial call.execute message 'copyparams' parameter list
-
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)
-
How did you configure parameter storage in cdrbuild?
Did you disabled override?
See https://docs.yate.ro/wiki/CDR_Build_Module
-
Hi
I configured cdrbuild parameters like mentioned below in cdrbuild.conf configuration.
[parameters]
TB_direction=true
Anything else need to be configure ?
-
You are allowing changing this parameter after creation.
Set it to false.
-
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 ?
-
No.
You may use another parameter that can be updated in cdrbuild.