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!
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@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel,
On 04/20/2015 04:01 PM, Daniel-Constantin Mierla wrote:
what are the operating systems? I haven't encountered any fragmentation issues lately, Linux is able to handle UDP with payload up to 64kB.
Thank you very much for the reply. Both sides are Linux, and yes, fragmentation over the wire is working as expected.
n00b mistake: "udp 5060" filter does not capture ip fragments.
We're now working with the customer investigating possible firewall issues.
Alex,
Thanks for the tip! The following does nearly exactly what I was proposing.
loadmodule "textops.so"
... remove_hf ("Record-Route"); insert_hf ("Record-Route: $(hdr(Record-Route)[*])\r\n");
Thanks again.
On Monday 20 April 2015, Nathan Angelacos wrote:
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.):
Doesn't look like there's any kamailio function in textops/x that makes this kind of thing easy;
Why would you want to use textops? $(hdr(Record-Route[*])) seems to do the trick.