[asterisk-bugs] [JIRA] (ASTERISK-25458) Unable to set CDR variable in h extension or hangup_handler
David Burrows (JIRA)
noreply at issues.asterisk.org
Wed Jan 27 05:22:33 CST 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-25458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229201#comment-229201 ]
David Burrows commented on ASTERISK-25458:
------------------------------------------
I've spent some time trying to work around this issue, with no success. The patch attached to this issue seems to make no difference for me. I have a very simple way to reproduce the issue:
{noformat}
[mytrunk-outgoing]
exten => _X.,1,DIAL(SIP/mytrunk/${EXTEN})
exten => h,1,Set(CDR(userfield)=TEST)
{noformat}
So from a registered extension, I dial my mobile phone via mytrunk. Party A -> mytrunk -> Party B. Call is Bridged. Party B hangs up. With endbeforehexten=yes, I see the following CDR:
"","1000","04XXXXXXXX","mytrunk-outgoing",""""" <1000>","SIP/1000-00000000","SIP/mytrunk-00000001","Dial","SIP/mytrunk/04XXXXXXXX","2016-01-27 10:44:02","2016-01-27 10:44:10","2016-01-27 10:44:36",34,25,"ANSWERED","DOCUMENTATION","1453891442.0",""
With endbeforehexten=no, I see the following:
"","1000","04XXXXXXXX","mytrunk-outgoing",""""" <1000>","SIP/1000-00000002","SIP/mytrunk-00000003","Dial","SIP/mytrunk/04XXXXXXXX","2016-01-27 10:45:56","2016-01-27 10:46:01","2016-01-27 10:46:06",10,4,"ANSWERED","DOCUMENTATION","1453891556.3",""
"","1000","h","mytrunk-outgoing",""""" <1000>","SIP/1000-00000002","","Set","CDR(userfield)=TEST","2016-01-27 10:46:06","2016-01-27 10:46:06","2016-01-27 10:46:06",0,0,"ANSWERED","DOCUMENTATION","1453891556.3","TEST"
What I expect to see is something like the first CDR, except with "TEST" correctly placed in the userfield.
It looks like this really is a show stopper for some people who depend on being able to set custom CDR variables in either the h extension or a hangup handler. I believe the following (now closed) issue is related:
https://issues.asterisk.org/jira/browse/ASTERISK-25596
It looks like Pedro has opted to stay with Asterisk 11, rather than follow up with his submission.
> Unable to set CDR variable in h extension or hangup_handler
> -----------------------------------------------------------
>
> Key: ASTERISK-25458
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-25458
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CDR/General
> Affects Versions: 13.6.0, 13.7.0
> Reporter: Ross Beer
> Assignee: Ross Beer
> Severity: Minor
> Attachments: ASTERISK-25458-13.diff
>
>
> It is not possible to add CDR variables in the h extension or the hangup_handler.
> The CDR should only be closed once the hangup block has been processed. This would allow for calls that dial more than one extension (or fail-over to a secondary route) to store the hangup cause etc for each dial attempt which is the same way CDRs are created in Asterisk 13.
> Matthew Jordan via the dev mailing list commented:
> "The short answer is that it is working as designed; the long answer is
> that I think the design is wrong. (As the guy responsible, I feel like
> I'm only throwing stones at myself.)
> Keeping a single CDR running after channels have left a bridge was one
> of those things that was relatively "easy" in 11 and earlier versions,
> and is a bit more challenging in 13. I think in this case that we
> probably should revisit the rules around it.
> I do know this has come up a few times on the mailing lists, but I
> don't think anyone has made an issue yet. Please do made one,
> referencing this discussion.
> Just to summarize what I think should happen:
> endbeforehexten=no should cause no new CDR to be created in the 'h'
> extension, and the 'end' time on the CDR should not be set. The CDR
> should allow manipulation of its properties via the CDR function."
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list