<div dir="auto"><div dir="auto">An alternative method is to use m4 to feed in the detected IP address into a templated version of the opensips config file.</div><div dir="auto"><br></div><div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 17 Nov 2021, 08:23 Muhamad Putra Abdullah, <<a href="mailto:m.putra77@outlook.com">m.putra77@outlook.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-MY" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="m_-4678518208559529910WordSection1">
<p class="MsoNormal"><span>Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>socket=udp:enp1s0:5060 tag INTERNAL_IP # CUSTOMIZE ME<u></u><u></u></span></p>
<p class="MsoNormal"><span>socket=udp:enp2s0:5060 tag EXTERNAL_IP # CUSTOMIZE ME<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>My INTERNAL_IP is set to static and EXTERNAL_IP set to DHCP. I just use tag to test something.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank" rel="noreferrer">bogdan@opensips.org</a>>
<br>
<b>Sent:</b> Wednesday, 17 November, 2021 3:55 PM<br>
<b>To:</b> Muhamad Putra Abdullah <<a href="mailto:m.putra77@outlook.com" target="_blank" rel="noreferrer">m.putra77@outlook.com</a>>; OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank" rel="noreferrer">users@lists.opensips.org</a>><br>
<b>Subject:</b> Re: [OpenSIPS-Users] How to get all listening socket IP address as variable<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Hi,<br>
<br>
How do you define the listening socket in OpenSIPs cfg ? (the one related to the DHCP interface)<br>
<br>
Regards,<br>
<br>
</span><u></u><u></u></p>
<pre>Bogdan-Andrei Iancu<u></u><u></u></pre>
<pre><u></u> <u></u></pre>
<pre>OpenSIPS Founder and Developer<u></u><u></u></pre>
<pre> <a href="https://www.opensips-solutions.com" target="_blank" rel="noreferrer">https://www.opensips-solutions.com</a><u></u><u></u></pre>
<pre>OpenSIPS eBootcamp 2021 <u></u><u></u></pre>
<pre> <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/" target="_blank" rel="noreferrer">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a><u></u><u></u></pre>
<div>
<p class="MsoNormal">On 11/17/21 2:19 AM, Muhamad Putra Abdullah wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:#212121">Hi,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Is there a way to get the IP address of DHCP interface to use in the script? I can get the call go through if I set both the interface as static.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Regards<u></u><u></u></span></p>
</div>
<div id="m_-4678518208559529910ms-outlook-mobile-signature">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">Get <a href="https://aka.ms/AAb9ysg" target="_blank" rel="noreferrer">Outlook for Android</a><u></u><u></u></p>
</div>
<div id="m_-4678518208559529910id-7c8cb1de-0d49-4aee-8134-d15557d98ca5">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><u></u> <u></u></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="m_-4678518208559529910divRplyFwdMsg">
<p class="MsoNormal"><strong><span style="font-family:"Calibri",sans-serif">From:</span></strong> Bogdan-Andrei Iancu
<a href="mailto:bogdan@opensips.org" target="_blank" rel="noreferrer"><bogdan@opensips.org></a><br>
<strong><span style="font-family:"Calibri",sans-serif">Sent:</span></strong> Tuesday, November 16, 2021, 6:45 PM<br>
<strong><span style="font-family:"Calibri",sans-serif">To:</span></strong> OpenSIPS users mailling list; Muhamad Putra Abdullah<br>
<strong><span style="font-family:"Calibri",sans-serif">Subject:</span></strong> Re: [OpenSIPS-Users] How to get all listening socket IP address as variable<u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<span style="font-family:"Courier New"">Hi,<br>
<br>
via the socket_xx() vars you can get only the sockets relative to/used by that call, you cannot iterate thru the listening sockets.<br>
<br>
Regards,<br>
<br>
</span><u></u><u></u></p>
<pre>Bogdan-Andrei Iancu<u></u><u></u></pre>
<pre><u></u> <u></u></pre>
<pre>OpenSIPS Founder and Developer<u></u><u></u></pre>
<pre> <a href="https://www.opensips-solutions.com" target="_blank" rel="noreferrer">https://www.opensips-solutions.com</a><u></u><u></u></pre>
<pre>OpenSIPS eBootcamp 2021 <u></u><u></u></pre>
<pre> <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/" target="_blank" rel="noreferrer">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a><u></u><u></u></pre>
<div>
<p class="MsoNormal">On 11/15/21 9:39 AM, Muhamad Putra Abdullah wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi, </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I have 2 listening interface for opensips 3.2. How do I get both IP address to be used as variable in opensips config file? I try to use socket_in/ socket_out but failed to get the other interface IP address.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">Thanks </span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank" rel="noreferrer">
Mail</a> for Windows<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal"><br>
<br>
<u></u><u></u></p>
<pre>_______________________________________________<u></u><u></u></pre>
<pre>Users mailing list<u></u><u></u></pre>
<pre><a href="mailto:Users@lists.opensips.org" target="_blank" rel="noreferrer">Users@lists.opensips.org</a><u></u><u></u></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><u></u><u></u></pre>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
</div>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank" rel="noreferrer">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>