Csipsimple Or Imsdroid :invite message too long for 3g - it gets fragmented

     在研究voip方面时,有些人发现切换到某些网络情况下,语音视频通话会有问题,Invite包对方无法接收,无法正常建立通话,但是可以正常注册,这时候我们应该考虑下是不是Invite包没有发送出去,获取发送出去对方无法正常接收?首先查看服务器Sip报文消息,发现几乎同一时刻有很多个Invite包,但是就是始终没返回100 Trying或者180 Ring、200 OK数据包回来,是不是觉得很奇怪!我们这时候就需要看下为什么Sip客户端会发送如此多的Invite包?如果确认代码没问题,这时候应该抓包看看,我们抓下包看看:


我了勒个去,什么情况!看到关键字木有:Fragmented。google之:


问题原因找到了。Sip的Invite包太大了,超过路由器的MTU大小,被路由Fragmented。接收端根本无法识别到!我们搜索下开源项目的issues,发现这个问题大有人在。

https://code.google.com/p/imsdroid/issues/detail?id=101


Reported by  ilkerakt...@gmail.comNov 11, 2010
What steps will reproduce the problem?
1. start video call on 3g network
2. invite message gets fragmented on Dell Streak 3g interface
3. if only voice call is started, invite message is short and doesnot get fragmented

What is the expected output? What do you see instead?

invite message gets fragmented on Dell Streak 3g interface

What version of the product are you using? On what operating system?

latest version. Android 2.2

Please provide any additional information below.

if  we can shorten the invite message , packet will not be bigger than MTU and won't be fragmented.

Nov 12, 2010
#1 chris.ve...@gmail.com
Is TCP support under consideration?
Nov 12, 2010
Project Member #2 boss...@yahoo.fr
(No comment was entered for this change.)
Status: Accepted 
Nov 12, 2010
#3 ilkerakt...@gmail.com
extra notes:

I tried decreasing packet size by only adding 1 video 1 audio codec.
Also disabled all QoS options.
Unfortunately packet size is still big.

TCP is not supported on my proxy server.


Nov 18, 2010
#4 ilkerakt...@gmail.com
Hi,

Any news on this ?

Btw, I am willing to change my 3g interface MTU settings. But  I don't know how.
How can I see the current mtu setting and change it ?

May 3, 2011
#5 ilkerakt...@gmail.com
hi there,

any update about this ?

May 4, 2011
#6 ilkerakt...@gmail.com
maybe we could have better chance in Imsdroid 2.
But is there a compiled version of Imsdroid 2 with codec g729 ?

Dec 28, 2011
#7 qiufei...@gmail.com
I also found this problem! the invite message is too long to transfer to ims client is 3G network. you can solve this problem by reduce the length of invite packets through removing of the useless infomation added by imsdroid. The other resolution is using sip message compression to make message not exceed MTU or using the two methos at the same time. I have tried and successed, good luck to you! 
Dec 7, 2012
#8 deepali....@gmail.com
hi qiufei230

can you guide us how did you reduce the length of the INVITE message.
As we dont have access to the ngn stack related code we are unable to reduce the INVITE length for imsdroid.
Will appreciate any help on this

 

我们可以总结出解决方法1、路由器MTU大小设置:不切实际

                                            2、限制Invite包大小,尽量减少不必要的参数传递,特别是SDP部分,我做Csipsimple就是简单的去掉其他编码,只保留一个语音编码Silk,去掉不必要的头部,减少SDP包。而IMSDroid通过去掉Header部分不需要的东西,但是发现这样还不够的,IMSdroid的SDP包太大了,仅仅去掉Invite的头部行不通,还需要编译Doubango源码,修改SDP包信息传递,去掉不必要的东西。





重新编译成so,

编译IMSDroid重新发起邀请,截包看Invite大小:

包明显减少很多,并且正常接通。
看过Linphone,接口比较多,有一个设置MTU的接口,不需要编译底层既可成功解决。
                3、改用TCP传输或者使用SipComp(信令压缩技术),SipComp这个IMSDroid有这个功能选项,但是貌似用不了,有问题,各位尝试下。

imsdroid 是全功能的SIP / IMS的客户端,它基于doubango框架开发的app,doubango是目前世界上最好的3GPP IMS/RCS 嵌入式桌面系统框架,该框架提供了一套独特的功能,包括音频/视频通话、内容共享、消息、会议、通讯录等。 官网地址:http://code.google.com/p/imsdroid/ 组件 1、Boghe IMS/ RCS Windows客户端 2、IMSDroid IMS/ RCS Android客户端(使用NGN堆栈) 3、iDoubs IMS/ RCS iOS客户端(iPhone,iPad和iPod Touch) 4、OpenVCS 开源视频会议服务器,用于管理多点控制单元(MCU),每个MCU可以处理多达64人参与 5、Flash2IMS 使用Adobe Flash 的SIP/ IMS网关 支持功能 1、SIP ( RFC 3261 3GPP TS 24.229 REL- 9 ) 2、 IPv4 IPv6 TCP UDP 3、信号编码 SigComp (RFC 3320 、3485、 4077 、4464 、4465、4896、5049、5112、1951) 4、通讯录 5、GSMA 通信 6、 语音(GSMA VoLTE) 7、GSMA RCS and GSMA VoLTE 8 、IMS 登陆 MD5加密 9、3GPP 10、服务路由探索 11、注册事件监听(注册事件、拨打事件、来电事件、消息事件。。。) 12、3GPP IP ( 3GPP TS 23.038 、24.040 、 24.011、 24.341、24.451短信) 13、语音呼叫( G729AB1 、 AMR - NB 、iLBC、 GSM 、 PCMA 、 PCMU、 Speex NB ) 14、视频通话( H264、MP4V - ES 、Theora、 H.263 、 H.263 -1998 、H.261 ) 15、双音多频DTMF ( RFC 4733 ) 16、解决网络延迟和阻塞技术QoS negotiation using Preconditions (RFC 3312, 4032 and 5027 17、SIP会话定时器( RFC 4028 ) 18、临时响应( PRACK ) 19、通信保持(3GPP TS 24.610 ) 20、消息等待指示( 3GPP TS 24.606 ) 21、E.164号码呼叫通过使用ENUM协议( RFC 3761 ) 22、NAT穿越 23、一对一和群组聊天
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值