<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Nate,<br>
<br>
If you simply want to check if the domain part of a SIP URI is an
IP, you do not need a module for that, you can simply use a regexp
for that. For example for checking the FROM domain:<br>
<br>
if ($fd=~"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" )<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="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
</pre>
<div class="moz-cite-prefix">On 12/09/2017 07:40 AM, Nathan Baker
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CADwrbY16-doE4brJV_iQJ+Niq4D-J47hYpufaVf_PSQs+170-A@mail.gmail.com">
<div dir="ltr">Hi Everyone,
<div><br>
</div>
<div>I've come across a few instances where it would be nice to
check if the URI is an IP address or domain, or check if an IP
address is a private (RFC 1918) address, and a few other
things. I don't see an easy way to do these things in
OpenSIPS, but I do see a Kamailio module called IPOPS that
does these sort of things. I'm just wondering, is it possible
to use the Kamailio module in OpenSIPS (either drop in the
compiled module, or compile it)? Or is there an easier way to
do similar things in OpenSIPS?</div>
<div><br>
</div>
<div>If not, it looks like the licenses are compatible, is it
possible to pull that module into OpenSIPS? Sorry if this has
come up before, I couldn't find it when searching.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>-Nate</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>