Author Topic: Channel Message Direction Modification  (Read 69 times)

ganapathi

  • Newbie
  • *
  • Posts: 39
    • View Profile
Channel Message Direction Modification
« 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 !
« Last Edit: September 06, 2018, 01:05:01 PM by ganapathi »

marian

  • Sr. Member
  • ****
  • Posts: 449
    • View Profile
Re: Channel Message Direction Modification
« Reply #1 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.

ganapathi

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Channel Message Direction Modification
« Reply #2 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?

marian

  • Sr. Member
  • ****
  • Posts: 449
    • View Profile
Re: Channel Message Direction Modification
« Reply #3 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.

ganapathi

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Channel Message Direction Modification
« Reply #4 on: September 18, 2018, 08:34:06 AM »
Ok