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
Francesco Castellano writes:
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:
this has been discussed at length earlier this year. search mailing list archives.
-- juha
Thanks Juha, I apologise, I was unlucky searching before posting.
Searching for
`"branch parameter" serusers' `about syn_branch'
produces better results than mine.
Regards, Francesco Castellano
On Wed, May 18, 2011 at 12:12 PM, Juha Heinanen jh@tutpro.com wrote:
Francesco Castellano writes:
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:
this has been discussed at length earlier this year. search mailing list archives.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Juha,
On 5/18/11 12:12 PM, Juha Heinanen wrote:
Francesco Castellano writes:
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:
this has been discussed at length earlier this year. search mailing list archives.
is the conclusion pointing to the suggested solution in the item you opened on tracker?
http://sip-router.org/tracker/index.php?do=details&task_id=116&proje...
If not, can you update the item with the recommended solution for the case, it should not be something that complex to add.
Thanks, Daniel
Daniel-Constantin Mierla writes:
is the conclusion pointing to the suggested solution in the item you opened on tracker?
http://sip-router.org/tracker/index.php?do=details&task_id=116&proje...
If not, can you update the item with the recommended solution for the case, it should not be something that complex to add.
the solution proposed on the tracker is still valid. of course one can always set syn_branch in the config, but that consumes more resources.
i looked at the code, and it did not appear trivial to me to change 0 to a valid constant.
-- juha
On 5/19/11 9:58 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
is the conclusion pointing to the suggested solution in the item you opened on tracker?
http://sip-router.org/tracker/index.php?do=details&task_id=116&proje...
If not, can you update the item with the recommended solution for the case, it should not be something that complex to add.
the solution proposed on the tracker is still valid. of course one can always set syn_branch in the config, but that consumes more resources.
i looked at the code, and it did not appear trivial to me to change 0 to a valid constant.
if I understood right, it is about 200 ACK which are forwarded stateless. If yes, then should be only in forward.c, the condition at line 545, where the assignment can be changed in a memcpy.
The ack for non-2xx are built differently in tm locally, using forwarded invite.
Cheers, Daniel