VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
ross.beer at outlook.com Guest
|
Posted: Wed Oct 07, 2015 8:26 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
Hi,
I have the following code that operates when a channel is hung-up:
Quote: | [record-hangupcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
|
Before the dial a hangup handler is registered:
Quote: | 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 |
|
Back to top |
|
|
cervajs at fpf.slu.cz Guest
|
Posted: Fri Oct 09, 2015 3:05 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
search in archives
save the records to another table like cdr_extended
Dne 7.10.2015 v 15:26 Ross Beer napsal(a):
Quote: | Hi,
I have the following code that operates when a channel is hung-up:
Quote: | [record-hangupcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
|
Before the dial a hangup handler is registered:
Quote: | 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
--
---------------------------------------
Marek Cervenka
=======================================
|
|
|
Back to top |
|
|
ross.beer at outlook.com Guest
|
Posted: Fri Oct 09, 2015 6:52 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
This was always possible in the past, however does not work in the current release. I believe this is a bug.
To: asterisk-users@lists.digium.com
From: cervajs@fpf.slu.cz
Date: Fri, 9 Oct 2015 10:04:47 +0200
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
search in archives
save the records to another table like cdr_extended
Dne 7.10.2015 v 15:26 Ross Beer napsal(a):
Quote: | Hi,
I have the following code that operates when a channel is hung-up:
Quote: | [record-hangupcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
|
Before the dial a hangup handler is registered:
Quote: | 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
--
---------------------------------------
Marek Cervenka
=======================================
|
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
andrew at convergedgro... Guest
|
Posted: Fri Oct 09, 2015 7:54 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
You can use this
exten => h,1,Set(CDR(userfield)=Hangupcause:${HANGUPCAUSE})
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Ross Beer
Sent: Friday, October 9, 2015 1:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com>
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
This was always possible in the past, however does not work in the current release.
I believe this is a bug.
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
From: cervajs@fpf.slu.cz (cervajs@fpf.slu.cz)
Date: Fri, 9 Oct 2015 10:04:47 +0200
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
search in archives
save the records to another table like cdr_extended
Dne 7.10.2015 v 15:26 Ross Beer napsal(a):
Quote: |
Hi,
I have the following code that operates when a channel is hung-up:
Quote: |
[record-hangupcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
|
Before the dial a hangup handler is registered:
Quote: |
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
|
Quote: | -- ---------------------------------------Marek Cervenka======================================= |
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
ross.beer at outlook.com Guest
|
Posted: Fri Oct 09, 2015 8:27 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
Hi Andrew, Unfortunately that has stopped working when using chan_pjsip and asterisk 13. The CDR is closed too early after a dial attempt. This is the expected behaviour for Asterisk 13, however you should be able to set the variable before the CDR is locked/committed and before another dial attempt. The hangup_handler should be the way to do this as it's run within the same dial command. I think I will need to raise an issue as this has only stopped working in Asterisk 13. Thank you for your feedback, Ross
From: andrew@convergedgroup.net
To: asterisk-users@lists.digium.com
Date: Fri, 9 Oct 2015 14:50:51 +0200
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
You can use this
exten => h,1,Set(CDR(userfield)=Hangupcause:${HANGUPCAUSE})
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Ross Beer
Sent: Friday, October 9, 2015 1:52 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users@lists.digium.com>
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
This was always possible in the past, however does not work in the current release.
I believe this is a bug.
To: asterisk-users@lists.digium.com (asterisk-users@lists.digium.com)
From: cervajs@fpf.slu.cz (cervajs@fpf.slu.cz)
Date: Fri, 9 Oct 2015 10:04:47 +0200
Subject: Re: [asterisk-users] Storing HANGUPCAUSE in CDR
search in archives
save the records to another table like cdr_extended
Dne 7.10.2015 v 15:26 Ross Beer napsal(a):
Quote: |
Hi,
I have the following code that operates when a channel is hung-up:
Quote: |
[record-hangupcause]
exten => 1,n,Set(CDR(hangupcause)=${HANGUPCAUSE})
exten => s,n,Return()
|
Before the dial a hangup handler is registered:
Quote: |
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
|
Quote: | -- ---------------------------------------Marek Cervenka======================================= |
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
mjordan at digium.com Guest
|
Posted: Fri Oct 09, 2015 8:51 am Post subject: [asterisk-users] Storing HANGUPCAUSE in CDR |
|
|
On Fri, Oct 9, 2015 at 8:27 AM, Ross Beer <ross.beer@outlook.com> wrote:
Quote: | Hi Andrew,
Unfortunately that has stopped working when using chan_pjsip and asterisk
13.
The CDR is closed too early after a dial attempt. This is the expected
behaviour for Asterisk 13, however you should be able to set the variable
before the CDR is locked/committed and before another dial attempt.
The hangup_handler should be the way to do this as it's run within the same
dial command.
I think I will need to raise an issue as this has only stopped working in
Asterisk 13.
Thank you for your feedback,
Ross
|
I've responded to the thread on the -dev list, as this is something
related to the CDR overhaul that occurred in Asterisk 12.
As an FYI: this isn't specific to chan_pjsip. You'd get this behaviour
regardless of the channel driver you used.
Matt
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|