<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=us-ascii">
<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:"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:Consolas;
panose-1:2 11 6 9 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:Consolas;}
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:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-MY" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">socket=udp:enp1s0:5060 tag INTERNAL_IP # CUSTOMIZE ME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">socket=udp:enp2s0:5060 tag EXTERNAL_IP # CUSTOMIZE ME<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">My INTERNAL_IP is set to static and EXTERNAL_IP set to DHCP. I just use tag to test something.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></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 <bogdan@opensips.org>
<br>
<b>Sent:</b> Wednesday, 17 November, 2021 3:55 PM<br>
<b>To:</b> Muhamad Putra Abdullah <m.putra77@outlook.com>; OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject:</b> Re: [OpenSIPS-Users] How to get all listening socket IP address as variable<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></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><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre> <a href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a><o:p></o:p></pre>
<pre>OpenSIPS eBootcamp 2021 <o:p></o:p></pre>
<pre> <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 11/17/21 2:19 AM, Muhamad Putra Abdullah wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="color:#212121">Hi,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121"><o:p> </o:p></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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:#212121">Regards<o:p></o:p></span></p>
</div>
<div id="ms-outlook-mobile-signature">
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Get <a href="https://aka.ms/AAb9ysg">Outlook for Android</a><o:p></o:p></p>
</div>
<div id="id-7c8cb1de-0d49-4aee-8134-d15557d98ca5">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><strong><span style="font-family:"Calibri",sans-serif">From:</span></strong> Bogdan-Andrei Iancu
<a href="mailto:bogdan@opensips.org"><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<o:p></o:p></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><o:p></o:p></p>
<pre>Bogdan-Andrei Iancu<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>OpenSIPS Founder and Developer<o:p></o:p></pre>
<pre> <a href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a><o:p></o:p></pre>
<pre>OpenSIPS eBootcamp 2021 <o:p></o:p></pre>
<pre> <a href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a><o:p></o:p></pre>
<div>
<p class="MsoNormal">On 11/15/21 9:39 AM, Muhamad Putra Abdullah wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi, </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></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><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Thanks </span><o:p></o:p></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<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>