<div dir="ltr">I'm having an issue with CDR. Basically, I expect to have all "legs" of a call having the same linkedid and differing only by the sequence value. That does happen, but I'm getting null dst values after doing an attended transfer.<div><br></div><div>I'm not sure if this is a bug or I'm doing something wrong. I'm running Asterisk 13.2.0.</div><div><br></div><div>Here's the console log, step by step:</div><div><br></div><div>First, I receive a call from 5491549116 on extension 7051 (DID 5421047051):</div><div><br></div><div><div><font face="monospace, monospace">[Mar 26 12:11:04]   == Using SIP RTP TOS bits 184</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]   == Using SIP RTP CoS mark 5</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Executing [5421047051@restrito:1] Goto("SIP/pabx-e1-00000252", "interno,7051,1") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Goto (interno,7051,1)</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Executing [7051@interno:1] Macro("SIP/pabx-e1-00000252", "stdexten,7051,SIP/7051") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Executing [s@macro-stdexten:1] NoOp("SIP/pabx-e1-00000252", "STDEXTEN: Arg1 = 7051   Arg2 = SIP/7051   Arg3 = ") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Executing [s@macro-stdexten:2] Dial("SIP/pabx-e1-00000252", "SIP/7051,45,tT") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]   == Using SIP RTP TOS bits 184</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]   == Using SIP RTP CoS mark 5</font></div><div><font face="monospace, monospace">[Mar 26 12:11:04]     -- Called SIP/7051</font></div><div><font face="monospace, monospace">[Mar 26 12:11:05]     -- SIP/7051-00000253 is ringing</font></div><div><font face="monospace, monospace">[Mar 26 12:11:11]     -- SIP/7051-00000253 answered SIP/pabx-e1-00000252</font></div><div><font face="monospace, monospace">[Mar 26 12:11:11]     -- Channel SIP/pabx-e1-00000252 joined 'simple_bridge' basic-bridge <b1c97b75-bd5f-4762-96dd-7aa68c472827></font></div><div><font face="monospace, monospace">[Mar 26 12:11:11]     -- Channel SIP/7051-00000253 joined 'simple_bridge' basic-bridge <b1c97b75-bd5f-4762-96dd-7aa68c472827></font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">Now, extension 7051 places the call on hold and calls 7003, who answers:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="monospace, monospace">[Mar 26 12:11:17]     -- Started music on hold, class 'default', on channel 'SIP/pabx-e1-00000252'</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]   == Using SIP RTP TOS bits 184</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]   == Using SIP RTP CoS mark 5</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]     -- Executing [7003@ddi:1] Macro("SIP/7051-00000254", "stdexten,7003,SIP/7003") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]     -- Executing [s@macro-stdexten:1] NoOp("SIP/7051-00000254", "STDEXTEN: Arg1 = 7003   Arg2 = SIP/7003   Arg3 = ") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]     -- Executing [s@macro-stdexten:2] Dial("SIP/7051-00000254", "SIP/7003,45,tT") in new stack</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]   == Using SIP RTP TOS bits 184</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]   == Using SIP RTP CoS mark 5</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]     -- Called SIP/7003</font></div><div><font face="monospace, monospace">[Mar 26 12:11:20]     -- SIP/7003-00000255 is ringing</font></div><div><font face="monospace, monospace">[Mar 26 12:11:25]     -- SIP/7003-00000255 answered SIP/7051-00000254</font></div><div><font face="monospace, monospace">[Mar 26 12:11:25]     -- Channel SIP/7051-00000254 joined 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div><div><font face="monospace, monospace">[Mar 26 12:11:25]     -- Channel SIP/7003-00000255 joined 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div></div><div><br></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Then, extension 7051 transfers the call to 7003, who hangs up after a few seconds:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="monospace, monospace">[Mar 26 12:11:32]     -- Channel SIP/pabx-e1-00000252 left 'simple_bridge' basic-bridge <b1c97b75-bd5f-4762-96dd-7aa68c472827></font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]     -- Channel SIP/7051-00000254 left 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]     -- Channel SIP/pabx-e1-00000252 swapped with SIP/7051-00000254 into 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]     -- Stopped music on hold on SIP/pabx-e1-00000252</font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]     -- Channel SIP/7051-00000253 left 'simple_bridge' basic-bridge <b1c97b75-bd5f-4762-96dd-7aa68c472827></font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]   == Spawn extension (macro-stdexten, s, 2) exited non-zero on 'SIP/7051-00000254' in macro 'stdexten'</font></div><div><font face="monospace, monospace">[Mar 26 12:11:32]   == Spawn extension (ddi, 7003, 1) exited non-zero on 'SIP/7051-00000254'</font></div><div><font face="monospace, monospace">[2015-03-26 12:11:32] WARNING[1561][C-0000015c]: channel.c:5070 ast_write: Codec mismatch on channel SIP/pabx-e1-00000252 setting write format to slin from alaw native formats (alaw)</font></div><div><font face="monospace, monospace">[Mar 26 12:11:40]     -- Channel SIP/pabx-e1-00000252 left 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div><div><font face="monospace, monospace">[Mar 26 12:11:40]   == Spawn extension (macro-stdexten, s, 2) exited non-zero on 'SIP/pabx-e1-00000252' in macro 'stdexten'</font></div><div><font face="monospace, monospace">[Mar 26 12:11:40]   == Spawn extension (interno, 7051, 1) exited non-zero on 'SIP/pabx-e1-00000252'</font></div><div><font face="monospace, monospace">[Mar 26 12:11:40]     -- Channel SIP/7003-00000255 left 'simple_bridge' basic-bridge <f4fb9d99-24b9-4d3c-9b63-41a1b84484b2></font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">So far so good, except that when I check the CDR lines generated, this is what I get:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><div><font face="monospace, monospace">mysql> select calldate, uniqueid, linkedid, sequence, src, dst, duration, disposition, channel, dstchannel from cdr where uniqueid = '1427382664.963';</font></div><div><font face="monospace, monospace">+---------------------+----------------+----------------+----------+------------+------+----------+-------------+----------------------+-------------------+</font></div><div><font face="monospace, monospace">| calldate            | uniqueid       | linkedid       | sequence | src        | dst  | duration | disposition | channel              | dstchannel        |</font></div><div><font face="monospace, monospace">+---------------------+----------------+----------------+----------+------------+------+----------+-------------+----------------------+-------------------+</font></div><div><font face="monospace, monospace">| 2015-03-26 12:11:04 | 1427382664.963 | 1427382664.963 |      645 | 5491549116 | 7051 |       27 | ANSWERED    | SIP/pabx-e1-00000252 | SIP/7051-00000253 |</font></div><div><font face="monospace, monospace">| 2015-03-26 12:11:32 | 1427382664.963 | 1427382664.963 |      649 | 5491549116 |      |        7 | ANSWERED    | SIP/pabx-e1-00000252 | SIP/7003-00000255 |</font></div><div><font face="monospace, monospace">+---------------------+----------------+----------------+----------+------------+------+----------+-------------+----------------------+-------------------+</font></div><div><font face="monospace, monospace">2 rows in set (0.62 sec)</font></div></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Notice how the dst field on the second line is missing.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Am I doing something wrong here or this is a bug?</font></div></div>