[SR-Users] Header Concatenation - is this a Bad Idea?

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 20 22:01:22 CEST 2015


Hello,

what are the operating systems? I haven't encountered any fragmentation
issues lately, Linux is able to handle UDP with payload up to 64kB.

Specific to your question, it may help in some cases to concatenate
headers, but the margin is rather small. If you know you are in a
controlled environment, then it can work for long time. Otherwise, just
adding some parameters to contact or having longer call-id, from/to tags
can get you over even with concatenated headers.

Anyhow, if you want to write and contribute it, you are welcome and it
will be accepted.

Sometimes, even without counting the Record-Route and Via headers the
packet can go over UDP MTU in case of video calls, not to say the SDPs
with ICE candidates and those specific to WebRTC.

Cheers,
Daniel

On 20/04/15 19:14, Nathan Angelacos wrote:
>
> Some udp INVITEs hit our network very close to the 1500 byte limit,
> and we add 2 Record-Routes before we pass the INVITE to the end user. 
> The packet gets truncated in the SDP; "usually" it still works.
>
> In our use case, I can't use gzip or TCP.  We are already using
> textops to convert to short-form headers where possible; we're also
> stripping unnecessary headers.
>
> So the next thing is to use RFC 3261 7.3 and 25.1 to concatenate the
> multiple Record-Routes into one longer line (same for Via, Contact,
> etc.):
>
> Record-Route: <sip:111.111.111.111;lr=on>
> Record-Route: <sip:99.99.99.99;lr=on>
> Record-Route: <sip:88.88.88.88:5060;lr>
> Record-Route: <sip:77.77.77.77;lr>
>
> becomes:
>
> Record-Route: <sip:111.111.111.111;lr=on>,
>   <sip:99.99.99.99;lr=on>,
>   <sip:88.88.88.88:5060;lr>
>   <sip:77.77.77.77;lr>
>
> That saves about 30 bytes - one can save more if putting all the
> values on 1 line without the cr\lf between.
>
>
> Doesn't look like there's any kamailio function in textops/x that
> makes this kind of thing easy; so before I start hacking away at the
> code...
>
> Our downstream uses freeswitch, and is willing to verify it works for
> him - but from a larger interop view, is this a Bad Idea(tm)?  Anyone
> have any experience with brand-name carrier SBC/Proxies that would
> choke on a header like that?
>
>
> Thanks!
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com




More information about the sr-users mailing list