在研究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包信息傳遞,去掉不必要的東西。