2 CDRs for call forwarded calls

Status
Not open for further replies.

Roget Hoffman

New Member
Nov 24, 2017
17
0
1
72
Hello

I have a need where in the event a call is forwarded, the result is two call records. One for the inbound -> ext, and one for the outbound ext->call forwarded number. I has turned on leg-b to true in xml_cdr.conf, but when I do that I get 2 CDRs for ALL calls. Not what I want as my CDR data is sent off to a billing system.

Does anyone know if this is possible and how to do it?

thanks in advance
 

simcard

Member
Jan 22, 2017
49
4
8
Seeing the same issue here; after going the freeswitch lists and numerous google searches we've yet to be able to find anything in fpbx/freeswitch that will merge these records when leg-b is true.

We still have leg-b set to false, however we've taken to combining and normalising these particular cdrs into one record before we import the cdrs for mediation and rating.

Not ideal, however, like you we preferred the single cdr approach. You could just write a script in your favorite language to find cdrs that match each other, produce a new combined cdr and discard the a and b leg records for billing purposes.
 

Roget Hoffman

New Member
Nov 24, 2017
17
0
1
72
Thanks for the reply, however I'm not sure if I was clear on my issue.

Normally, (when a call is placed outbound - or - a call is received inbound (a normal call) - the result is 1 CDR. that's all good, - example: ext 100 calls 555-555-1212 or 555-555-1212 calls in, the CDR shows the "source" and the "destination" correctly.

like this:
direction source destination
inbound 100 555-555-1212
or
outbound 555-555-1212 100

However, if ext 100 has a call forward turned on, lets say (forward to) 555-555-9999. Then 555-555-1212 calls in - i still get 1 CDR where the source is 555-555-1212 and the destination is 555-555-9999 - and the CDR does not show ext 100 anywhere in it.

this is what I see now:
direction source destination
outbound 555-555-1212 555-555-9999

Since i have a requirement to show "both" the inbound side (555-555-1212 -> calling ext 100) as an inbound call, and another CDR showing ext 100 going out to 555-555-9999 as an outbound call.

what I need is this:
direction source destination
inbound 555-555-1212 100
outbound 100 555-555-9999

Wasn't this the default Fusion behavior at one point?

thanks in advance!
 
Status
Not open for further replies.