在研究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
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.
(No comment was entered for this change.)
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.
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 ?
hi there, any update about this ?
maybe we could have better chance in Imsdroid 2. But is there a compiled version of Imsdroid 2 with codec g729 ?
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!
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包信息传递,去掉不必要的东西。