<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>putting such conditions in the config file is possible, but if
you have more than those listed user ids, probably is better to
keep them in a database.</p>
<p>Anyhow, for doing the conditions in the config file, you can use
the variable $rU (r-uri username) and $rd (r-uri domain) as well
as $fU (From uri username) and $fd (From-uri domain) to compare
with the values you want.</p>
<p>You can look at the core cookbook to understand the structure of
the config file:</p>
<p> * <a href="https://www.kamailio.org/wiki/cookbooks/devel/core">https://www.kamailio.org/wiki/cookbooks/devel/core</a></p>
<p>And the list of variables is available at:</p>
<p> * <a
href="https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables">https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables</a></p>
<p>The default config file is also a good start point to play with
Kamailio to get its basics.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 05.07.19 19:37, Ronald Hartmann
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+5WC-m2JoXiypM2yDKwMd_M=PJPc2g03GfAqJ8aB8712wNHVg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<p style="margin:0in;font-family:Calibri;font-size:11pt">Good
Day List,</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">I am
very new to <span
style="color:rgb(87,87,87);font-family:"Open
Sans",Helvetica,sans-serif;font-size:14px">Kamailio and
trying to understand at 10,000 feet how it may be able to be
used.</span> I was wondering if the following Scenario would
be possible and if so what modules would accomplish this
aspect. (Any URLs for further reading would be appreciated)</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">Scenario:</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">Given </p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">1)
SoftPhones will register as follows</p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt">sip
uri, <a href="mailto:user@subdomain.myvoipserver.com"
target="_blank" moz-do-not-send="true">user@subdomain.myvoipserver.com</a> </p>
</blockquote>
<p style="margin:0in;font-family:Calibri;font-size:11pt">2) The
following users are authorized to connect (this would be
stored in a config file etc):</p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt"><span
style="font-size:11pt">1001,1003,1007 are valid users for </span><a
href="http://apples.myvoipserver.com/" target="_blank"
style="font-size:11pt" moz-do-not-send="true">apples.myvoipserver.com</a></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><span
style="font-size:11pt">1001,2213,5817 are valid users for </span><a
href="http://oranges.myvoipserver.com/" target="_blank"
style="font-size:11pt" moz-do-not-send="true">oranges.myvoipserver.com</a></p>
</blockquote>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">Is it
possible for Kamailio to perform the following evaluation and
then take the appropriate steps:</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">If
[domain is <a href="http://apples.myvoipserver.com/"
target="_blank" moz-do-not-send="true">apples.myvoipserver.com</a> AND
user portion is 1001]</p>
<p style="margin:0in 0in 0in
0.375in;font-family:Calibri;font-size:11pt">then</p>
<p style="margin:0in 0in 0in
0.75in;font-family:Calibri;font-size:11pt">Forward/Proxy the
SIP/RTP packets to</p>
<p style="margin:0in 0in 0in
0.75in;font-family:Calibri;font-size:11pt">Asterisk server
responsible for registration and audio for the domain <a
href="http://apples.myvoipserver.com/" target="_blank"
moz-do-not-send="true">apples.myvoipserver.com</a></p>
<p style="margin:0in 0in 0in
0.75in;font-family:Calibri;font-size:11pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">Else if
[domain is <a href="http://oranges.myvoipserver.com/"
target="_blank" moz-do-not-send="true">oranges.myvoipserver.com</a> AND
user portion is 2213]</p>
<p style="margin:0in 0in 0in
0.375in;font-family:Calibri;font-size:11pt">then</p>
<p style="margin:0in 0in 0in
0.75in;font-family:Calibri;font-size:11pt">Forward/Proxy the
SIP/RTP packets to</p>
<p style="margin:0in 0in 0in
0.75in;font-family:Calibri;font-size:11pt">Asterisk server
responsible for registration and audio for the domain <a
href="http://oranges.myvoipserver.com/" target="_blank"
moz-do-not-send="true">oranges.myvoipserver.com</a></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">Else</p>
<p style="margin:0in 0in 0in
0.375in;font-family:Calibri;font-size:11pt">Silently Drop
packets etc.</p>
<p style="margin:0in 0in 0in
0.375in;font-family:Calibri;font-size:11pt"> </p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">given
the above evaluation rules, a user who tries to register as </p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><a
href="mailto:1001@apples.myvoipserver.com"
moz-do-not-send="true">1001@apples.myvoipserver.com</a> </p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt">would
be granted access and their SIP Packets and subsequent RTP
would be forwarded to the asterisk server at <a
href="http://apples.myvoipserver.com"
moz-do-not-send="true">apples.myvoipserver.com</a>, where
said server would take care of the Registration, and any
subsequent calls, subscriptions, Options etc.</p>
</blockquote>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">1004@ <a
href="http://apples.myvoipserver.com" moz-do-not-send="true">apples.myvoipserver.com</a></p>
<blockquote style="font-family:Calibri;font-size:11pt;margin:0px
0px 0px 40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt">Would
not match the authorized list for <a
href="http://apples.myvoipserver.com"
moz-do-not-send="true">apples.myvoipserver.com</a> (<span
style="font-size:14.6667px">1001,1003,1007), therefore
this registration attempt would be silently dropped</span></p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><span
style="font-size:14.6667px"><br>
</span></p>
</blockquote>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><a
href="mailto:2213@apples.myvoipserver.com"
moz-do-not-send="true">2213@apples.myvoipserver.com</a> </p>
<blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt">would
be granted access and their SIP Packets and subsequent RTP
would be forwarded to the asterisk server at <a
href="http://oranges.myvoipserver.com"
moz-do-not-send="true">oranges.myvoipserver.com</a>, where
said server would take care of the Registration, and any
subsequent calls, subscriptions, Options etc.</p>
</blockquote>
<blockquote style="font-family:Calibri;font-size:11pt;margin:0px
0px 0px 40px;border:none;padding:0px">
<p style="margin:0in;font-family:Calibri;font-size:11pt"><span
style="font-size:14.6667px"><br>
</span></p>
</blockquote>
<p style="margin:0in;font-family:Calibri;font-size:11pt"> Thanks
for any information to assist me in understanding how this
would work.</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt">~ron</p>
<p style="margin:0in;font-family:Calibri;font-size:11pt"><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</body>
</html>