[SR-Users] dmq_usrloc - which server?

Charles Chance charles.chance at sipcentric.com
Wed Feb 7 23:35:31 CET 2018

Hi Alex,

On 7 February 2018 at 18:05, Alex Balashov <abalashov at evaristesys.com>

> (1) Most of the endpoints in question are NAT'd, and I was using
> fix_nated_register() and the "received AVP" for mitigation.
> Although the "Received" address is replicated by DMQ, using Path to
> discover the adjacent "last hop" registrar overwrites the destination
> set and stops the 'received' parameter from being utilised. Moreover,
> there is no way to intercept it before the lookup() overwrites $du with
> Path instead of 'received'.

I would typically append the received IP/port to the Path header before

    append_hf("Path: <sip:$Ri:$Rp;received=sip:$si:$sp;lr>\r\n");

The last-hop registrar (as defined in Path uri) can then do something

    $du = $(hdr(Route){param.value,received});

...before sending it on its way.

I recall that we also set path_use_received parameter, although from memory
I couldn't say for sure if the above depended on it.

(2) When multiple Contact bindings are available for the same AOR, both
> local and remote, it would be desirable to have an easy way of selecting
> the most adjacent one (i.e. the local one, in preference to the ones
> removed by one Path hop).
> Is there a nonobvious easy way to accomplish this, or am I going to have
> to switch from lookup() to reg_fetch_contacts() or walk the lookup()'d
> branches and find the one I want?

I'm unsure about that one, I'm afraid, since we generally just append
branches for all contacts in parallel (which lookup(), combined with the
above, does very well).

There may be something that can be done with dmq_usrloc and q value, to
ensure that local contacts have a higher priority - and then set
append_branches parameter to 0 - but I am unaware of any existing way to
accomplish it without, as you suggest, switching to reg_fetch_contacts().



Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180207/54d1bd52/attachment.html>

More information about the sr-users mailing list