问题描述
这真的开始变得烦人了.
This is really starting to get annoying.
自2007年以来,我一直在使用Asterisk 1.4来操作无懈可击的PBX,并且它会像每次使用其他版本的asterisk一样,为每个呼叫创建一个单CDR.
I´m using Asterisk 1.4 since 2007 to operate a flawless PBX, and it creates a SINGLE CDR per call, like any other version of asterisk would.
昨天我认为可以升级并获得Asterisk 13.4.
Yesterday I figured an upgrade would be ok and got Asterisk 13.4.
这该死的事情是每个呼叫创建2个CDR ...一个代表拨号尝试..另一个代表已连接的呼叫和初始拨号
This damn thing is creating 2 CDRs per call... one representing the dial attempt .. and another including both the connected call and the initial dial
我不知道在哪里将CDR引擎配置为正常工作...也就是说,每个通话记录一个CDR.不是2个!
I don't know where to configure the CDR engine to behave normally... that is, to record A SINGLE CDR per call.. NOT 2!!
有什么想法吗?
PS :(不,我没有更改代码,不,我没有配置任何与普通cdr.conf
不同的行)
PS: (No, I did not change my code, no I did not config any specific lines out of the ordinary cdr.conf
)
这是CDR引擎的调试输出:
Here is the debug output of the CDR engine:
0x7f51f40009a8 - Created CDR for channel SIP/900100-00000002
0x7f51f40009a8 - Transitioning CDR for SIP/900100-00000002 from state NONE to Single
0x7f51f4002bc8 - Created CDR for channel SIP/vox-00000003
0x7f51f4002bc8 - Transitioning CDR for SIP/vox-00000003 from state NONE to Single
Dial Begin message for SIP/900100-00000002, SIP/vox-00000003: 1448665204.00639317
0x7f51f40009a8 - Processing Dial Begin message for channel SIP/900100-00000002, peer SIP/vox-00000003
0x7f51f40009a8 - Updated Party A SIP/900100-00000002 snapshot
0x7f51f40009a8 - Updated Party B SIP/vox-00000003 snapshot
0x7f51f40009a8 - Transitioning CDR for SIP/900100-00000002 from state Single to Dial
0x7f51f4002bc8 - Processing Bridge Leave for SIP/vox-00000003
0x7f51f4002bc8 - Transitioning CDR for SIP/vox-00000003 from state Bridged to Finalized
0x7f51f40009a8 - Transitioning CDR for SIP/900100-00000002 from state Bridged to Finalized
0x7f51f4002bc8 - Beginning finalize/dispatch for SIP/vox-00000003
0x7f51f4002bc8 - Dispatching CDR for Party A SIP/vox-00000003, Party B <none>
Bridge Leave message for SIP/900100-00000002: 1448665215.00246400
0x7f51f4003da8 - Created CDR for channel SIP/900100-00000002
0x7f51f4003da8 - Transitioning CDR for SIP/900100-00000002 from state NONE to Single
0x7f51f4003da8 - Set answered time to 1448665215.248071
0x7f51f4003da8 - Transitioning CDR for SIP/900100-00000002 from state Single to Finalized
0x7f51f40009a8 - Beginning finalize/dispatch for SIP/900100-00000002
0x7f51f40009a8 - Dispatching CDR for Party A SIP/900100-00000002, Party B SIP/vox-00000003
推荐答案
我为星号13创建了补丁=)简而言之,cdr的算法保持不变,从而消除了各种错误.如果CDR记录是最新的,则我们将其写入.最后一条记录正是我们需要的.在版本13.4和13.6上进行了测试.
I created the patch for asterisk 13 =)In short, the algorithm of the cdr remained the same, which eliminates various errors. If CDR record is the most latter, then we write it. And the last record is exactly what we need. Tested on version 13.4 and 13.6.
安装:修补星号源代码并构建/重建星号.
Install:Patch asterisk source code and build/rebuild asterisk.
patch asterisk-13.6.0/main/cdr.c ./asterisk13_cdr.patch
下载: http://miho.org.ua/download/asterisk/asterisk13_cdr_patch. zip
P.S.如果此修补程序对您有帮助,或者如果您发现错误,请在此处写=)
P.S. Write here if this patch help you or if you'll find bugs =)
这篇关于Asterisk 13.4 CDR引擎每个调用创建2条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!