<div><div dir="auto">The value of the server address parameter is what appears in the from header - so if you want replies to go to your advertised/public address then this is what the server address should be set to.</div></div><div dir="auto"><br></div><div dir="auto">Do the messages now contain the correct IP since updating the server address?</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">Charles</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 18 Jun 2019 at 12:09, <<a href="mailto:jenus@cyberchaos.nl">jenus@cyberchaos.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All<br>
<br>
Here the KDMQ reqest from the node that comes online:<br>
<br>
------------------<br>
Kamailio start on 10.20.8.89, sends a request to the active node <br>
10.20.8.88<br>
------------------<br>
KDMQ <a href="http://sip:usrloc@10.20.8.88:5063" rel="noreferrer" target="_blank">sip:usrloc@10.20.8.88:5063</a> SIP/2.0<br>
Via: SIP/2.0/UDP <br>
10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4000000000000000000000000.0<br>
To: <<a href="http://sip:usrloc@10.20.8.88:5063" rel="noreferrer" target="_blank">sip:usrloc@10.20.8.88:5063</a>><br>
 From: <br>
<<a href="http://sip:usrloc@172.17.0.2:5063" rel="noreferrer" target="_blank">sip:usrloc@172.17.0.2:5063</a>>;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61<br>
CSeq: 10 KDMQ<br>
Call-ID: <a href="mailto:58f8ada547fd5ba0-225@172.17.0.2" target="_blank">58f8ada547fd5ba0-225@172.17.0.2</a><br>
Content-Length: 12<br>
User-Agent: kamailio (5.1.8 (x86_64/linux))<br>
Max-Forwards: 1<br>
Content-Type: application/json<br>
<br>
{"action":3}<br>
<br>
SIP/2.0 200 OK<br>
Via: SIP/2.0/UDP <br>
10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4000000000000000000000000.0<br>
To: <br>
<<a href="http://sip:usrloc@10.20.8.88:5063" rel="noreferrer" target="_blank">sip:usrloc@10.20.8.88:5063</a>>;tag=616b7acb681ed5e9cbc485b3faa09d62.f2b6<br>
 From: <br>
<<a href="http://sip:usrloc@172.17.0.2:5063" rel="noreferrer" target="_blank">sip:usrloc@172.17.0.2:5063</a>>;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61<br>
CSeq: 10 KDMQ<br>
Call-ID: <a href="mailto:58f8ada547fd5ba0-225@172.17.0.2" target="_blank">58f8ada547fd5ba0-225@172.17.0.2</a><br>
Server: kamailio (5.1.8 (x86_64/linux))<br>
Content-Length: 0<br>
-----------------<br>
<br>
<br>
But after this to response from 10.20.8.88 back to 10.20.8.89 with the <br>
usrloc data.  If i replace the primary node that should send the usrloc <br>
info with the original kamailio server that is not running in docker i <br>
see a KDMQ usrloc@... back to the server that is starting with all the <br>
usrloc data in the body.<br>
<br>
Let me know if you need more details or debug logs.<br>
<br>
Thanks,<br>
<br>
Jan<br>
<br>
<br>
<br>
<br>
<a href="mailto:jenus@cyberchaos.nl" target="_blank">jenus@cyberchaos.nl</a> schreef op 2019-06-18 08:51:<br>
> Julien,<br>
> <br>
> I have the following config:<br>
> <br>
> Host ip: 10.20.8.88  Internal container ip:  172.17.0.2<br>
> <br>
> <br>
> listen=udp:<a href="http://172.17.0.2:5063" rel="noreferrer" target="_blank">172.17.0.2:5063</a> advertise <a href="http://10.20.8.88:5063" rel="noreferrer" target="_blank">10.20.8.88:5063</a><br>
> <br>
> <br>
> # ----- dmq params -----<br>
> modparam("dmq", "server_address", "sip:<a href="http://172.17.0.2:5063" rel="noreferrer" target="_blank">172.17.0.2:5063</a>")<br>
> modparam("dmq", "num_workers", 4)<br>
> modparam("dmq", "ping_interval", 90)<br>
> modparam("dmq", "notification_address",<br>
> "sip:sip12.voip.domain.test:5063")      (on the other node this is<br>
> sip11.domain.test)<br>
> modparam("dmq", "multi_notify", 1)<br>
> <br>
> # ----- dmq_usrloc params -----<br>
> modparam("dmq_usrloc", "enable", 1)<br>
> modparam("dmq_usrloc", "sync", 1)<br>
> modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts / <br>
> message<br>
> modparam("dmq_usrloc", "batch_size", 10000)       # 10000 contacts / <br>
> batch<br>
> modparam("dmq_usrloc", "batch_usleep", 500000)    # one batch every <br>
> 500ms<br>
> <br>
> <br>
> Here is the output of the kamcmd dmq.list_nodes<br>
> <br>
> root@9d81434d491f:/# kamcmd dmq.list_nodes<br>
> {<br>
>         host: 10.20.8.89<br>
>         port: 5063<br>
>         resolved_ip: 10.20.8.89<br>
>         status: active<br>
>         last_notification: 0<br>
>         local: 0<br>
> }<br>
> {<br>
>         host: 10.20.8.88<br>
>         port: 5063<br>
>         resolved_ip: 10.20.8.88<br>
>         status: active<br>
>         last_notification: 0<br>
>         local: 0<br>
> }<br>
> {<br>
>         host: 172.17.0.2<br>
>         port: 5063<br>
>         resolved_ip: 172.17.0.2<br>
>         status: active<br>
>         last_notification: 0<br>
>         local: 1<br>
> }<br>
> <br>
> <br>
> I will collect some traces as well of the sync request as requested by <br>
> Charles.<br>
> <br>
> Thanks,<br>
> <br>
> Jan<br>
> <br>
> Julien Chavanton schreef op 2019-06-17 21:00:<br>
>> Can you share the settings you are using :<br>
>> <br>
>> modparam("dmq", "server_address", "?")<br>
>> modparam("dmq", "notification_address", "?")<br>
>> <br>
>> On Mon, Jun 17, 2019 at 11:30 AM <<a href="mailto:jenus@cyberchaos.nl" target="_blank">jenus@cyberchaos.nl</a>> wrote:<br>
>> <br>
>>> Hi all,<br>
>>> <br>
>>> Is there any other way to filter DMQ peers? I now have a issue with<br>
>>> dmq_usrloc when running in a docker container. When the node comes<br>
>>> online the peer is sending the KDMQ usrloc packet (with the<br>
>>> registered<br>
>>> contacts) to the internal container ip and not the actual external<br>
>>> ip.<br>
>>> Both ip's show up as DMQ peers, after a few keepalive failures the<br>
>>> dmq<br>
>>> peer with the internal container ip becomes inactive and no updates<br>
>>> are<br>
>>> sent to that peer. But the usrloc sync seems to happen before the<br>
>>> peer<br>
>>> is inactive.<br>
>>> <br>
>>> I tried to strip the peers with the internal container ip's, this<br>
>>> works<br>
>>> for the requests, but i'm not able to fix this for the responses.<br>
>>> <br>
>>> Thanks,<br>
>>> <br>
>>> Jan<br>
>>> <br>
>>> <a href="mailto:jenus@cyberchaos.nl" target="_blank">jenus@cyberchaos.nl</a> schreef op 2019-05-02 08:59:<br>
>>>> Hi all,<br>
>>>> <br>
>>>> I'm trying to run a kamailio DMQ node inside a docker container.<br>
>>> All<br>
>>>> works fine but i have one issue with DMQ. Since the kamailio<br>
>>> process<br>
>>>> inside the container is behind a nat i have set the advertise<br>
>>> address<br>
>>>> to the external ip, this works fine for the via headers but DMQ<br>
>>> keeps<br>
>>>> sending the internal interface in the KDMQ notification_peer<br>
>>> messages.<br>
>>>> The external ip is in there as well. Example:<br>
>>>> <br>
>>>> SIP/2.0 200 OK<br>
>>>> Via: SIP/2.0/UDP<br>
>>>> 10.10.10.13;branch=z9hG4bK2dcb.c6326de2000000000000000000000000.0<br>
>>>> To:<br>
>>>> <<a href="http://sip:notification_peer@10.10.10.94:5060" rel="noreferrer" target="_blank">sip:notification_peer@10.10.10.94:5060</a><br>
>>> [1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d<br>
>>>> From:<br>
>>>> <<a href="http://sip:notification_peer@10.10.10.13:5060" rel="noreferrer" target="_blank">sip:notification_peer@10.10.10.13:5060</a><br>
>>> [2]>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29<br>
>>>> CSeq: 10 KDMQ<br>
>>>> Call-ID: 17042656602ca532-23367@x.x.x.x<br>
>>>> Content-Type: text/plain<br>
>>>> Server: kamailio (5.1.4 (x86_64/linux))<br>
>>>> Content-Length: 222<br>
>>>> <br>
>>>> sip:10.10.10.13:5060;status=active<br>
>>>> sip:10.10.10.12:5060;status=active<br>
>>>> sip:10.10.10.92:5060;status=active<br>
>>>> sip:10.10.10.93:5060;status=active<br>
>>>> sip:10.10.10.94:5060;status=active   <-- entry for container<br>
>>> external<br>
>>>> ip<br>
>>>> sip:172.17.0.2:5060;status=disabled  <-- entry for container<br>
>>> internal<br>
>>>> ip<br>
>>>> <br>
>>>> <br>
>>>> I tried to strip this entry using the replace_body_atonce in the<br>
>>>> tm:local-request route. This works fine for the KDMQ request, but<br>
>>> when<br>
>>>> i try to remove the same line from 200OK responses that are send<br>
>>> out<br>
>>>> as a response to incomming KDMQ messages this seems to fail. I use<br>
>>> the<br>
>>>> following code:<br>
>>>> <br>
>>>> # Working code (for outgoing KDMQ requests):<br>
>>>> event_route [tm:local-request]<br>
>>>> {<br>
>>>> if(is_method("KDMQ") && $rU == "notification_peer")<br>
>>>> replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");<br>
>>>> }<br>
>>>> <br>
>>>> # Failing code (for 200OK responses):<br>
>>>> reply_route<br>
>>>> {<br>
>>>> xlog("L_ALERT", "REPLY: Sending out reply, tU is $tU  rs is<br>
>>> $rs\n");<br>
>>>> if ($rs == "200" && $tU == "notification_peer")<br>
>>>> {<br>
>>>> replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");<br>
>>>> }<br>
>>>> }<br>
>>>> <br>
>>>> <br>
>>>> I'm running kamailio 5.1.4. Is there a way to strip a line from<br>
>>> the<br>
>>>> body of a local generated 200OK response? Or is there a way to<br>
>>> avoid<br>
>>>> that DMQ inserts the internal container ip in the first place.<br>
>>>> <br>
>>>> <br>
>>>> Thanks,<br>
>>>> <br>
>>>> Jan Hazenberg<br>
>>>> <br>
>>>> <br>
>>>> _______________________________________________<br>
>>>> Kamailio (SER) - Users Mailing List<br>
>>>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>>> <br>
>>> _______________________________________________<br>
>>> Kamailio (SER) - Users Mailing List<br>
>>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <br>
>> <br>
>> Links:<br>
>> ------<br>
>> [1] <a href="http://sip:notification_peer@10.10.10.94:5060" rel="noreferrer" target="_blank">http://sip:notification_peer@10.10.10.94:5060</a><br>
>> [2] <a href="http://sip:notification_peer@10.10.10.13:5060" rel="noreferrer" target="_blank">http://sip:notification_peer@10.10.10.13:5060</a><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <br>
> <br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, helvetica, sans-serif"><b><font size="2">Charles Chance</font></b><br><font size="2">Managing Director</font></font><br><div><font face="arial, helvetica, sans-serif"><font size="2"><br></font></font></div><div><font face="arial, helvetica, sans-serif"><font size="2">t. 0330 120 1200    m. 07932 063 891</font></font></div></div></div></div></div>

<br>
<div><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Sipcentric Ltd.
                Company registered in England & Wales no. 7365592.</font><span style="font-size:10pt;font-family:Helvetica,Arial,sans-serif"> </span><font color="gray" style="font-size:10pt;font-family:Helvetica,Arial,sans-serif">Registered
                office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.</font></div>