Is it possible that you are setting the profile more than once ever? if you are, that could be the problem. I don&#39;t think anything prevents that from happening, and if you added it twice, the destruction of the dialog would only reduce the count by one, instead of two. I may be wrong here.. The times I&#39;ve had dialogs left open that couldn&#39;t get cleared, I had record-routing problems (see list history!) or I was doing something silly with setting the profiles<div>
<br class="webkit-block-placeholder"></div><div>BTW, I do this now. I&#39;m not sure if it&#39;s even necessary. I&#39;m using 1.4, so I don&#39;t have a create_dialog() function..</div><div><div>                if (!is_in_profile(&quot;SRC&quot;,&quot;$si&quot;)) {</div>
<div>                        set_dlg_profile(&quot;SRC&quot;,&quot;$si&quot;);</div><div>                }</div><div><br></div><div>Now, if I could pull avps from memory. that&#39;d be sweet. :) I&#39;m going to upgrade when 1.5 is released and then we&#39;ll start with the memcache fun. :)</div>
<div>-BRett</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br><div class="gmail_quote">On Fri, Mar 6, 2009 at 9:04 AM, Robert Borz <span dir="ltr">&lt;<a href="mailto:robert.borz@web.de">robert.borz@web.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Brett,<br>
<br>
thanks for the hints, but doesn&#39;t work for me.<br>
The did information in the record route header and the BYEs are there.<br>
I also tried the other two match modes, with no success. :-(<br>
<br>
Any idea?<br>
<br>
<br>
Regards,<br>
Robert<br>
<br>
________________________________________<br>
From: <a href="mailto:brett@nemeroff.com">brett@nemeroff.com</a> [mailto:<a href="mailto:brett@nemeroff.com">brett@nemeroff.com</a>]<br>
Sent: Friday, March 06, 2009 3:32 PM<br>
<div class="im">To: <a href="mailto:robert.borz@web.de">robert.borz@web.de</a><br>
</div>Cc: <a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>; <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
<div><div></div><div class="h5">Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use<br>
<br>
Check to be sure you really get the BYE at the end of the call.<br>
<br>
Also take a look at the bye and see if the &#39;did=&#39; is in there, if it&#39;s not (ie: if the other end UAC removes it, which it really shouldn&#39;t) then you may need to change your dialog match mode. See the dialog module docs for that.<br>

<br>
-Brett<br>
<br>
On Fri, Mar 6, 2009 at 7:25 AM, Robert Borz &lt;<a href="mailto:robert.borz@web.de">robert.borz@web.de</a>&gt; wrote:<br>
Hi Bogdan,<br>
<br>
now I&#39;m currently using the svn head of opensips version 1.5.<br>
<br>
I succeeded in pushing the channel value from the radius server into opensips by an SIP-AVP in the auth-reply. :-)<br>
<br>
But I&#39;ve got problems with the dialog profiling. Maybe I&#39;m missing something here. At the moment I&#39;ve got the following configuration for the dialog module:<br>
<br>
----------------------------------------------------------------------------<br>
loadmodule &quot;dialog.so&quot;<br>
modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, 4)<br>
modparam(&quot;dialog&quot;, &quot;profiles_with_value&quot;, &quot;caller&quot;)<br>
----------------------------------------------------------------------------<br>
<br>
<br>
Following the link you told me I do the following in my invite-route after radius_proxy_authorize():<br>
<br>
----------------------------------------------------------------------------<br>
if (create_dialog() &amp;&amp; set_dlg_profile(&quot;caller&quot;, &quot;$fu&quot;)) {<br>
       xlog(&quot;L_INFO&quot;, &quot;created dialog/added profile&quot;);<br>
}<br>
xlog(&quot;L_INFO&quot;, &quot;SIP-AVP ===&gt; $avp(s:channels)&quot;);<br>
<br>
if (is_avp_set(&quot;$avp(s:channels)/n&quot;) &amp;&amp; avp_check(&quot;$avp(s:channels)&quot;, &quot;gt/i:0&quot;)) {<br>
       get_profile_size(&quot;caller&quot;, &quot;$fu&quot;, &quot;$avp(s:active_channels)&quot;);<br>
       xlog(&quot;L_INFO&quot;, &quot;===&gt; User has $avp(s:active_channels) active channels!&quot;);<br>
}<br>
setflag(4);<br>
----------------------------------------------------------------------------<br>
<br>
The log statements prints &quot;===&gt; User has 1 active channels!&quot; when the first invite comes in. But the number doesn&#39;t decrease when the dialog gets finished. With the next invite (doesn&#39;t matter if the previous dialog is alive), it prints &quot; ===&gt; User has 2 active channels!&quot; and so forth.<br>

<br>
Any idea what&#39;s wrong here?<br>
<br>
<br>
Regards,<br>
Robert<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> [mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>]<br>
Sent: Thursday, March 05, 2009 5:55 PM<br>
To: <a href="mailto:robert.borz@web.de">robert.borz@web.de</a><br>
Cc: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use<br>
<br>
Robert,<br>
<br>
if you do auth via RADIUS, you can push some AVPs in the reply:<br>
<br>
<a href="http://www.opensips.org/html/docs/modules/1.4.x/auth_radius.html#id227162" target="_blank">http://www.opensips.org/html/docs/modules/1.4.x/auth_radius.html#id227162</a><br>
<br>
The 1.5.0 is plan to be release in 2 weeks from now, if no major bugs<br>
are discovered :)<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Robert Borz wrote:<br>
&gt; Hi Bogdan,<br>
&gt;<br>
&gt; thank you for this hint. I&#39;ll check it out.<br>
&gt;<br>
&gt; Yes, I also do auth over radius. Currently I&#39;ve still OpenSER v1.3.2 installed on debian/lenny and it is working fine.<br>
&gt;<br>
&gt; Currently I&#39;m thinking of updating to the latest OpenSIPS release. What&#39;s the current schedule for the first stable 1.5 release?<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt; Bogdan<br>
&gt;<br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a> [mailto:<a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>] On Behalf Of Bogdan-Andrei Iancu<br>

&gt; Sent: Thursday, March 05, 2009 4:57 PM<br>
&gt; To: <a href="mailto:robert.borz@web.de">robert.borz@web.de</a><br>
&gt; Cc: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
&gt; Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use<br>
&gt;<br>
&gt; Hi Robert,<br>
&gt;<br>
&gt; Well, you can use the avp_radius module to load from a RADIUS server the<br>
&gt; number of maximum allowed calls:<br>
&gt;     <a href="http://www.opensips.org/html/docs/modules/devel/avp_radius.html" target="_blank">http://www.opensips.org/html/docs/modules/devel/avp_radius.html</a><br>
&gt;<br>
&gt; This is the most generic way to do it.<br>
&gt;<br>
&gt; Do you do auth via RADIUS also ?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Bogdan<br>
&gt;<br>
&gt; Robert Borz wrote:<br>
&gt;<br>
&gt;&gt; Hi Bogdan,<br>
&gt;&gt;<br>
&gt;&gt; thanks a lot. Looks really pretty with the example you showed.<br>
&gt;&gt;<br>
&gt;&gt; My problem is that, depending on the amount of concurrent calls a user can do, the user belongs to a different group in radius. Imagine a user belonging to the group &#39;pots&#39; has a simultaneous call limit of 1, a user belonging to the group &#39;isdn&#39; has a limit of 2 concurrent calls...<br>

&gt;&gt;<br>
&gt;&gt; All rate information/customer attributes is/are stored in the radius and we want to keep it like this. So I think I&#39;ve to get the information about how many calls the user can do out of the radius into SER to use the example. Any idea how to do that?<br>

&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Robert<br>
&gt;&gt;<br>
&gt;&gt; -----Original Message-----<br>
&gt;&gt; From: <a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> [mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>]<br>
&gt;&gt; Sent: Thursday, March 05, 2009 12:49 PM<br>
&gt;&gt; To: <a href="mailto:robert.borz@web.de">robert.borz@web.de</a><br>
&gt;&gt; Cc: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
&gt;&gt; Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use<br>
&gt;&gt;<br>
&gt;&gt; Hi Robert,<br>
&gt;&gt;<br>
&gt;&gt; You do not need Radius for this. OpenSIPS can do this by itself. See a<br>
&gt;&gt; nice tutorial on this topic:<br>
&gt;&gt;     <a href="http://www.opensips.org/index.php?n=Resources.DocsTutConcurrentCalls" target="_blank">http://www.opensips.org/index.php?n=Resources.DocsTutConcurrentCalls</a><br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Bogdan<br>
&gt;&gt;<br>
&gt;&gt; Robert Borz wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hi,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; currently I&#39;m using a FreeRADIUS server for authentication and billing purposes. Now I want to restrict the count of simultaneous calls a user can do. For this I implemented it with the &quot;Simultaneous-Use&quot; check in FreeRADIUS and it works fine, for outgoing calls initiated from my customers. Just trying to initiate a second call when one is still up, the request is rejected (Proxy authorization fails for the new call).<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; But incoming calls from the PSTN come in over an Asterisk machine. There&#39;s no proxy authorization for invites from the Asterisk, just a from_gw() check. So how I can restrict the amount of simultaneous calls per user for incoming _and_ outgoing calls?<br>

<br>
<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Any hint would be really appreciated...<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt; Robert<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; Users mailing list<br>
&gt;&gt;&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt;&gt;&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
&gt; <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>