[asterisk-dev] [Code Review] Fix CDR records for outbound SLA calls.

dkerr reviewboard at asterisk.org
Mon Feb 11 20:08:05 CST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2326/
-----------------------------------------------------------

Review request for Asterisk Developers and Matt Jordan.


Summary
-------

Calls routed to a external trunk through SLAStation() do not maintain a CDR record for the outbound channel.  Normally when an asterisk extension dials another extension (or trunk) two CDR records are maintained, one attached to each channel. However when the call is routed through SLAStation() then there is an intermediary "local" channel which initiates the Dial() to the called extension (or trunk).  When it answers the originating channel and the called channel are bridged together with some do_masquerade() magic and the "local" channels go away.  This occurs within a MeetMe conference and the process of bridging and masquerading messes up the CDR and in fact causes the outbound channel CDR to be marked AST_CDR_NULL which effectively neuters it.

This patch does two things...
1) When a masquerade is detected inside the conf_run() function it fixes up the CDR for the newly masqueraded channel so that it is correct.
2) When a SLA call ends in the dial_trunk() function and if the "attemptcallerid=yes" is set in sla.conf then the CDR record for the outbound channel is fixed up such that originating channel name, number, callerid, etc. is set to that of the channel that originated the SLAStation() dial request.

This ensures that accurate call duration and billing seconds can be determined from CDR records when SLA feature is used.  Behavior of fixing up the outbound channels originating information can be suppressed by setting attemptcallerid=no in the sla.conf file.  This configuration statement already exists, this patch expands its use.

Please also see comments in the code.


This addresses bug asterisk-20747.
    https://issues.asterisk.org/jira/browse/asterisk-20747


Diffs
-----

  /trunk/apps/app_meetme.c 381255 

Diff: https://reviewboard.asterisk.org/r/2326/diff


Testing
-------

Have been running this patch successfully for a couple of months on my asterisk server and routed outbound calls through both SIP and GTalk/Motif. The attached patch is for trunk, but I have tested 1.8 version and 11 versions.


Thanks,

dkerr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130212/d39aa678/attachment.htm>


More information about the asterisk-dev mailing list