在 Cisco CUCM 的双方电话上启用录制时处理邀请
Posted
技术标签:
【中文标题】在 Cisco CUCM 的双方电话上启用录制时处理邀请【英文标题】:Process INVITES when recording is enabled on both parties phones in Cisco CUCM 【发布时间】:2021-02-21 04:38:24 【问题描述】:我正在使用 jain-sip 实施 sip 服务器来处理呼叫事件,然后在 Cisco CUCM 中记录呼叫。当从启用录音的电话向禁用录音的电话拨打电话时,它可以正常工作,反之亦然。我收到两个邀请,每个远端和近端电话一个。
但是,当在两部手机上都启用了录音功能的两部手机之间进行通话(想想内部通话)时,我收到了四个邀请,并且无法区分远端和近端,也无法知道哪个邀请处理和忽略。两部手机都发送两个邀请,一个给自己,一个给另一部手机。通话结束时,发送四个 BYE。
处理这种情况的正确方法是什么?
以下是四个邀请;
INVITE sip:88888@192.168.1.x.x:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168..x.x:5060;branch=z9hG4bK2095e06f3b8;rport=58747
From: <sip:2400@192.168..x.x;x-nearend;x-refci=27425142;x-nearendclusterid=BR-Cluster2;x-nearenddevice=SEPD0C282D15AAF;x-nearendaddr=2400;x-farendrefci=27425141;x-farendclusterid=BR-Cluster2;x-farenddevice=sikander1;x-farendaddr=2701>;tag=519~00d3be95-408b-41c6-90cf-01ef66258892-27425149
To: <sip:88888@192.168.1.124>
Date: Mon, 09 Nov 2020 07:13:13 GMT
Call-ID: 6649000-fa81ec09-1f6-3001a8c0@192.168..x.x
Supported: timer,resource-priority,replaces,X-cisco-srtp-fallback,Geolocation
Min-SE: 120
User-Agent: Cisco-CUCM11.5
Allow: INVITE,OPTIONS,INFO,BYE,CANCEL,ACK,PRACK,UPDATE,REFER,SUBSCRIBE,NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence,kpml
Call-Info: <sip:192.168..x.x:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Session-ID: 00000000000000000000000000000000;remote=00000000000000000000000000000000
Cisco-Guid: 0107253760-0000065536-0000000011-0805415104
Session-Expires: 120
P-Asserted-Identity: <sip:2400@192.168..x.x>
Remote-Party-ID: <sip:2400@192.168..x.x>;party=calling;screen=yes;privacy=off
Contact: <sip:2400@192.168..x.x:5060;transport=tcp>;isFocus
Max-Forwards: 70
Content-Length: 0
-----------------------------------------
INVITE sip:88888@192.168.x.x:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168.x.x:5060;branch=z9hG4bK20a2071bec;rport=58747
From: <sip:2701@192.168.x.x;x-nearend;x-refci=27425141;x-nearendclusterid=BR-Cluster2;x-nearenddevice=sikander1;x-nearendaddr=2701;x-farendrefci=27425142;x-farendclusterid=BR-Cluster2;x-farenddevice=SEPD0C282D15AAF;x-farendaddr=2400>;tag=520~00d3be95-408b-41c6-90cf-01ef66258892-27425150
To: <sip:88888@192.168..x.x>
Date: Mon, 09 Nov 2020 07:13:13 GMT
Call-ID: 6649000-fa81ec09-1f7-3001a8c0@192.168..x.x
Supported: timer,resource-priority,replaces,X-cisco-srtp-fallback,Geolocation
Min-SE: 120
User-Agent: Cisco-CUCM11.5
Allow: INVITE,OPTIONS,INFO,BYE,CANCEL,ACK,PRACK,UPDATE,REFER,SUBSCRIBE,NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence,kpml
Call-Info: <sip:192.168..x.x:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Session-ID: 00000000000000000000000000000000;remote=00000000000000000000000000000000
Cisco-Guid: 0107253760-0000065536-0000000012-0805415104
Session-Expires: 120
P-Asserted-Identity: <sip:2701@192.168..x.x>
Remote-Party-ID: <sip:2701@192.168.1.x.x>;party=calling;screen=yes;privacy=off
Contact: <sip:2701@192.168.x.x:5060;transport=tcp>;isFocus
Max-Forwards: 70
Content-Length: 0
-------------------------
INVITE sip:88888@192.168..x.x:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168..x.x:5060;branch=z9hG4bK20b5eb383e9;rport=58747
From: <sip:2400@192.168..x.x;x-farend;x-refci=27425142;x-nearendclusterid=BR-Cluster2;x-nearenddevice=SEPD0C282D15AAF;x-nearendaddr=2400;x-farendrefci=27425141;x-farendclusterid=BR-Cluster2;x-farenddevice=sikander1;x-farendaddr=2701>;tag=521~00d3be95-408b-41c6-90cf-01ef66258892-27425155
To: <sip:88888@192.168..x.x>
Date: Mon, 09 Nov 2020 07:13:13 GMT
Call-ID: 6649000-fa81ec09-1f8-3001a8c0@192.168..x.x
Supported: timer,resource-priority,replaces,X-cisco-srtp-fallback,Geolocation
Min-SE: 120
User-Agent: Cisco-CUCM11.5
Allow: INVITE,OPTIONS,INFO,BYE,CANCEL,ACK,PRACK,UPDATE,REFER,SUBSCRIBE,NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence,kpml
Call-Info: <sip:192.168..x.x:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Session-ID: 00000000000000000000000000000000;remote=00000000000000000000000000000000
Cisco-Guid: 0107253760-0000065536-0000000013-0805415104
Session-Expires: 120
P-Asserted-Identity: <sip:2400@192.168.x.x>
Remote-Party-ID: <sip:2400@192.168..x.x>;party=calling;screen=yes;privacy=off
Contact: <sip:2400@192.168..x.x:5060;transport=tcp>;isFocus
Max-Forwards: 70
Content-Length: 0
-------------------------
INVITE sip:88888@192.168.1.124:5060 SIP/2.0
Via: SIP/2.0/TCP 192.168..x.x:5060;branch=z9hG4bK20c2f880eb2;rport=58747
From: <sip:2701@192.168..x.x;x-farend;x-refci=27425141;x-nearendclusterid=BR-Cluster2;x-nearenddevice=sikander1;x-nearendaddr=2701;x-farendrefci=27425142;x-farendclusterid=BR-Cluster2;x-farenddevice=SEPD0C282D15AAF;x-farendaddr=2400>;tag=522~00d3be95-408b-41c6-90cf-01ef66258892-27425156
To: <sip:88888@192.168.1.124>
Date: Mon, 09 Nov 2020 07:13:13 GMT
Call-ID: 6649000-fa81ec09-1f9-3001a8c0@192.168..x.x
Supported: timer,resource-priority,replaces,X-cisco-srtp-fallback,Geolocation
Min-SE: 120
User-Agent: Cisco-CUCM11.5
Allow: INVITE,OPTIONS,INFO,BYE,CANCEL,ACK,PRACK,UPDATE,REFER,SUBSCRIBE,NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence,kpml
Call-Info: <sip:192.168..x.x:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Session-ID: 00000000000000000000000000000000;remote=00000000000000000000000000000000
Cisco-Guid: 0107253760-0000065536-0000000014-0805415104
Session-Expires: 120
P-Asserted-Identity: <sip:2701@192.168..x.x>
Remote-Party-ID: <sip:2701@192.168..x.x>;party=calling;screen=yes;privacy=off
Contact: <sip:2701@192.168..x.x:5060;transport=tcp>;isFocus
Max-Forwards: 70
Content-Length: 0
【问题讨论】:
【参考方案1】:我想一般来说,这个想法可能是记录所有 4 个通话腿 - 即“相同”通话的双方。一个示例可能是分析双方在录制时双方体验的语音质量的软件,以防遇到 RTP 流问题或其他异常。编解码器差异或转码可能会导致同一 2 方通话的一个“版本”听起来更好/更差(或具有更大的存储要求)。 如果您不关心该级别的 RTP 数据,您可能需要检查 x-refci 和其他 From: 字段,以便您可以在事后或事后对它们进行“重复数据删除”...
【讨论】:
好建议。我试图忽略重复的邀请,但这看起来不是一个好主意。我现在正在录制所有四条腿,并从每边选择两条腿,然后根据 x-refci 将它们传递给音频播放器。将来我可能会添加一个音频质量分析器来选择质量最好的音频作为最终录音。以上是关于在 Cisco CUCM 的双方电话上启用录制时处理邀请的主要内容,如果未能解决你的问题,请参考以下文章
Cisco CMS Ad-Hoc Conferencing with CUCM
《跟菜鸟学Cisco UC部署实战》-第 1 章 规划(免费视频)