<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:2 11 5 4 2 2 2 2 2 4;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.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:0cm;
        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";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-GB" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Ben,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Great thank you for that I may well switch for now to drouting.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a id="OWAAM74C247A63A914AEEAA00C487B682771DZ" href="mailto:bogdan@opensips.org"><span style="font-family:"Calibri",sans-serif;text-decoration:none">@Bogdan-Andrei Iancu</span></a> is it worth me raising anything against dispatcher in terms
 of a change request for dns behaviour?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Many thanks both.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jon</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:Ben.Newlin@genesys.com">Ben Newlin</a><br>
<b>Sent: </b>25 August 2022 18:57<br>
<b>To: </b><a href="mailto:users@lists.opensips.org">OpenSIPS users mailling list</a>;
<a href="mailto:bogdan@opensips.org">Bogdan-Andrei Iancu</a><br>
<b>Subject: </b>Re: [OpenSIPS-Users] Dispatcher within a K8s environment</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">The drouting module has a parameter that allows you to disable the DNS lookup.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopensips.org%2Fdocs%2Fmodules%2F3.2.x%2Fdrouting.html%23param_force_dns&data=05%7C01%7C%7Cf84f80bb420d460fe7d208da86c34cf1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637970470657734853%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5BxF0g5rRnQUqjFWInVV7%2BvMxV5Lp7jZskDpeThV7VU%3D&reserved=0">https://opensips.org/docs/modules/3.2.x/drouting.html#param_force_dns</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="color:black">Ben Newlin </span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span 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="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<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 style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" align="center" style="text-align:center"><img border="0" width="566" height="1" style="width:5.9in;height:.0083in" id="Horizontal_x0020_Line_x0020_1" src="cid:image001.png@01D8B961.8D233250"><o:p></o:p></p>
</div>
<p class="MsoNormal">Hi Bogdan,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Yes it would appear K8s implementations would be a very good topic at the Summit that is for sure!
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I understand your comments on dispatcher, its unfortunate as everything else is working fine.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks for the response!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Sent from <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986&data=05%7C01%7C%7Cf84f80bb420d460fe7d208da86c34cf1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637970470657734853%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=1zWxFJfa8gV9t%2FYLq8ONWjywSfOqUp%2BNhID2Q6A%2BkI4%3D&reserved=0">
Mail</a> for Windows<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From: </b><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></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="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>
</span><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu</pre>
<pre> </pre>
<pre>OpenSIPS Founder and Developer</pre>
<pre>  <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips-solutions.com%2F&data=05%7C01%7C%7Cf84f80bb420d460fe7d208da86c34cf1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637970470657734853%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TXgKtVXJyOIAKjtNjCoF5Bw%2B7%2F89%2FHbh3fCrtVVAzsY%3D&reserved=0">https://www.opensips-solutions.com</a></pre>
<pre>OpenSIPS Summit 27-30 Sept 2022, Athens</pre>
<pre>  <a href="https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.opensips.org%2Fevents%2FSummit-2022Athens%2F&data=05%7C01%7C%7Cf84f80bb420d460fe7d208da86c34cf1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637970470657734853%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=K%2Bjf5zuAF89bgaGhGCZ0zPiRdOF4q6viXHVe6e8ekIE%3D&reserved=0">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
<div>
<p class="MsoNormal">On 8/24/22 12:24 AM, Jonathan Hunter wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have a query around dispatcher behaviour, I am running 3.2 in a k8s environment.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have 2 freeswitch instances defined in a destination set, both of which are pods.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I therefore don’t see it listed in cache when I run ds_list.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">My dispatcher settings are;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">#### Dynamic routing<o:p></o:p></p>
<p class="MsoNormal">loadmodule "dispatcher.so"<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "db_url", "postgres://x.x.x.x/opensips")<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_probing_mode", 1)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_probing_threshhold", 1)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "persistent_state", 0)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "ds_ping_interval", 5)<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "table_name", "dispatcher")<o:p></o:p></p>
<p class="MsoNormal">modparam("dispatcher", "cluster_id", 1)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Hope that makes sense!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Many thanks<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Jon<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________</pre>
<pre>Users mailing list</pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></pre>
<pre><a href="https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.opensips.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fusers&data=05%7C01%7C%7Cf84f80bb420d460fe7d208da86c34cf1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637970470657891490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=C%2FersRlZBKRpabOoMHlc57cGMeLl4%2Fqo3RUpIs7yFqo%3D&reserved=0">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></pre>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>