[asterisk-users] Storing HANGUPCAUSE in CDR

Ross Beer ross.beer at outlook.com
Wed Oct 7 08:26:16 CDT 2015


Hi,
I have the following code that operates when a channel is hung-up:
[record-hangupcause]exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})exten => s,n,Return()
Before the dial a hangup handler is registered:
Set(CHANNEL(hangup_handler_push)=record-hangupcause,s,1)
The routine is called and the variables are being set, however not on the channel's CDR which made the call. I believe this is due to the CDR being closes as soon as the dial returns. 
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 a way to update the CDR so that a result can be stored per dial?
Thank you in advance,
Ross



 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20151007/e90fa203/attachment.html>


More information about the asterisk-users mailing list