[asterisk-dev] Asterisk 13.6.0-rc2 Possible CDR Bug

Ross Beer ross.beer at outlook.com
Wed Oct 7 14:06:29 CDT 2015

Hi, I am having an issue setting custom variables in a CDR record for a call once it has hung up. Setting variables before a dial are inserted into the CDR correctly. I am using the following hangup_handler as per previous versions: 

[record-hangupcause]exten => s,1,Set(CDR(hangupcause)=${HANGUPCAUSE})exten => s,n,Return()
Before the dial a hangup handler is registered:
The routine is called and the variables are being set, however not on the channel's CDR which made the call.
By changing the cdr option 'endbeforehexten=no' this should keep the CDR accessible, however all this does is cause another CDR to be created for the 'h' extension.
Is there currently a bug with accessing CDR data for a channel that has been hung-up? It looks to me that the CDR is closed before the hangup_handler is called. However this shouldn't be the case!
I would be grateful for any feedback you can offer! I am happy to open a bug report, but I would prefer to have this acknowledged before doing so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20151007/c0d19282/attachment.html>

More information about the asterisk-dev mailing list