<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<font face="monospace">If so, when you receive a request on the
external IP, the $socket_in(ip) should return the actual DHCP IP.<br>
<br>
Regards,<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS eBootcamp 2021
<a class="moz-txt-link-freetext" href="https://opensips.org/training/OpenSIPS_eBootcamp_2021/">https://opensips.org/training/OpenSIPS_eBootcamp_2021/</a></pre>
<div class="moz-cite-prefix">On 11/17/21 10:21 AM, Muhamad Putra
Abdullah wrote:<br>
</div>
<blockquote type="cite"
cite="mid:SI2PR03MB55614113946B55C832F247A2FD9A9@SI2PR03MB5561.apcprd03.prod.outlook.com">
<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-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;}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;}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]-->
<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
<a class="moz-txt-link-rfc2396E" href="mailto:bogdan@opensips.org"><bogdan@opensips.org></a>
<br>
<b>Sent:</b> Wednesday, 17 November, 2021 3:55 PM<br>
<b>To:</b> Muhamad Putra Abdullah
<a class="moz-txt-link-rfc2396E" href="mailto:m.putra77@outlook.com"><m.putra77@outlook.com></a>; OpenSIPS users mailling
list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><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" moz-do-not-send="true">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/" moz-do-not-send="true">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"
moz-do-not-send="true">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" style="text-align:center"
align="center">
<hr width="98%" size="2" 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"
moz-do-not-send="true"><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" moz-do-not-send="true">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/" moz-do-not-send="true">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"
moz-do-not-send="true">
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" moz-do-not-send="true">Users@lists.opensips.org</a><o:p></o:p></pre>
<pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">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>
</blockquote>
<br>
</body>
</html>