[asterisk-bugs] [JIRA] (ASTERISK-28610) CDR fields in second leg use wrong variables from first leg

Schneur Rosenberg (JIRA) noreply at issues.asterisk.org
Thu Nov 14 05:04:32 CST 2019


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

Schneur Rosenberg commented on ASTERISK-28610:
----------------------------------------------

Ok, so for testing purposes I created a very simple context that the call starts there, all it does it it sends the call to a DISA, I have the same code on a server running Asterisk 11.25.3 and on a server running Asterisk 17, the only difference is that on the new server I used CHANNEL(accountcode) instead of CDR here is the dialplan

exten => _12125551212,1,set(CDR(accountcode)=testAccount)    
exten => _12125551212,n,disa(no-password,usa_customer_out_full)

I placed a call on both systems and here is the first leg in the CDR of the old system 
             id: 100561913
       calldate: 2019-11-14 05:32:39
           clid:
            src: blankedOut
            dst: 18004312121
       dcontext: opensips_incoming
        channel: SIP/opensipsout-00109ad2
     dstchannel:
        lastapp: DISA
       lastdata: no-password,usa_customer_out_full
       duration: 8
        billsec: 8
    disposition: ANSWERED
       amaflags: 3
    accountcode: testAccount
      userfield:
       uniqueid: 1573727559.1233080
    destination: NULL
           cost: NULL
           rate: NULL
          total: NULL
  RecordingFile:
    IncomingDid: NULL
       ServerIP: NULL
       SourceIP: NULL
   IncomingPlan: NULL
       fullcost: NULL
  wholesaleRate: NULL
 wholesaleTotal: NULL
   incomingRate: NULL
  incomingTotal: NULL
includedMinutes: NULL

Here is leg 2 which represents the outgoing call
             id: 100561916
       calldate: 2019-11-14 05:32:48
           clid:
            src: blankedOut
            dst: 18004312121
       dcontext: usa_customer_out_full
        channel: SIP/opensipsout-00109ad2
     dstchannel: SIP/verizonDirect-00109adb
        lastapp: Dial
       lastdata: sip/verizonDirect/18004312121
       duration: 4
        billsec: 4
    disposition: ANSWERED
       amaflags: 3
    accountcode: testAccount
      userfield:
       uniqueid: 1573727559.1233080
    destination: USA.
           cost: NULL
           rate: 0.0136
          total: 0.00090666666666667
  RecordingFile:
    IncomingDid: NULL
       ServerIP: blankedOut
       SourceIP: NULL
   IncomingPlan: NULL
       fullcost: 0.00090666666666667
  wholesaleRate:
 wholesaleTotal: 0
   incomingRate: NULL
  incomingTotal: NULL
includedMinutes: NULL

So far everything is fine, but once I run the same call on the Asterisk 17 server both legs get combined, which means I cant bill for both legs if neccessary, here is the CDR 

             id: 100562375
       calldate: 2019-11-14 10:41:41
           clid:
            src: blankedOut
            dst: 18004312121
       dcontext: usa_customer_out_full
        channel: SIP/opensipsout-00006cfb
     dstchannel: SIP/verizonDirect-00006d02
        lastapp: Dial
       lastdata: sip/verizonDirect/18004312121
       duration: 4
        billsec: 4
    disposition: ANSWERED
       amaflags: 3
    accountcode: testAccount
      userfield:
       uniqueid: 1573728092.28103
    destination: USA.
           cost: NULL
           rate: 0.0136
          total: 0.00090666666666667
  RecordingFile:
    IncomingDid: NULL
       ServerIP: blanked out
       SourceIP: NULL
   IncomingPlan: NULL
       fullcost: 0.00090666666666667
  wholesaleRate:
 wholesaleTotal: 0
   incomingRate: NULL
  incomingTotal: NULL
includedMinutes: NULL



> CDR fields in second leg use wrong variables from first leg
> -----------------------------------------------------------
>
>                 Key: ASTERISK-28610
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28610
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_cdr, Applications/app_dial
>    Affects Versions: 17.0.0
>         Environment: Debian 9
>            Reporter: Schneur Rosenberg
>            Assignee: Schneur Rosenberg
>            Severity: Minor
>
> Hi, I have a platform that when called through a outside DID the caller receives a DISA and can complete a call to a outside line, the system creates 2 legs in the CDR’s one for the incoming channel and one for the dial command to the outside line.
> I recently upgraded from version 11 to 17 and I’ve noticed that the second leg does not store the correct info in the dst , dcontext and channel fields, it copies the data from the original leg instead of using the info from the second leg, and for example if the first leg had the did number in the dst field, then the second field will have the same info and therefore I get almost zero info on the destination of the call besides some hints in the lastdata field, and hence I can’t properly bill for these calls.
> Scott Rosenberg



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



More information about the asterisk-bugs mailing list