> 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
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to