[OpenSER-Devel] [ openser-Patches-1755402 ] Compressing outgoing via-hf-lines to avoid ip-fragmentation

SourceForge.net noreply at sourceforge.net
Tue Jul 17 12:53:49 CEST 2007


Patches item #1755402, was opened at 2007-07-17 12:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1755402&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Marcus Hunger (marcushunger)
Assigned to: Nobody/Anonymous (nobody)
Summary: Compressing outgoing via-hf-lines to avoid ip-fragmentation

Initial Comment:
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?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1755402&group_id=139143



More information about the Devel mailing list