Billable duration on forwarded call

I have a click-to-call function which having flow like:

  1. Originate a call to Extension X by using AMI
  2. Extension X receives a call from asterisk
  3. Extension X answers the call
  4. Dial to another trunk
    exten=>myexten,n,Dial(SIP/${my-trunk}/${my-customer-number},60,gC)
  5. my-customer-number Ring
  6. my-customer-number Answer
  7. my-customer-number Hangup

My problem is: I want the CDR to record the Billable Seconds from 6 to 7
RIght now the Billable Seconds start from 3 to 7

What I have tried:

  1. ResetCDR/ForkCDR before the Dial (step 4)
    Problem: Billable Seconds start from 5 to 7 (which included my-customer-number Ringing time)
  2. Put option C on Dial to reset CDR
    Problem: Billable Seconds still start from 3 to 7, nothing happens

Are there any solution to get Billable Seconds from 6 to 7 by using dialplan?
Thank you all for any advices

You’ll need to filter the events, but I think this will help:
https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5242932

If it’s on the same channel, once a channel is already answered, even if you start a fresh CDR, then it’s going to show up as immediately answered. The CDR is not really intended for placing multiple calls on the same channel.

What you could do is use a Local channel for the second call, which will have its own CDR that isn’t affected by the first call you made or the master channel. That should do what you want.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.