[SR-Users] Replicate REGISTER and save original received value

Alex Balashov abalashov at evaristesys.com
Mon Mar 11 21:27:34 CET 2019


Oh, I’m sorry! I misread your message and was sure you meant “with DMQ”.

In that case, if you have complete control over the relay process, why not just append the proximate source IP and port as a custom SIP header before forwarding the registration, then extract it on the other side and store it locally using an overridden received parameter value?

If you can’t do that, have you considered set/add_contact_alias() (nathelper module) to manipulate the stored binding prior to forwarding? If you then call handle_ruri_alias() after resolution on the proximate hop to the endpoint, it will strip off the alias parameter, if present, and use the values stored therein as the destination URI.

—
Sent from mobile, with due apologies for brevity and errors.

> On Mar 11, 2019, at 4:23 PM, Daniel W. Graham <dan at cmsinter.net> wrote:
> 
> Hi, I can confirm dmq_usrloc does replicate received, however I need to do this outside of DMQ. I have a host I need to send specific REGISTERs to so I can't include that host in the DMQ group, as it would receive all usr_loc records.
> 
> -dan
> 
> -----Original Message-----
> From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Alex Balashov
> Sent: Monday, March 11, 2019 4:15 PM
> To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> Subject: Re: [SR-Users] Replicate REGISTER and save original received value
> 
> Hi Daniel,
> 
> The 'received' parameter should be replicated. It is in one of our dmq_usrloc rigs, which has four nodes, and registrations can come into any of them.
> 
> By way of example:
> 
> [root at gw kamailio]# kamcmd -s /tmp/kamailio_ctl ul.lookup location abalashov at sip.$DOMAIN {
>    AoR: abalashov at sip.$DOMAIN
>    Contacts: {
>        Contact: {
>            Address: sip:abalashov at 172.30.105.251:5060;alias=$PUBLIC_IP~5060~1
>            Expires: 112
>            Q: 0.000000
>            Call-ID: b1663a59ecd8732037017105a82662d3
>            CSeq: 3030
>            User-Agent: PolycomVVX-VVX_411-UA/5.6.0.17325
>            Received: sip:$PUBLIC_IP:5060
>            Path: <sip:$NOT_THIS_HOST:5080;lr>
>            State: CS_NEW
>            Flags: 0
>            CFlags: 0
>            Socket: [not set]
>            Methods: 8159
>            Ruid: uloc-5c6a50c4-5c25-98d
>            Instance: [not set]
>            Reg-Id: 0
>            Server-Id: 0
>            Tcpconn-Id: -1
>            Keepalive: 0
>            Last-Keepalive: 1552335034
>            Last-Modified: 1552335034
>        }
>    }
> }
> 
> There's a 50% chance I could be mistaken, but I vaguely remember that replication of 'received' was an issue in some earlier version of Kamailio than that.
> 
> -- Alex
> 
>> On Mon, Mar 11, 2019 at 05:13:31PM +0000, Daniel W. Graham wrote:
>> 
>> When forwarding / replicating a REGISTER, is it possible (without using DMQ) for the receiving host to save the contact with the original received parameter?
>> 
>> REGISTER > server 1 (received set) > forward > server 2 (received not 
>> set)
>> 
>> add_rcv_param will set received to server 1 IP, but I'm looking for the original parameter as set on SERVER 1.
>> 
>> -dan
> 
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at 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 at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



More information about the sr-users mailing list