Share

Kamailio (OpenSER) SIP server

Tracker: Patches

5 Compressing outgoing via-hf-lines to avoid ip-fragmentation - ID: 1755402
Last Update: Comment added ( marcushunger )

Hi,
while looking for a way to reduce total-packet-sizes in order to avoid
ip-fragementation, I noticed that a lot of space is 'wasted' with
via-information in requests, that UACs actually dont need for replying, but
which is needed to route the replies on the proxy.

Especially in setups with a lot of proxies in a row (four or more), the
amount of used bytes for via-hfs is huge (the big "Via: SIP/2.0/UDP",
ip-adresses and branch-tags). Every of these lines is only required at a
specific hop and the rest of them is ignored.

So the idea is that a lot of this data can be reduced transparently at the
outgoing-proxy before sending the request to the uac and to restore the
reduced data in the reply coming from the uac.

To let this work statelessly, all the information must be stored in the
outgoing request, but because most of the data is ignored anyway at the
uac, we can change the coding of it to save bytes.

I implemented a way of doing this by patching udp_send(). An outgoing
request is disassembled, the unneeded vias are aggregated, pushed through
zlib, coded with base64 and appended to the end of the one required
via-hf.

The decoding is handled in udp_rcv_loop() before calling receive_msg.

I tested this successfully at stateless proxies loadbalancing in front of a
register-proxy. The UACs were Grandstream GXP2000.

The whole thing saves maybe about 70 or 80 bytes, which doesnt sound much,
but these could make a differences when you're trying to stay below a mtu.


Anyone interrested in discussing the whole mtu, ip/udp-fragmentation issue?


Marcus Hunger ( marcushunger ) - 2007-07-17 10:53

5

Open

None

Nobody/Anonymous

core

ver 1.2.x

Public


Comments ( 2 )




Date: 2008-04-17 07:04
Sender: marcushunger


Hi Carsten,

I'm afraid but I didn't do any further testing with that patch. IIRC it
worked with some other UACs but I am not sure which these were. I had no
negative tests. All tested clients worked.

The whole thing didn't go into production, nor was it ported since I was
sure it would not make its way into openser and I try to stick to the
releases in production.


Date: 2008-04-16 12:08
Sender: carstenbock


Hi Marcus,

You're patch/attempt looks quite interesting and I am thinking about doing
some more tests with it/ porting it to the current OpenSER 1.3-Trunk. One
interesting point is ofcourse avoiding UDP-Fragmentation, but another
interesting point might be a (more/less) weak topology hiding...
I have some questions:
- is there an 1.3 / SVN-Trunk Port available?
- did you test this with other phones? e.g. FritzBoxes, Snoms, Nokias,
etc.?
- is it tested?
- Is it running somewhere in production?
- Any "real-life" experiences (positive/negative)?

Thank you for your time,
Carsten




Log in to comment.

Attached File ( 1 )

Filename Description Download
viacompression.patch Download

Change ( 1 )

Field Old Value Date By
File Added 237330: viacompression.patch 2007-07-17 10:53 marcushunger