<div dir="ltr"><div>You may try this: <a href="https://www.opensips.org/Documentation/Script-Tran-2-4#ip.resolve">https://www.opensips.org/Documentation/Script-Tran-2-4#ip.resolve</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 28, 2019 at 12:00 PM <<a href="mailto:users-request@lists.opensips.org">users-request@lists.opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Users mailing list submissions to<br>
<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:users-request@lists.opensips.org" target="_blank">users-request@lists.opensips.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:users-owner@lists.opensips.org" target="_blank">users-owner@lists.opensips.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Feature request - pseudo-variable for destination IP<br>
address (Ben Newlin)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 28 Jun 2019 15:38:01 +0000<br>
From: Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com" target="_blank">Ben.Newlin@genesys.com</a>><br>
To: OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Subject: Re: [OpenSIPS-Users] Feature request - pseudo-variable for<br>
destination IP address<br>
Message-ID: <<a href="mailto:9D325F82-E29F-4E7A-98F7-40E229D7486E@genesys.com" target="_blank">9D325F82-E29F-4E7A-98F7-40E229D7486E@genesys.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
As far as I know, the equivalent variable to $si on the destination side is either $dd, which may not always be set, or $rd. Those are not guaranteed to be IP addresses, however. If DNS is being used, I don't believe OpenSIPS provides the results of the DNS lookup to the script in any variable, so I don't think there is a way to find the actual IP aside from doing your own DNS lookup (or possibly using the dns_cache module and snooping the cache, but I have had issues with this module in the past.)<br>
<br>
Ben Newlin <br>
<br>
On 6/28/19, 10:16 AM, "Users on behalf of <a href="mailto:rob.dyck@telus.net" target="_blank">rob.dyck@telus.net</a>" <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a> on behalf of <a href="mailto:rob.dyck@telus.net" target="_blank">rob.dyck@telus.net</a>> wrote:<br>
<br>
Unfortunately the address of the interface where the request was receeived is private. I am using 1 to 1 NAT.<br>
<br>
----- Original Message -----<br>
From: "Ovidiu Sas" <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>><br>
To: "OpenSIPS users mailling list" <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Sent: Thursday, June 27, 2019 3:31:34 PM<br>
Subject: Re: [OpenSIPS-Users] Feature request - pseudo-variable for destination IP address<br>
<br>
Check out the $Ri pvar:<br>
<a href="https://www.opensips.org/Documentation/Script-CoreVar-3-0#toc78" rel="noreferrer" target="_blank">https://www.opensips.org/Documentation/Script-CoreVar-3-0#toc78</a><br>
<br>
-ovidiu<br>
<br>
On Thu, Jun 27, 2019 at 6:23 PM <a href="mailto:rob.dyck@telus.net" target="_blank">rob.dyck@telus.net</a> <<a href="mailto:rob.dyck@telus.net" target="_blank">rob.dyck@telus.net</a>> wrote:<br>
><br>
> I was looking for something similar to the $si PV but for the destination IP address. Either it doesn't exist or I am blind. I can't find things in the refrigerator either.<br>
><br>
> The motivation.<br>
><br>
> I have a working instance of Opensips with a basic residential configuration. I extended it to allow calling UAs on the LAN from the outside. It is a typical residential LAN without a fixed IP address. Dynamic DNS is working for me. I read the tutorial about Opensips behind NAT. Following the recommendations there I was able to setup rtpproxy, the advertised address and an alias for my Opensips. Initial testing using a softphone on a laptop using either WiFi or a mobile phone tethered to the laptop worked well. However it seems that some UAs will not accept a domain name in the SDP connection. The UAs that failed could be made to work by coding in an IP address. This is not a satisfactory solution because the router's address may chaange. There is probably some convoluted way to import the needed address into the script. A pseudo-variable representing the destination IP address of the received INVITE or 200 OK could then be passed as the advertised address to the rtpproxy module.<br>
><br>
> Thank you for having a look.<br>
> Rob<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
-- <br>
VoIP Embedded, Inc.<br>
<a href="http://www.voipembedded.com" rel="noreferrer" target="_blank">http://www.voipembedded.com</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Users Digest, Vol 131, Issue 82<br>
**************************************<br>
</blockquote></div>