<div dir="auto">I this here is a way to share user for watcher from any domain using rpc.subscribe command after handle_subscribe()<div dir="auto">It is availible to make simple service that will be triggered by subscribe request and make fake subscribe request with needed data for other domains. Handle this subscribe also by handle_subscribe(). It will put needed user@domain pair to watchers from needed whatcher and then will trigger publish for user because in watchers table it will exist on every domain.</div><div dir="auto"><br></div><div dir="auto">Also you can use same schema with just publush that will run after handle publish on when kamailio will generate publish ( triggering in local-request)</div><div dir="auto"><br></div><div dir="auto">just choose sinpliest way for you</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Nov 29, 2017 21:35, "Charles Chance" <<a href="mailto:charles.chance@sipcentric.com">charles.chance@sipcentric.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>So I understand that each server has its own FQDN and you want to point users to their closest proxy, but are all servers part of the same 'logical' domain?</div><div><br></div><div>The SIP domain/realm does not have to be the same as the address/hostname of the individual proxy server that is servicing a request.</div><div><br></div><div>Unless, of course, you have a reason to maintain a separate domain for each city. In which case, I don't believe there is a way to ignore the domain in handle_publish() - users will need to subscribe to the correct user@domain combination.</div><div><br></div><div>Cheers,</div><div><br></div><div>Charles</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 November 2017 at 13:49, Aidar Kamalov <span dir="ltr"><<a href="mailto:aidar.kamalov@gmail.com" target="_blank">aidar.kamalov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have some kamailio servers in each city: <a href="http://city1.example.com" target="_blank">city1.example.com</a>, <a href="http://city2.example.com" target="_blank">city2.example.com</a>, <a href="http://city3.example.com" target="_blank">city3.example.com</a>.<div>Users in city1 connects to <a href="http://city1.example.com" target="_blank">city1.example.com</a>.<div><br></div><div>each kamailio has in config:</div><div><div>alias="<a href="http://city1.example.com" target="_blank">city1.example.com</a>"</div><div>alias="<a href="http://city2.example.com" target="_blank">city2.example.com</a>"</div><div>alias="<a href="http://city3.example.com" target="_blank">city3.example.com</a>"</div></div><div><div><br></div><div>modparam("dmq", "server_address", "sip:LOCALIP:5050")</div><div>modparam("dmq", "notification_address", "sip:<a href="http://city1.example.com:5050" target="_blank">city1.example.com:5050</a>")<br></div><div>modparam("dmq", "notification_address", "sip:<a href="http://city2.example.com:5050" target="_blank">city2.example.com:5050</a>")</div><div>modparam("dmq", "notification_address", "sip:<a href="http://city3.example.com:5050" target="_blank">city3.example.com:5050</a>")</div><div>modparam("dmq", "num_workers", 6)<br></div><div>modparam("dmq_usrloc", "enable", 1)</div><div>modparam("dmq_usrloc", "sync", 1)</div></div><div><div><br></div><div>        if(is_method("PUBLISH")) {</div><div>                handle_publish();</div><div>                if(!dmq_is_from_node()) dmq_t_replicate();</div><div>                t_release();</div><div>        } else if(is_method("SUBSCRIBE")) {</div><div>                handle_subscribe();</div><div>                if(!dmq_is_from_node()) dmq_t_replicate();</div><div>                t_release();</div><div>        }</div></div></div><div><br></div><div><br></div><div>When publish from <a href="http://city1.example.com" target="_blank">city1.example.com</a> replicated to <a href="http://city2.example.com" target="_blank">city2.example.com</a>, PUBLISH <a href="mailto:sip%3A34200@city1.example.com" target="_blank">sip:34200@city1.example.com</a> SIP/2.0 but there is no <a href="mailto:34200@city1.example.com" target="_blank">34200@city1.example.com</a> in active_watchers table there is  <a href="mailto:34200@city2.example.com" target="_blank">34200@city2.example.com</a>. So when publish is coming to <a href="http://city2.example.com" target="_blank">city2.example.com</a> handle_publish can not found it, and doesn't send NOTIFY.</div><div><br></div><div>Is it any way to ignore domain part in handle_publish()?</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1302013447970297650h5">2017-11-29 16:23 GMT+03:00 Charles Chance <span dir="ltr"><<a href="mailto:charles.chance@sipcentric.com" target="_blank">charles.chance@sipcentric.com</a><wbr>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1302013447970297650h5"><div><div>Hello,<div dir="auto"><br></div><div>Why are you trying to operate across domains in the same DMQ cluster? Usually, servers operating in different domains do not need to be aware of each other's user location and/or subscription records - if a request is for another domain, simply forward it to the server(s) responsible for that domain.</div><div dir="auto"><br></div><div dir="auto">Also, regardless of DMQ or any replication, publishes for one domain would not match subscriptions for another domain; even on a single server.</div><div><br></div><div>Can you describe your architecture in more detail and what you are looking to achieve with replication?</div><div><br></div><div>Cheers,</div><div><br></div><div>Charles</div></div></div><div><div><div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1302013447970297650m_-3490492753729079598h5">On 29 November 2017 at 12:45, Aidar Kamalov <span><<a href="mailto:aidar.kamalov@gmail.com" target="_blank">aidar.kamalov@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1302013447970297650m_-3490492753729079598h5"><div>Hello,<div><br></div><div>I have two(or more) kamailio servers with dmq module and dmq_usrloc - <a href="http://sip1.example.com" target="_blank">sip1.example.com</a> and <a href="http://sip2.example.com" target="_blank">sip2.example.com</a></div><div>publish and subcribe replication works too.</div><div><br></div><div>BLF works fine if clients connected to the same kamailio server, because in active_watchers table stored with same domain <a href="http://sip1.example.com" target="_blank">sip1.example.com</a></div><div><br></div><div>But what to do when call going from one server to second? Is there any configuration to ignore domain in pusblish, subscribe, notify, etc?<span class="m_-1302013447970297650m_-3490492753729079598m_6019730325437602080m_7307212661395762272m_3965628655892344701HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_-1302013447970297650m_-3490492753729079598m_6019730325437602080m_7307212661395762272m_3965628655892344701m_8636782705823094778gmail_signature" data-smartmail="gmail_signature">Aydar A. Kamalov</div>
</font></span></div></div>
<br></div></div><span>______________________________<wbr>_________________<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<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></span></blockquote></div><span class="m_-1302013447970297650m_-3490492753729079598HOEnZb"><font color="#888888"><br><br>
</font></span></div></div></div></div></div></div><span class="m_-1302013447970297650m_-3490492753729079598HOEnZb"><font color="#888888"><div><div class="m_-1302013447970297650h5"><div dir="ltr">-- <br></div><div class="m_-1302013447970297650m_-3490492753729079598m_6019730325437602080gmail_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></div><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></font></span><span><br>______________________________<wbr>_________________<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<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></span></blockquote></div><span class="m_-1302013447970297650HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-1302013447970297650m_-3490492753729079598gmail_signature" data-smartmail="gmail_signature">Aydar A. Kamalov</div>
</font></span></div>
<br>______________________________<wbr>_________________<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<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br>
</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><br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">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/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div></div>