Sending large SIP packets over UDP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Benny 

Thanks for the reply on switching to tcp, it worked like a charm. For the record I am quite confident that there is an issue when transmitting large (2 segment) UDP packages in the 3G network. We tried different operators and results were unreliable when segmenting UDP. There can be many reasons for this but it seems as something more then just packet loss since retransmissions did not work either, however with TCP it works as expected with the drawback of latency increase.

I would really like to implement the feature of switching to TCP when packet size exceeds 1300 bytes but only for Requests not for Responses (the spec only mentioned Requests).

I have two questions though:
1. If I only modify the Dest-Uri for an outgoing INVITE it is still sent over UDP, as you say below this is due to the Route header. I wonder which would be the appropriate way to handle the route header in a more flexible way depending on the packet size. It seems to be connected to the pjsua_acc and I am not sure but inside pjsua_acc_create_uac_contact(..) it seems like the transport is decided when creating the UAC. Is it still possible to modify it dynamically later on at the time when we know the packet size?

2. Would this be possible to accomplish with a new module overriding on_tx_request, if so on what level in the stack is it possible to get a valid size of the message to be transmitted and at the same time inject the upadated parameters. It feels like the message must have been built but not sent to a specific transport yet, is this possible to achive in this way, some pointers in the right direction would be highly appriciated.

Have a nice weekend

Johan


Partly quoting Bennys reply.

"No we don't do automatic switching to TCP. Personally I feel that the RFC is
a bit too naive in this regard, ignoring scenarios such as NAT where you
can't just send response with TCP back to the client and expect it to just
work. So my take on this is if you think message size is going to cause
problem with UDP, then you should use TCP from the start."




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux