<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Markus,</p>
<p>another idea: the dmq module supports multiple destinations, so you could enter a internal and public IP adress into a A record, and then let dmq connect to both. But the actual routing descision is (currently) done on a linux network layer level.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="moz-cite-prefix">Am 05.06.19 um 10:10 schrieb Markus Bönke:<br>
</div>
<blockquote type="cite" cite="mid:8AC13CA6-030C-4099-BF62-0A4B5EAF5A57@tenios.de">
Hello Henning,
<div class=""><br class="">
</div>
<div class="">I was hoping that there would be a way with dmq, but anyway I’ll solve this on network level. Thanks for the hint.</div>
<div class=""><br class="">
</div>
<div class="">Best regards</div>
<div class=""><br class="">
</div>
<div class="">Markus</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">Am 04.06.2019 um 16:46 schrieb Henning Westerholt <<a href="mailto:hw@skalatan.de" class="" moz-do-not-send="true">hw@skalatan.de</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Hi Markus,<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
This is a bit an IP routing question, as Kamailio more or less just send the message out to the network stack.<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Some ideas with iproute2:<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
- setup a default route to the public internet<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
- setup a more specific route for the dmq endpoint <br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
- configure a timeout to detect if one gateway is down to deactivate the route<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Another idea would be to enter a DNS record as dmq endpoint and then change it with a monitoring trigger event. Not 100% sure how dmq refresh this, will need some testing.<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Cheers, <br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Henning<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
<span id="OutlookSignature" class="">
<div dir="auto" style="direction: ltr; margin: 0px;
                    padding: 0px; font-family: sans-serif; font-size:
                    11pt;" class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                    padding: 0px; font-family: sans-serif; font-size:
                    11pt;" class="">
-- <br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                    padding: 0px; font-family: sans-serif; font-size:
                    11pt;" class="">
Henning Westerholt - <a href="https://skalatan.de/blog/" class="" moz-do-not-send="true">
https://skalatan.de/blog/</a><br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                    padding: 0px; font-family: sans-serif; font-size:
                    11pt;" class="">
Kamailio services - <a href="https://skalatan.de/services" class="" moz-do-not-send="true">
https://skalatan.de/services</a></div>
</span><br class="">
<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Von: Markus Bönke<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Gesendet: Dienstag, 4. Juni, 15:27<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Betreff: [SR-Users] Use dmq module with private and public IP addresses<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
An: <a href="mailto:sr-users@lists.kamailio.org" class="" moz-do-not-send="true">
sr-users@lists.kamailio.org</a><br class="">
<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Hello NG,<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
I have a question regarding the dmq / dmq_userloc module.<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
In my test setup have 2 Kamailio servers in 2 different data centers. <br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
The data centers are interconnected by a crosslink.<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Each Kamailio server has configured an internal (private) and an external (public) IP address.<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
The internal IPs are routed to use the crosslink.<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
The external IPs are routed through the public internet by different ISPs.<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
The requirement is that the replication should primarily be routed via the crosslink, only if the crosslink is down it should be routed via public internet. <br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
As I understand the „server_address“ parameter can have only one IP address. <br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
If I configure the public IPs on both sides and one ISP connection gets disconnected, packets will NOT be routed automatically via the crosslink. <br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
And the other way around, if I configure the private IPs on both sides and the crosslink gets disconnected, packets will NOT be routed automatically via public internet.<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Is there any way to setup and use dmq for such a scenario ?  <br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Thanks and regards<br class="">
<br class="">
</div>
<div dir="auto" style="direction: ltr; margin: 0px;
                padding: 0px; font-family: sans-serif; font-size: 11pt;" class="">
Markus<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>