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 [email protected]Nov 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 [email protected]
Is TCP support under consideration?
Nov 12, 2010
Project Member #2 [email protected]
(No comment was entered for this change.)
Status: Accepted 
Nov 12, 2010
#3 [email protected]
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 [email protected]
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 [email protected]
hi there,

any update about this ?

May 4, 2011
#6 [email protected]
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 [email protected]
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 [email protected]
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有這個功能選項,但是貌似用不了,有問題,各位嘗試下。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章