Hi,
You can bind your stack exclusively to UDP, if you use the parameter
“transport=udp” in the tag NUTAG_M_PARAMS.
Hope this helps,
Mikhail
From: ext Aleksander Morgado [mailto:sofia-sip-de...@aleksander.es]
Sent: Friday, January 22, 2010 5:26 PM
To: sofia-sip-devel
Subject: Re: [Sofia-sip-devel] SIP request through TCP if size is longer than
threshold
When a SIP request long enough is created, like with a large payload, Sofia-SIP
automatically tries to send the request through TCP instead of UDP. I
understand that if packet size is more than the maximum UDP packet size allowed
in the physical network it will not be sent.
But can this behavior be disabled so that instead of trying TCP, the UDP
request creation *fails*?
This max limit for SIP requests is 1300, as found in some comments in sofia-sip
source:
* Maximum size of outgoing UDP request.
*
* The maximum UDP request size is used to control use of UDP with overtly
* large messages. The IETF requires that the SIP requests over 1300 bytes
* are sent over congestion-controlled transport such as TCP. If a SIP
* message size exceeds the UDP MTU, the TCP is tried instead of UDP. (If
* the TCP connection is refused, the stack reverts back to UDP).
Anyway, another option instead of automatically sending it from TCP is to tell
the app that the UDP request cannot be sent, so that the application can handle
it and split the request in several less-sized UDP packets.
I am thinking in large NOTIFYs for example. So if sofia-sip detects that NOTIFY
size is greater than 1300 bytes, depending on the configuration of the NTA we
could either send the packet using TCP as IETF requires, or tell the
application that size is too big so that it can split the NOTIFY in several
ones.
How difficult could it be to implement this in sofia-sip?
Cheers,
-Aleksander
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel