本文介绍了Asterisk 13.4 cdr 引擎每次调用创建 2 条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这真的开始变得烦人了.

This is really starting to get annoying.

我从 2007 年开始使用 Asterisk 1.4 来操作一个完美的 PBX,它每次通话都会创建一个单 CDR,就像任何其他版本的 asterisk 一样.

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

推荐答案

我为 asterisk 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.

补丁asterisk-13.6.0/main/cdr.c ./asterisk13_cdr.patch

下载:http://miho.org.ua/download/asterisk/asterisk13_cdr_patch.压缩包

附言如果此补丁对您有帮助,或者您会发现错误,请写在这里 =)

P.S. Write here if this patch help you or if you'll find bugs =)

这篇关于Asterisk 13.4 cdr 引擎每次调用创建 2 条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 19:58