On 04/20/2009 06:03 PM, Sandro Bordacchini wrote:
Hi all.
I am doing some test about tcp/udp transport protocols in SIP and IP fragmentation.
I would like to test this behaviour, as stated in par. 18.1.1 of rfc3261:
If a request is within 200 bytes of the path MTU, or if it is larger than 1300 bytes and the path MTU is unknown, the request MUST be sent using an RFC 2914 [43] congestion controlled transport protocol, such as TCP. If this causes a change in the transport protocol from the one indicated in the top Via, the value in the top Via MUST be changed. This prevents fragmentation of messages over UDP and provides congestion control for larger messages. However, implementations MUST be able to handle messages up to the maximum datagram packet size.
To do this, I am running a OpenSer 1.3.2 with a "default" configuration (and very simple: no accounting, no auth, no DB) and I have two SIP phones registered on that server (for example, ext. 100 and ext. 101).
When 100 calls 101, the INVITE reaches the OpenSer that appends some "dummy" headers (I have added some append_hf in the route), just to let the message be bigger than the MTU. The INVITE is routed towards 101 with UDP protocol and I have IP fragmentation.
Do you have some hint to get the OpenSer work as described in the RFC (i.e. switch automatically to TCP)? Or is this only possible with UACs and not with proxies?
old openser/kamailio does not do the transport conversion automatically. You can do it manually by forcing outgoing transport, but is hard to guess the size of the outgoing message from the config.
However, next release will have it -- sip-router.org core has this functionality already. See: http://sip-router.org/wiki/core-cookbook/devel#udp_mtu http://sip-router.org/wiki/core-cookbook/devel#udp_mtu_try_proto_proto
You can get the Sip-Router code (which includes not kamailio/openser modules but lacks some core functions and parameters) from GIT: http://sip-router.org/wiki/git/sip-router-repository
That core cookbook is work in progress, you can see kamailio/openser version at: http://www.kamailio.org/dokuwiki/doku.php/core-cookbook:devel
Cheers, Daniel