Dear sirs,
using version 3.1.3 (kamailio flavour), I noticed that the Via inserted by the proxy, relaying an end2end ACK, contains a branch parameter equal to 0 (with no magic cookie prefixed). No misbehaviour followed, but I was wonder about the reason for this behaviour and whether it can be a fault of my config:
route { [some checks]
if (!is_method("REGISTER|MESSAGE|PUBLISH")) { record_route(); } else if (is_method("REGISTER")) { route(HANDLE_REGISTER); exit; }
if (loose_route()){ if (!has_totag()){ if (!is_method("ACK")){ send_reply("403", "Preset Route Set Not Allowed"); } exit; }
t_check_trans();
if (is_method("ACK")){ if ($du == $null){ handle_ruri_alias(); }
if (isflagset(T_UAC_NATED) && isflagset(T_UAC_USER)){ add_contact_alias(); } remove_hf("Proxy-Authorization"); t_relay(); exit; } }
[other processing] }
Here's an example for the forwarded ACK:
U 2011/05/17 15:05:49.392201 proxy_1_ip:5060 -> location_callee_ip:5060 ACK sip:5303838@192.168.130.169;user=phone SIP/2.0. Record-Route: sip:proxy_1_ip;lr=on;ftag=a2z0myc9r6. Via: SIP/2.0/UDP proxy_1_ip;branch=0. Via: SIP/2.0/UDP proxy_0_ip;rport=5060;branch=0. Via: SIP/2.0/UDP 192.168.130.171:2048;received=location_caller_ip;branch=z9hG4bK-pud4cfiz8vsh;rport=4791. From: "cento tondo" sip:100@proxy_0_hostname;tag=a2z0myc9r6. To: sip:5375485@proxy_1_hostname;user=phone;tag=00221b79b1b28969. Call-ID: 3c352c0b8419-9tbq023tzfkp. CSeq: 2 ACK. Max-Forwards: 68. Contact: sip:100@192.168.130.171:2048;alias=location_caller_ip~4791~1;line=gwwqwi25;reg-id=1. Content-Length: 0. .
where proxy_1 does force_rport and record_route() on ACK too, and proxy_0 does not. Both proxies run the same version, and a similar ACK script processing.
Best regards, Francesco Castellano