<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Mark,<br>
      <br>
      Only fixes are backported to the existing releases, so these new
      variables are available only starting 3.1 <br>
      <br>
      Best regards,<br>
    </tt>
    <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>

</pre>
    <div class="moz-cite-prefix">On 4/27/20 4:30 PM, Mark Farmer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDevKTaoiWktbTSHEi8-ORVnN1RmsGKo+LWbW+hSbZoE71Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Bogdan
        <div><br>
        </div>
        <div>That looks great! Exactly what I was looking for :)</div>
        <div><br>
        </div>
        <div>Will this be available in 3.1 only? My solution currently
          uses 2.4 but I'm hoping to be able to upgrade it to 3.1 before
          go live.</div>
        <div><br>
        </div>
        <div>Nice work and thank you.</div>
        <div>Mark.</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, 23 Apr 2020 at 11:49,
          Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org"
            moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF"> <tt>Hi Mark,<br>
              <br>
              check these new variables $socket_in() and $socket_out()
              in 3.1<br>
              <br>
              <a
href="https://www.opensips.org/Documentation/Script-CoreVar-3-1#socket_in"
                target="_blank" moz-do-not-send="true">https://www.opensips.org/Documentation/Script-CoreVar-3-1#socket_in</a><br>
              <br>
              <a
href="https://www.opensips.org/Documentation/Script-CoreVar-3-1#socket_out"
                target="_blank" moz-do-not-send="true">https://www.opensips.org/Documentation/Script-CoreVar-3-1#socket_out</a><br>
              <br>
              Regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>

</pre>
            <div>On 4/7/20 7:29 PM, Bogdan-Andrei Iancu wrote:<br>
            </div>
            <blockquote type="cite"> <tt>No need, just use in script,
                where ever you need $socket_in(advertised_ip) and it
                will be evaluated for the current socket (used for
                receiving the request)<br>
                <br>
                Regardsm<br>
              </tt>
              <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a href="https://www.opensips.org/events/Summit-2020Amsterdam/" target="_blank" moz-do-not-send="true">https://www.opensips.org/events/Summit-2020Amsterdam/</a>

</pre>
              <div>On 4/7/20 6:56 PM, Mark Farmer wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">I was thinking something like:
                      <div><br>
                      </div>
                      <div>modparam("cfgutils", "varset", "extip=s:<span
                          style="font-family:monospace">$in_socket.advertised_ip</span>")<br>
                      </div>
                      <div><br>
                      </div>
                    </div>
                  </div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Tue, 7 Apr 2020
                    at 14:40, Bogdan-Andrei Iancu <<a
                      href="mailto:bogdan@opensips.org" target="_blank"
                      moz-do-not-send="true">bogdan@opensips.org</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                    <div bgcolor="#FFFFFF"> <tt>Hi Mark,<br>
                        <br>
                        ingenious solution :)<br>
                        <br>
                        In regards to the proposed solution, I do not
                        understand the question about varset (cfgutils),
                        as there is no relation between the script vars
                        and these new $socket vars. Maybe I'm missing
                        something from your question.<br>
                        <br>
                        Regards,<br>
                      </tt>
                      <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a href="https://www.opensips.org/events/Summit-2020Amsterdam/" target="_blank" moz-do-not-send="true">https://www.opensips.org/events/Summit-2020Amsterdam/</a>

</pre>
                      <div>On 4/7/20 2:10 PM, Mark Farmer wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">
                          <div dir="ltr"><font face="arial, sans-serif">Hi
                              Bogdan<br>
                            </font>
                            <div><font face="arial, sans-serif"><br>
                              </font></div>
                            <div><font face="arial, sans-serif">The root
                                of my issue is that I need 2 variables
                                containing the IP's of my 2 interfaces
                                (mhomed=yes) but the advertised address
                                of the NAT'd DMZ interface while keeping
                                changes per server to a bare minimum to
                                ease deployment.</font></div>
                            <div><font face="arial, sans-serif"><br>
                              </font></div>
                            <div><span style="color:rgb(0,0,0)"><font
                                  face="arial, sans-serif">I actually
                                  solved my issue by using include_file
                                  and using cfgutils to set 2 script
                                  variables. So now all deployment
                                  changes are confined to a much
                                  simpler/smaller file.</font></span><br>
                            </div>
                            <div><span
                                style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium"><br>
                              </span></div>
                            <div>However, the proposed changes would
                              make things even nicer. Would cfgutils be
                              able to accept those variables as
                              parameters to the 'varset' function?</div>
                            <div><br>
                            </div>
                            <div>Regards</div>
                            <div>Mark.</div>
                            <div><br>
                            </div>
                            <div><br>
                            </div>
                          </div>
                        </div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">On Tue, 7
                            Apr 2020 at 11:44, Bogdan-Andrei Iancu <<a
                              href="mailto:bogdan@opensips.org"
                              target="_blank" moz-do-not-send="true">bogdan@opensips.org</a>>
                            wrote:<br>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
                            <div bgcolor="#FFFFFF"> <tt>Hi guys,<br>
                                <br>
                                Maybe adding a new core variable like
                                $in_socket.XXXX, to give access to
                                various fields, like $in_socket.ip, </tt><tt><tt>$in_socket.port,
                                </tt></tt><tt><tt><tt>$in_socket.advertised_ip,
                                    etc. This will replace the $Ri and
                                    $Rp<br>
                                    <br>
                                    And we can also add $out_socket,
                                    that will similarly replace the $fs
                                    (forced socket)<br>
                                    <br>
                                    Regards,<br>
                                  </tt></tt></tt>
                              <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">https://www.opensips-solutions.com</a>
OpenSIPS Summit, Amsterdam, May 2020
  <a href="https://www.opensips.org/events/Summit-2020Amsterdam/" target="_blank" moz-do-not-send="true">https://www.opensips.org/events/Summit-2020Amsterdam/</a>

</pre>
                              <div>On 4/6/20 6:00 PM, Johan De Clercq
                                wrote:<br>
                              </div>
                              <blockquote type="cite">
                                <div dir="ltr">
                                  <div>
                                    <div>It,s not exposed I think. I
                                      can’t find it back either</div>
                                    <div><br>
                                    </div>
                                    <div
id="gmail-m_-7518600906568182409gmail-m_7508951186920346335gmail-m_4751992470391135192ms-outlook-mobile-signature"><a
                                        href="https://aka.ms/o0ukef"
                                        target="_blank"
                                        moz-do-not-send="true">Outlook
                                        voor iOS</a> downloaden</div>
                                  </div>
                                </div>
                                <hr
                                  style="display:inline-block;width:98%">
                                <div
id="gmail-m_-7518600906568182409gmail-m_7508951186920346335gmail-m_4751992470391135192divRplyFwdMsg"
                                  dir="ltr"><font style="font-size:11pt"
                                    face="Calibri, sans-serif"
                                    color="#000000"><b>Van:</b> Users <a
href="mailto:users-bounces@lists.opensips.org" target="_blank"
                                      moz-do-not-send="true"><users-bounces@lists.opensips.org></a>
                                    namens David Villasmil <a
                                      href="mailto:david.villasmil.work@gmail.com"
                                      target="_blank"
                                      moz-do-not-send="true"><david.villasmil.work@gmail.com></a><br>
                                    <b>Verzonden:</b> Monday, April 6,
                                    2020 4:49:36 PM<br>
                                    <b>Aan:</b> OpenSIPS users mailling
                                    list <a
                                      href="mailto:users@lists.opensips.org"
                                      target="_blank"
                                      moz-do-not-send="true"><users@lists.opensips.org></a><br>
                                    <b>Onderwerp:</b> Re:
                                    [OpenSIPS-Users] Access to
                                    listen/advertised IP Addresses</font>
                                  <div> </div>
                                </div>
                                <div>
                                  <div>
                                    <div dir="auto">No, you’re right.
                                      It’s not in the core variables and
                                      I can’t find it either. Which
                                      makes me think it’s either not
                                      exposed or somewhere in a module
                                      (it’s not in proto_udp)</div>
                                    <div dir="auto"><br>
                                    </div>
                                    <div dir="auto">I will research a
                                      little to try and find it..</div>
                                  </div>
                                  <div><br>
                                    <div>
                                      <div dir="ltr">On Mon, 6 Apr 2020
                                        at 14:04, Mark Farmer <<a
                                          href="mailto:farmorg@gmail.com"
                                          target="_blank"
                                          moz-do-not-send="true">farmorg@gmail.com</a>>
                                        wrote:<br>
                                      </div>
                                      <blockquote style="margin:0px 0px
                                        0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                                        <div dir="ltr">
                                          <div dir="ltr">
                                            <div dir="ltr">Thanks David.
                                              But I see no reference to
                                              the same variable in
                                              OpenSIPS.<br>
                                              <div><br>
                                              </div>
                                              <div>
                                                <div><a
                                                    href="https://www.opensips.org/Documentation/Script-CoreVar-2-4"
                                                    target="_blank"
                                                    moz-do-not-send="true">https://www.opensips.org/Documentation/Script-CoreVar-2-4</a><br>
                                                </div>
                                              </div>
                                              <div><br>
                                              </div>
                                              <div>Am I missing
                                                something?</div>
                                              <div><br>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                        <br>
                                        <div>
                                          <div dir="ltr">On Mon, 6 Apr
                                            2020 at 13:45, David
                                            Villasmil <<a
                                              href="mailto:david.villasmil.work@gmail.com"
                                              target="_blank"
                                              moz-do-not-send="true">david.villasmil.work@gmail.com</a>>
                                            wrote:<br>
                                          </div>
                                          <blockquote style="margin:0px
                                            0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                                            <div dir="ltr">Right here:
                                              <div><br>
                                              </div>
                                              <div><a
href="https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#rai_-_received_advertised_ip_address"
                                                  target="_blank"
                                                  moz-do-not-send="true">https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#rai_-_received_advertised_ip_address</a></div>
                                              <div><br clear="all">
                                                <div>
                                                  <div dir="ltr">
                                                    <div dir="ltr">
                                                      <div>Regards,</div>
                                                      <div><br>
                                                      </div>
                                                      David Villasmil
                                                      <div>email: <a
                                                          href="mailto:david.villasmil.work@gmail.com"
target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                                                      <div>phone:
                                                        +34669448337</div>
                                                    </div>
                                                  </div>
                                                </div>
                                                <br>
                                              </div>
                                            </div>
                                            <br>
                                            <div>
                                              <div dir="ltr">On Mon, Apr
                                                6, 2020 at 12:08 PM Mark
                                                Farmer <<a
                                                  href="mailto:farmorg@gmail.com"
                                                  target="_blank"
                                                  moz-do-not-send="true">farmorg@gmail.com</a>>
                                                wrote:<br>
                                              </div>
                                              <blockquote
                                                style="margin:0px 0px
                                                0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                                                <div dir="ltr">
                                                  <div dir="ltr">Many
                                                    thanks for the
                                                    reply.<br>
                                                    <div><br>
                                                    </div>
                                                    <div>$Ri is
                                                      certainly useful
                                                      when the request
                                                      comes from a
                                                      non-natted
                                                      interface. Thanks
                                                      for pointing that
                                                      out :)</div>
                                                    <div><br>
                                                    </div>
                                                    <div>Is there a way
                                                      to reference the
                                                      advertised IP
                                                      address defined in
                                                      the listen
                                                      statement?</div>
                                                    <div><br>
                                                    </div>
                                                    <div>listen=udp:xxx.xxx.xxx.xxx:5060
                                                      as
                                                      xxx.xxx.xxx.xxx:5060<br>
                                                    </div>
                                                    <div><br>
                                                    </div>
                                                    <div>Thanks</div>
                                                    <div>Mark.</div>
                                                    <div><br>
                                                    </div>
                                                  </div>
                                                </div>
                                                <br>
                                                <div>
                                                  <div dir="ltr">On Thu,
                                                    2 Apr 2020 at 17:32,
                                                    Sharad Kumar via
                                                    Users <<a
                                                      href="mailto:users@lists.opensips.org"
                                                      target="_blank"
                                                      moz-do-not-send="true">users@lists.opensips.org</a>>
                                                    wrote:<br>
                                                  </div>
                                                  <blockquote
                                                    style="margin:0px
                                                    0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
                                                    <div>
                                                      <p>Hi Mark, <br>
                                                      </p>
                                                      <p> If your
                                                        initial goal is
                                                        to get the
                                                        interface IP
                                                        where request is
                                                        received then
                                                        you can try
                                                        these variables.<br>
                                                      </p>
                                                      <p><strong>$Ri</strong>
                                                        - reference to
                                                        IP address of
                                                        the interface
                                                        where the
                                                        request has been
                                                        received </p>
                                                      <p><strong>$Rp</strong>
                                                        - reference to
                                                        the port where
                                                        the message was
                                                        received <br>
                                                      </p>
                                                    </div>
_______________________________________________<br>
                                                    Users mailing list<br>
                                                    <a
                                                      href="mailto:Users@lists.opensips.org"
                                                      target="_blank"
                                                      moz-do-not-send="true">Users@lists.opensips.org</a><br>
                                                    <a
                                                      href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                      rel="noreferrer"
                                                      target="_blank"
                                                      moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                                  </blockquote>
                                                </div>
                                                <br clear="all">
                                                <div><br>
                                                </div>
                                                -- <br>
                                                <div dir="ltr">Mark
                                                  Farmer<br>
                                                  <a
                                                    href="mailto:farmorg@gmail.com"
                                                    target="_blank"
                                                    moz-do-not-send="true">farmorg@gmail.com</a></div>
_______________________________________________<br>
                                                Users mailing list<br>
                                                <a
                                                  href="mailto:Users@lists.opensips.org"
                                                  target="_blank"
                                                  moz-do-not-send="true">Users@lists.opensips.org</a><br>
                                                <a
                                                  href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                                  rel="noreferrer"
                                                  target="_blank"
                                                  moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                              </blockquote>
                                            </div>
_______________________________________________<br>
                                            Users mailing list<br>
                                            <a
                                              href="mailto:Users@lists.opensips.org"
                                              target="_blank"
                                              moz-do-not-send="true">Users@lists.opensips.org</a><br>
                                            <a
                                              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                              rel="noreferrer"
                                              target="_blank"
                                              moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                          </blockquote>
                                        </div>
                                        <br clear="all">
                                        <div><br>
                                        </div>
                                        -- <br>
                                        <div dir="ltr">Mark Farmer<br>
                                          <a
                                            href="mailto:farmorg@gmail.com"
                                            target="_blank"
                                            moz-do-not-send="true">farmorg@gmail.com</a></div>
_______________________________________________<br>
                                        Users mailing list<br>
                                        <a
                                          href="mailto:Users@lists.opensips.org"
                                          target="_blank"
                                          moz-do-not-send="true">Users@lists.opensips.org</a><br>
                                        <a
                                          href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                                          rel="noreferrer"
                                          target="_blank"
                                          moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                                      </blockquote>
                                    </div>
                                  </div>
                                  -- <br>
                                  <div dir="ltr">
                                    <div dir="ltr">
                                      <div>Regards,</div>
                                      <div><br>
                                      </div>
                                      David Villasmil
                                      <div>email: <a
                                          href="mailto:david.villasmil.work@gmail.com"
                                          target="_blank"
                                          moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                                      <div>phone: +34669448337</div>
                                    </div>
                                  </div>
                                </div>
                                <br>
                                <fieldset></fieldset>
                                <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                              </blockquote>
                              <br>
                            </div>
_______________________________________________<br>
                            Users mailing list<br>
                            <a href="mailto:Users@lists.opensips.org"
                              target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
                            <a
                              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                              rel="noreferrer" target="_blank"
                              moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          </blockquote>
                        </div>
                        <br clear="all">
                        <div><br>
                        </div>
                        -- <br>
                        <div dir="ltr">Mark Farmer<br>
                          <a href="mailto:farmorg@gmail.com"
                            target="_blank" moz-do-not-send="true">farmorg@gmail.com</a></div>
                        <br>
                        <fieldset></fieldset>
                        <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                      </blockquote>
                      <br>
                    </div>
                  </blockquote>
                </div>
                <br clear="all">
                <div><br>
                </div>
                -- <br>
                <div dir="ltr">Mark Farmer<br>
                  <a href="mailto:farmorg@gmail.com" target="_blank"
                    moz-do-not-send="true">farmorg@gmail.com</a></div>
              </blockquote>
              <br>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">Mark Farmer<br>
        <a href="mailto:farmorg@gmail.com" target="_blank"
          moz-do-not-send="true">farmorg@gmail.com</a></div>
    </blockquote>
    <br>
  </body>
</html>