<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Please tell me that is part of the AOR?<br>
Why, in my case in the list of permitted two AOR instead of one?<br>
Does "max_contacts" come if registration requests with the same
username and password, but different in other parameters (From, To
Contact...)?<br>
<br>
<div class="moz-cite-prefix">14.11.2014 23:18, Anton пишет:<br>
</div>
<blockquote cite="mid:5466639A.8020402@ptcomm.ru" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<span id="result_box" class="" lang="en"><span class="hps">In any
case,</span> <span class="hps">here</span> <span class="hps">there
is</span> <span class="hps">a parameter</span> <span
class="hps">modparam ("registrar", "max_contacts",</span> <span
class="hps">1)<br>
</span></span><span id="result_box" class="short_text" lang="en"><span
class="hps">so</span> <span class="hps">as</span> <span
class="hps">not</span> <span class="hps">not be</span> <span
class="hps">2</span> <span class="hps">AOR....<br>
</span></span><span id="result_box" class="short_text" lang="en"><span
class="hps"><span id="result_box" class="" lang="en"><span
class="hps">I think</span> <span class="hps">that the
second</span> <span class="hps">AOR</span> <span
class="hps">here -</span> <span class="hps">it's</span>
UAC<span class="hps"></span> <span class="hps">behind</span>
<span class="hps">NAT</span></span>...<br>
</span></span><span id="result_box" class="short_text" lang="en"><span
class="hps">How to</span> <span class="hps">disable</span> <span
class="hps">registration in</span> <span class="hps">this
case?</span></span><br>
<div class="moz-cite-prefix"><br>
14.11.2014 18:30, Răzvan Crainea пишет:<br>
</div>
<blockquote cite="mid:54662002.2030205@opensips.org" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix"><tt>I think there is a bug and I
opened an issue on github related to that[1]. If you could
confirm it works when explicitely specifying the AVP that
would be great.<br>
<br>
[1] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/OpenSIPS/opensips/issues/385">https://github.com/OpenSIPS/opensips/issues/385</a><br>
<br>
Best regards,<br>
</tt>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
On 11/14/2014 03:14 PM, Anton wrote:<br>
</div>
<blockquote cite="mid:54660033.4060804@ptcomm.ru" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<span id="result_box" class="" lang="en"><span class="hps">Why
so</span><span>?</span> <span class="hps">Quote from: </span></span><a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/1.11.x/auth_db.html#id293578">http://www.opensips.org/html/docs/modules/1.11.x/auth_db.html#id293578</a><br>
<br>
<p class="title"><b>Example 1.8. <code class="varname">load_credentials</code>
parameter usage</b></p>
<div class="example-contents">
<pre class="programlisting"># load rpid column into $avp(13) and email_address column
# into $avp(email_address)
modparam("auth_db", "load_credentials", "$avp(13)=rpid;email_address")
<span id="result_box" class="short_text" lang="en"><span class="hps">But</span> <span class="hps">as I have</span><span class="">:</span></span>
modparam("auth_db", "load_credentials", "$avp(loadedip)=domain;$avp(subscriber_username)=username;<big>maxao</big>r")
.....
<span id="result_box" class="short_text" lang="en"><span class="hps">Nelly</span> <span class="hps">is not</span> <span class="hps">correct?</span></span>
</pre>
</div>
<br>
<div class="moz-cite-prefix">14.11.2014 15:20, Răzvan Crainea
пишет:<br>
</div>
<blockquote cite="mid:5465F38C.3030403@opensips.org"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix"><tt>Can you print $avp(maxaor)
just before the save() function? I am pretty sure it is
not populated. And the reason is that you are not
specifying an AVP to store it. The load_credentials
parameter should be</tt><br>
"$avp(loadedip)=domain;$avp(subscriber_username)=username;$avp(maxaor)=maxaor"<br>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
On 11/14/2014 09:41 AM, Лытаев Антон Викторович wrote:<br>
</div>
<blockquote cite="mid:5465B247.5040805@ptcomm.ru"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi!<br>
<br>
There is a need to limit the maximum number of AOR for the
user.<br>
To do so:<br>
<br>
modparam("registrar", "max_contacts", 1)<br>
modparam("auth_db", "load_credentials",
"$avp(loadedip)=domain;$avp(subscriber_username)=username;<big>maxao</big>r")<br>
<br>
[user@opensips]# opensipsctl db show subscriber<br>
id username domain password
email_address ha1 ha1b rpid maxaor quota<br>
1 202020 77.66.55.44 123456
f665ec129cd4556aeed95f3b204ff002
888f4df11367b3f2859c4993a4ad7dd3 NULL <big>1 </big>
1<br>
<br>
Where: maxaor - maximum number of AOR (max limit).<br>
<br>
Next in the config:<br>
<br>
if (is_method("REGISTER"))<br>
{<br>
if(client_nat_test("8"))<br>
{<br>
sl_send_reply("403", "Not working NAT");<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
# authenticate the REGISTER requests (uncomment to
enable auth)<br>
if (!www_authorize("", "subscriber"))<br>
{<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
if ($si!=$avp(loadedip))<br>
{<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
<big>save("location","c($avp(maxaor))");</big><br>
if (!db_check_to())<br>
{<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
if (!save("location"))<br>
sl_reply_error();<br>
exit;<br>
}<br>
<br>
But in the presence of 2 AOR record:<br>
<br>
[user@opensips]# opensipsctl ul show 202020<br>
Contact:: <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="sip:202020@77.66.55.44;uniq=6041F87C7634A40A246E833DDA15E"><sip:202020@77.66.55.44;uniq=6041F87C7634A40A246E833DDA15E></a>;q=;expires=1471;flags=0x0;cflags=0x0;socket=<udp:85.85.85.85:5060>;callid=<a
moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="mailto:A8502C3B45165582@192.168.178.1"><A8502C3B45165582@192.168.178.1></a>;methods=0x3F7F;user_agent=<AVM
FRITZ!Box Fon WLAN 7140 Annex A 39.04.77 (Feb 14 2014)><br>
Contact:: <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="sip:202020@77.66.55.44:5075"><sip:202020@77.66.55.44:5075></a>;q=;expires=450;flags=0x0;cflags=0x0;socket=<udp:85.85.85.85:5060>;callid=<5E7D-E2CA-46940374551E59A3ADE4-649@SipHost>;methods=0xFFFFFFFF;user_agent=<204
12-37-1612531><br>
<br>
Why? What did I do wrong?<br>
<br>
Added a check here:<br>
if ($ct.fields(uri)=~'uniq')<br>
{<br>
sl_send_reply("403", "Wrong contact params");<br>
www_challenge("", "0");<br>
exit;<br>
}<br>
But it seems to me that this is not quite right.....<br>
Please help! <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
<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>