<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">The drouting module has a parameter that allows you to disable the DNS lookup.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><a href="https://opensips.org/docs/modules/3.2.x/drouting.html#param_force_dns">https://opensips.org/docs/modules/3.2.x/drouting.html#param_force_dns</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:black">Ben Newlin </span>
<span style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span lang="EN-GB" style="font-size:12.0pt;color:black">From:
</span></b><span lang="EN-GB" style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Jonathan Hunter <hunterj91@hotmail.com><br>
<b>Date: </b>Thursday, August 25, 2022 at 4:54 AM<br>
<b>To: </b>Bogdan-Andrei Iancu <bogdan@opensips.org>, OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a K8s environment<o:p></o:p></span></p>
</div>
<div>
<div>
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<tbody>
<tr>
<td style="border:solid #B60000 1.0pt;background:white;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:#B60000"> EXTERNAL EMAIL - Please use caution with links and attachments <o:p></o:p></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:9.0pt;font-family:Helvetica;color:black"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span lang="EN-GB" style="font-size:11.0pt">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Hi Bogdan,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Yes it would appear K8s implementations would be a very good topic at the Summit that is for sure!
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">I understand your comments on dispatcher, its unfortunate as everything else is working fine.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">There was a suggestion to add a loopback address for example and then update when DNS has updated and records resolve?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Is there any benefit in using dr_routing instead or will this behaviour be the same in the event of a dns lookup failure?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Thanks for the response!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Jon<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-GB" style="font-size:11.0pt">From: </span>
</b><span lang="EN-GB" style="font-size:11.0pt"><a href="mailto:bogdan@opensips.org">Bogdan-Andrei Iancu</a><br>
<b>Sent: </b>24 August 2022 12:29<br>
<b>To: </b><a href="mailto:users@lists.opensips.org">OpenSIPS users mailling list</a>;
<a href="mailto:hunterj91@hotmail.com">Jonathan Hunter</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a K8s environment<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Courier New"">Hi Jonathan,<br>
<br>
I guess this will be a good topic (DS and K8S) for the OpenSIPS Summit in Athens - I think this is the 3rd time in the last week coming across it :)<br>
<br>
Unfortunately there is no way to skip at the moment that DNS failure when loading the destinations :(....even more, there some code that relies on the fact that there is an "IP" attached to any destination.....And I just checked, a local error in sending the
ping (like the DNS err) does not results in marking the destination as failed or so..... so it is not so straight as ignoring the DNS error.<br>
<br>
Best regards,<br>
<br>
<br>
</span><span lang="EN-GB" style="font-size:11.0pt"><o:p></o:p></span></p>
<pre><span lang="EN-GB">Bogdan-Andrei Iancu<o:p></o:p></span></pre>
<pre><span lang="EN-GB"> <o:p></o:p></span></pre>
<pre><span lang="EN-GB">OpenSIPS Founder and Developer<o:p></o:p></span></pre>
<pre><span lang="EN-GB"> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vMcA8Ti1ZgupioV7%2BV%2Fn6MxoklfjuxJ8BGcqWEWDHmE%3D&reserved=0">https://www.opensips-solutions.com</a><o:p></o:p></span></pre>
<pre><span lang="EN-GB">OpenSIPS Summit 27-30 Sept 2022, Athens<o:p></o:p></span></pre>
<pre><span lang="EN-GB"> <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9VF4udkoaGT%2FBFooWi8eyPaFOzq3c7yeYoxJDXgL5C4%3D&reserved=0">https://www.opensips.org/events/Summit-2022Athens/</a><o:p></o:p></span></pre>
<div>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">On 8/24/22 12:24 AM, Jonathan Hunter wrote:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">I have a query around dispatcher behaviour, I am running 3.2 in a k8s environment.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">I have 2 freeswitch instances defined in a destination set, both of which are pods.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">As people may be aware its fun implementing in k8s as pods can restart and disappear at times so I ideally want this reflected in the cache and output of opensips-cli -x mi ds_list where I was
hoping the freeswitch entries would be defined but with a state of probing or inactive.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">With my current setup, when restarting opensips for example, I have the dispatcher table populated in postgres db , and if opensips cant resolve the URI it wont load it into cache, like wise if
opensips is running and freeswitch pod drops, I see this in the logs;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Aug 23 21:22:01 [55] ERROR:dispatcher:add_dest2list: could not resolve freeswitch-opensips-deployment-1.freeswitch-opensips, skipping it<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Aug 23 21:22:01 [55] WARNING:dispatcher:ds_load_data: failed to add destination
<a href="sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp">
<sip:freeswitch-opensips-deployment-1.freeswitch-opensips:5070;transport=tcp></a> in group 10<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">I therefore don’t see it listed in cache when I run ds_list.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Does anyone know if its possible to tweak dispatcher to always load the database entries into cache at startup, and also set their status to probing/inactive if not reachable due to a resolving
issue as above?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">My dispatcher settings are;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">#### Dynamic routing<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">loadmodule "dispatcher.so"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "db_url", "postgres://x.x.x.x/opensips")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "ds_probing_mode", 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "ds_probing_threshhold", 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "persistent_state", 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "ds_ping_interval", 5)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "table_name", "dispatcher")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">modparam("dispatcher", "cluster_id", 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Hope that makes sense!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Many thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt">Jon<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre><span lang="EN-GB">_______________________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-GB">Users mailing list<o:p></o:p></span></pre>
<pre><span lang="EN-GB"><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></span></pre>
<pre><span lang="EN-GB"><a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7C%7C84ee92014c7c4c0ea33e08da85c3dd19%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637969373523562738%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Vx2tfVcw2FLjKQOd5KZAwKVEfBs04rTdHqR7VD05wJs%3D&reserved=0">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></pre>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt"> <o:p></o:p></span></p>
</div>
</body>
</html>