#41 [nat_traversal] Making OPTIONS/NOTIFY lighter

trunk
closed-wont-fix
modules (179)
5
2008-12-05
2008-11-26
No

I attach a patch that makes NOTIFY/OPTIONS sent by "send_keepalive()" function lighter. Basically I use short header names and make shorter the Call-Id.

The original message has ~ 252 chars.
The modified message has ~ 198 chars.

Not too much anyway. I wonder if the server_IP could also be replaced in From and To headers, and use "nat" as hostpart or whatever.

Discussion

  • Iñaki Baz Castillo

    Humm, I've realized that my patch causes an error:

    ERROR:core:forward_reply: no 2nd via found in reply

    I don't see that error. It occurs when OpenSIPS sends (sucesfully) the keepalive NOTIFY and the user replies:

    -------------
    NOTIFY sip:USER_IP:62356 SIP/2.0
    v: SIP/2.0/UDP PROXY_IP:5060;branch=0
    f: sip:keepalive@PROXY_IP;tag=e3e052d
    t: sip:USER_IP:62356
    i: 28d6327a
    CSeq: 1 NOTIFY
    Event: keep-alive
    l: 0

    SIP/2.0 400 Contact header missing
    Via: SIP/2.0/UDP PROXY_IP:5060;branch=0
    To: <sip:USER_IP:62356>;tag=giwjk
    From: <sip:keepalive@PROXY_IP>;tag=e3e052d
    Call-ID: 28d6327a
    CSeq: 1 NOTIFY
    Server: Twinkle/1.3
    Content-Length: 0
    ------------

    What could be the problem? does it really exist?

     
  • Dan Pascu

    Dan Pascu - 2008-11-27

    The gain is size is minimal and doesn't justity the loss of readability.
    Plus by changing the way you build the call-id you made it impossible for it to identify the replies.

     
  • Dan Pascu

    Dan Pascu - 2008-11-27
    • assigned_to: nobody --> dan_pascu
    • status: open --> closed-wont-fix
     
  • Bogdan-Andrei Iancu

    Dan,

    maybe re-using the short naming of the headers (without changing the callid) will spare some bandwidth - if you consider the amount of pings and how often you do it.

    Regards,
    Bogdan

     
  • Bogdan-Andrei Iancu

    • status: closed-wont-fix --> open
     
  • Dan Pascu

    Dan Pascu - 2008-12-05

    The gain doesn't justify the loss of readability. You only gain about 20 bytes from the short header names which is less than 10%. For 20000 endpoints to keepalive and a ping interval of 90 seconds you will get 400kbps instead of 434kbps. That difference doesn't justify the loss of readability IMO.

     
  • Dan Pascu

    Dan Pascu - 2008-12-05
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks