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

Nathan Angelacos nangel at nothome.org
Mon Apr 20 19:14:34 CEST 2015


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!



More information about the sr-users mailing list