Hi
We need to force some NOTIFY messages going through our kamailio instance over UDP to be sent over TCP.
For that purpose we inserted the following relaying rule at the beginning of the routing script:
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
if(msg:len>1300 && is_method("NOTIFY") && proto==UDP)
$du = "sip:" + $(ruri{uri.host}) + ":" + $(ruri{uri.port}) + ";transport=tcp";
[...]
This works well if the destination of the NOTIFY message is not behind NAT.
We're looking for a solution for the NAT case. We did some tests using lookup("location") before changing $du but we did not get any success.
Do you have any idea on how to implement this relaying properly ?
Is it acceptable to change the $du and then execute the t_relay as we did ?
Cheers
Pascal