[asterisk-dev] Interesting/Broken (?) CDR behaviour during transfer. Help please!

Steve Davies davies147 at gmail.com
Thu May 5 11:16:33 CDT 2011


Hi,

Hope this is appropriate for the DEV mailing list - say so if not.

It appears that the CDR data generated by a SIP attended-transfer of a
call to an already answered call is different to a SIP attended
transfer to a ringing call, to the point of being quite badly wrong in
the case of a transfer to a ringing call.

As far as I can tell, the reason for the discrepancy is that once a
call is bridged, asterisk keeps a "bridge_cdr" knocking about, and the
act of masquerading the calls during the transfer leaves this
untouched, so the correct data is retained when the bridge eventually
completes and the CDR is saved.

When transferring to a ringing call, there is no "bridge_cdr" yet, so
when ast_do_masquerade swaps the CDR records between channels, it is
destroying the only copy of the correct CDR for the ringing channel.

I can't think of any obvious way to resolve this unless the swap of
CDR records is done conditionally based on the state of the channels
being Masq'ed? Perhaps only overwrite CDR records that have a flag of
AST_CDR_BRIDGED set? Not sure what other implications that might have
though :(

Thoughts please? Who is the CDR expert?

Thanks,
Steve



More information about the asterisk-dev mailing list