<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div><style id="ms-outlook-ios-style" type="text/css">html {
background-color: transparent;
}

body {
color: #333;
line-height: 150%;
font-family: "-apple-system", "HelveticaNeue";
margin: 0;
}

.ms-outlook-ios-reference-expand {
display: block;
color: #999;
padding: 20px 0px;
text-decoration: none;
}

.ms-outlook-ios-availability-container {
max-width: 500px;
margin: auto;
padding: 12px 15px 15px 15px;
border: 1px solid #C7E0F4;
border-radius: 4px;
}

.ms-outlook-ios-availability-container > .ms-outlook-ios-availability-delete-button {
width: 25px;
height: 25px;
right: -12px;
top: -12px;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAAAXNSR0IArs4c6QAACxpJREFUeAHlnFuMXlUVx/fcOzNtp0ynF0U7hWKrEmKLosZEjUZ9MgZIQBNC0uAtJr745oOJIT74xgskJkQbAlQNJmBMfNDEG0YjEC7GIBQZ6IAI005L79O5+/+dfut0f5dzzt7nu8w37UrWt893zt5rr/U/e6+zL+ucHrcGtLq62q9qd4gnxTeKb6kcc267eEI8Kz4mnhFPi58Rv1g5nunp6VnS8ZVHAqdHPCk+KP6zuBWEHORNinvWNWoYIN4q/o74mLidhHzqob71AxzKij8g/p14LYh6qb97QUM58T7x38TdQOiBPt0FmhQaEf9M3I2EXiNr7tOkBK3pVvGCuJsJ/dCzqVbWWxZxVTygso+InxBz3M2Efuj5SEXvUrqWQloV7lRtT4vfX6rWtS30pqr/uMZp78SqEQ2WgPqQKvmnuKWtaWnFuaWVVbciXl51rk+a9fb2uP6EY80qzL+oHB8RYC8V5vQyRIEloD6tsk965UsdAsyZ+WV35uKyOz+/4uZ0YgmEMqhfyA3397rRoV63eUOf2zzUJxAzMsed/owA+2tokWCwmgVKDcadvLDsZs8vutMXV5zkhepYl08GurENvW5idMCNj/Q5Nb5mKBiwoGoqXe/fZTQCkmNnl9x/Ty+4xZzW0yeLB9WC6Hp0QbLSJR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cd6Ov040O3J06LsV3CKzVpBvqgClPUJQfUcEWO8Dgjoi79UDoaYNp9MeOQPohQJHXfBbHD/NTRDRFooKN2IeLiEyxYh1N0e9t6WmE/hFu4DEr54P1B50MGs2z4E9UMMS0gdDE5eYG9YmsdvygF/rZxBm9/Q2Lgjp/r+vp4zYFS00Nc39cUDi9TPi0TUDZ4X1FCnUjoZfFZqAvekfQd60LUiYFqyLgUaXTlePchMgUwqclLMl3WvtvhCZ2E6EPekHoib4RET9/V7FXk8KVnyqwJJBByI/8DHnHbCkRPm2E/+oWwGpjStHT3wIznXPSe/xWRb4qsCoFDyl9qnJcmBBnTvi0EYC9NLN2PgwfRf3oYYR+kfHwYFDnvxs+FDRIPaDMfHQiaJbJc7U2vJvH85UWB98QLNnOqP4+Jd/jOJTW+g0Lhgf21MNHdeQNC8ARWAymcHIf5X8osVZ01b27AzgC7Holz4nH+B9KDAKvqrfCDBgB9hUdPy4O8l9WjpRFtqvmfUMzXIB9U8cP2v+YFOcf8yYr227sTLHCwexgXb3JasAIsB/oOHgMZuUsxXha2hX/jrQZ3CxgJoe1LSLuCCSLfvteczuWuANXOK3KrDT4ZXIEZA4dsqRXuuRPdD3ah2XJ5DwAEs1C16MV0hXpksznWgSMXz0j1vZ+18FqE2A4/YfFUU9JK7/G6Zuqv9QXQxpNdwpt0YDvN8p0szhoZ6hQYOcyHFZVvDSe+5Z9W9RRCxsU3ydeEnczteQrRy0BUSgdEP+jS9Hqju9n+UgLKL6l9XXx0S4BrTu/zFYDWr/AOig+skagdf83/3zAOBZQvOryRTEf+Donbid15GuS0eOsWlBC/gsl9iW/LP6C+PPi68TN0usS8EcxH6z4be2qZrPCG5XvCFi1FQu8SZ1j6YdXYeC9YuLxiZyGicQltpuoRPiEmJVLwqPgZwXOtNKO0v8BzRAPSFNM7HEAAAAASUVORK5CYII=");
background-size: 25px 25px;
background-position: center;
}

#ms-outlook-ios-main-container {
margin: 0 0 0 0;
margin-top: 120;
padding: 8;
}

#ms-outlook-ios-content-container {
padding: 0;
padding-top: 12;
padding-bottom: 20;
}

.ms-outlook-ios-mention {
color: #333;
background-color: #f1f1f1;
border-radius: 4px;
padding: 0 2px 0 2px;
pointer-events: none;
text-decoration: none;
}

.ms-outlook-ios-mention-external {
color: #ba8f0d;
background-color: #fdf7e7;
}

.ms-outlook-ios-mention-external-clear-design {
color: #ba8f0d;
background-color: #f1f1f1;
}</style>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<div style="direction: ltr;">
<div style="direction: ltr;">I am interested</div>
<div><br>
</div>
<div class="ms-outlook-ios-signature"><a href="https://aka.ms/o0ukef">Outlook voor iOS</a> downloaden</div>
</div>
<div> </div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="dir="ltr""><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> Users <users-bounces@lists.opensips.org> namens Vitalii Aleksandrov <vitalik.voip@gmail.com><br>
<b>Verzonden:</b> donderdag, juli 18, 2019 4:56 PM<br>
<b>Aan:</b> users@lists.opensips.org<br>
<b>Onderwerp:</b> Re: [OpenSIPS-Users] Feature request - pseudo-variable for destination IP address
<div> </div>
</font></div>
Hi,<br>
<br>
Original question was about different thing but the destination IP of a <br>
request or reply is not hard to get. I wrote a small module which <br>
extracts the destination uri from ru (du) for requests and from via for <br>
replies, makes a dns resolve if it's a domain name and then detects the <br>
outgoing interface of opensips and exports it as a PV to config. The <br>
goal was to configure rtpengine's direction to bridge between different <br>
interfaces. Adding just a few more lines of code will export the <br>
destination IP as a PV. Since I use dns cache module resolve happens <br>
only once and when t_relay() (tm module) searches for a destination it <br>
just reuses previously resolved values from cache. I can share it if <br>
anybody needs it.<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 rob.dyck@telus.net" <users-bounces@lists.opensips.org on behalf of rob.dyck@telus.net> 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" <osas@voipembedded.com><br>
> To: "OpenSIPS users mailling list" <users@lists.opensips.org><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>
> https://www.opensips.org/Documentation/Script-CoreVar-3-0#toc78<br>
> <br>
> -ovidiu<br>
> <br>
> On Thu, Jun 27, 2019 at 6:23 PM rob.dyck@telus.net <rob.dyck@telus.net> 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>
> > Users@lists.opensips.org<br>
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>
> <br>
> <br>
> <br>
> --<br>
> VoIP Embedded, Inc.<br>
> http://www.voipembedded.com<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@lists.opensips.org<br>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@lists.opensips.org<br>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>
> <br>
> <br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@lists.opensips.org<br>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
Users@lists.opensips.org<br>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>
</div>
</body>
</html>