<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi Volkan,<br>
<br>
Well, there is no really straight forward way to do that.
Normally, the calls you receive from the registrar should have in
the RURI the actual Contact URI you registered. So this is a way
to do it.<br>
<br>
Another one, if you do not have multiple accounts registered
against the same registrar, you can do the detection based on the
source IP of the calls - it will have to match the IP address of
the registrar server (or outbound server) - but this means you
should have this registrar and OBP addresses in the DB as IPs (for
easy matching).<br>
<br>
In both cases you will need to do some DB queries which are not by
default provided the uac_registrant module, like fetch the ID of a
registrant based on its Contact URI or Registrar IP.<br>
<br>
Best 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 12/6/21 3:24 PM, Volkan Oransoy
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:ba37eeb2-b76d-4ffb-a744-0f2d4f46a146@Spark">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<div name="messageBodySection">
<div dir="auto">Hi all,<br>
<br>
I am using uac_registrant to register a bunch of sip accounts
to remote sip registrars. There are multiple remote registrars
and a we can register more than one account to a registrar. My
Opensips instance can succesfully register and can receive
calls as of now. What I am trying to accomplish is to identify
calls and match with my registered accounts to route the call
to the appropriate destination and for security. I can check
the source IP addresses along with contact headers but I don’t
have any experience whether this is the right way or not. Can
you suggest a way to match these calls with my
uac_registrants? <br>
<br>
Thanks</div>
</div>
<div name="messageSignatureSection"><br>
<div class="matchFont">/Volkan</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-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>