Alex, hi5, it was right in front of me, not sure how I missed the enable_r2 setting...

Initially though out-of-dialog requests would not follow the pre-loaded Route set. After some digging, the solution was to loose_route() those, since they were falling under an exception:

"There is only one exception: If the request is out-of-dialog (no to-tag) and there is only one Route: header indicating the local proxy, then the Route: header is removed and the function returns FALSE"

Much obliged.

On Wed, Oct 3, 2018 at 10:29 PM Alex Balashov <abalashov@evaristesys.com> wrote:
Hi Sergiu,

The purpose of the Path header is to tell the upstream registrar that
the registered Contact must be reached through an adjacent hop, which
requires only one Path header with the address of one interface, since
it's only used for "inbound" calls.

That interface should be the egress interface, but if it's not, you can
always add your own Path header manually:

   append_hf("Path: <sip:your.desired.interface;lr>\r\n");

That said, if you are determined to reason about this in the manner of
you originally proposed, have a look at this option:

https://kamailio.org/docs/modules/5.1.x/modules/path.html#path.p.enable_r2

-- Alex

On Wed, Oct 03, 2018 at 10:21:03PM -0400, Sergiu Pojoga wrote:

> Hi again,
>
> When acting as an intermediary proxy for a non-colocated Registrar, the
> REGISTER request coming in on one port and going out on another, shouldn't
> the *add_path[received]()* generate *two* nodes in the Path header?
> Otherwise, how are the subsequent requests supposed to be routed back to
> the UAC?
>
> Scenario with Kamailio proxy on IP 1.1.1.1 with dual port listeners
> UAC => proxy:5070 <=> proxy:5060 => Registrar:5060
>
> Path: <sip:1.1.1.1;lr;received=sip:123.123.123.123:59593>
>
> I would expect it to be something like:
> Path: <sip:1.1.1.1;lr>,<sip:1.1.1.1:5070;lr;received=sip:
> 123.123.123.123:59593>
>
> modparam("rr", "enable_double_rr", 1)
> modparam("path", "use_received", 1)
>
> Merci!

> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users