[asterisk-bugs] [JIRA] (ASTERISK-15488) callee chanel overwrites the caller cdr

Matt Jordan (JIRA) noreply at issues.asterisk.org
Wed Feb 25 21:23:34 CST 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-15488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225139#comment-225139 ] 

Matt Jordan commented on ASTERISK-15488:
----------------------------------------

I can confirm this is still an issue in Asterisk 11. Using the following dialplan:

{noformat}

[contextA]
exten => s,1,NoOp(I'm contextA)
exten => s,n,Set(CDR(accountcode)=A)
exten => s,n,Answer()
exten => s,n,PlayBack(silence/5)
exten => s,n,Dial(Local/s at contextB/n)

[contextB]
exten => s,1,NoOp(I'm contextB)
exten => s,n,Set(CDR(accountcode)=B)
exten => s,n,Wait(3)
exten => s,n,Answer()
exten => s,n,PlayBack(silence/3)
exten => s,n,Hangup
{noformat}

And originating a Local channel to {{Local/s at contextA}} (with the other end in Echo) I get the following CDRs:

{noformat}
"A","","s","contextA","","Local/s at contextA-00000000;2","Local/s at contextB-00000001;1","Dial","Local/s at contextB/n","2015-02-26 03:11:58","2015-02-26 03:12:06","2015-02-26 03:12:07",9,1,"ANSWERED","DOCUMENTATION","1424920318.1",""
"B","","s","contextB","","Local/s at contextB-00000001;2","","Hangup","","2015-02-26 03:12:03","2015-02-26 03:12:06","2015-02-26 03:12:10",7,4,"ANSWERED","DOCUMENTATION","1424920323.3",""
{noformat}

Much like the issue suggests, {{Local/s at contextA-00000000;2}} has 5 seconds of being Answered that is unaccounted for.

That being said, CDRs are generally intractable and prone to major issues when fixed in a release branch. As it is, I do not think we would attempt to alter their behaviour in that branch.

Testing with Asterisk 13 yields the following CDRs:

{noformat}
"B","","s","contextB",""""" <>","Local/s at contextB-00000001;2","","Hangup","","2015-02-26 03:18:48","2015-02-26 03:18:51","2015-02-26 03:18:54",6,3,"ANSWERED","DOCUMENTATION","1424920728.3",""
"A","","s","contextA",""""" <>","Local/s at contextA-00000000;2","Local/s at contextB-00000001;1","Dial","Local/s at contextB/n","2015-02-26 03:18:42","2015-02-26 03:18:42","2015-02-26 03:18:54",12,12,"ANSWERED","DOCUMENTATION","1424920722.1",""
"","","s","contextA",""""" <>","Local/s at contextA-00000000;1","","Echo","","2015-02-26 03:18:42","2015-02-26 03:18:42","2015-02-26 03:18:54",12,12,"ANSWERED","DOCUMENTATION","1424920722.0",""
{noformat}

Disregarding the Echo half of the Local channel (which shows up because it was Answered, and we don't hide these things any longer) we can see that {{Local/s at contextA-00000000;2}} has the full billing seconds - which is equal to the duration in this case since we are Answered immediately - and {{Local/s at contextB-00000001;2}} has 3 second of non-billing time, which matches our Wait time.

Since this is fixed in the great CDR overhaul that occurred in Asterisk 12, and since we are extremely unlikely to risk causing further risk in Asterisk 11 by modifying CDR behaviour, I'm going to close this out as "Fixed" in Asterisk 12+.

> callee chanel overwrites the caller cdr
> ---------------------------------------
>
>                 Key: ASTERISK-15488
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-15488
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Channels/chan_local
>            Reporter: eagvoz
>            Severity: Minor
>      Target Release: 12.0.0
>
>         Attachments: cdr_diff.pdf
>
>
> When
> # contextA answers the call
> # contextA dials contextB (with local /n of course)
> # contextB answers the call
> we expect (as like asterisk 1.2 and asterisk 1.4):
> - That CDR of contextA has its own billsec (cdrA) and contextB its own billsec (cdrB).
> But in asterisk 1.6 we see:
> - when contextB answers the call it sets the billsec of cdrA equals to the billsec of cdrB.
> *STEPS TO REPRODUCE*
> With the following context we will expect
> - The duration of "A" CDR will be the length of "thanks-for-calling-today" sound + the time of calling context B
> - The billsec of "A" CDR will be equals duration because there are no waittings.
> - The duration of "B" CDR will be 3 + the length of "goodbye" sound
> - The billsec of "B" CDR will be the length of "goodbye" sound
> {noformat}
> [contextA]
> exten => s,1,NoOp(I'm contextA)
> exten => s,n,Set(CDR(accountcode)=A)
> exten => s,n,Answer()
> exten => s,n,PlayBack(thanks-for-calling-today)
> exten => s,n,Dial(Local/s at contextB/n)
> [contextB]
> exten => s,1,NoOp(I'm contextB)
> exten => s,n,Set(CDR(accountcode)=B)
> exten => s,n,Wait(3)
> exten => s,n,Answer()
> exten => s,n,PlayBack(goodbye)
> exten => s,n,Hangup
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list