Hello,
On 07/02/14 16:05, Daniel Tryba wrote:
How can I get the determine the total size of an outgoing INVITE?
The size of the body is $bs, but is there a way to get the size of all headers? Based on the size of the total request I have to chose between UDP and TCP, upstream provider requires IP packets>1300 to be transmitted over TCP.
Is there an easy way (like $bs) or should I just call msg_apply_changes() and loop through all headers and sum the lengths of them?
there is a variable giving the size of the entire sip message:
- http://www.kamailio.org/wiki/cookbooks/4.1.x/pseudovariables#ml_-_sip_messag...
But in this case you should play with mtu related parameters or functions from core:
- http://www.kamailio.org/wiki/cookbooks/4.1.x/core#udp_mtu
Cheers, Daniel