[SR-Users] Determining size of INVITE
Daniel-Constantin Mierla
miconda at gmail.com
Sat Feb 8 08:59:26 CET 2014
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_message_length
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
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-users
mailing list