[OpenSIPS-Users] Restrict Simultaneous-Use
Robert Borz
robert.borz at web.de
Fri Mar 6 14:25:38 CET 2009
Hi Bogdan,
now I'm currently using the svn head of opensips version 1.5.
I succeeded in pushing the channel value from the radius server into opensips by an SIP-AVP in the auth-reply. :-)
But I've got problems with the dialog profiling. Maybe I'm missing something here. At the moment I've got the following configuration for the dialog module:
----------------------------------------------------------------------------
loadmodule "dialog.so"
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "profiles_with_value", "caller")
----------------------------------------------------------------------------
Following the link you told me I do the following in my invite-route after radius_proxy_authorize():
----------------------------------------------------------------------------
if (create_dialog() && set_dlg_profile("caller", "$fu")) {
xlog("L_INFO", "created dialog/added profile");
}
xlog("L_INFO", "SIP-AVP ===> $avp(s:channels)");
if (is_avp_set("$avp(s:channels)/n") && avp_check("$avp(s:channels)", "gt/i:0")) {
get_profile_size("caller", "$fu", "$avp(s:active_channels)");
xlog("L_INFO", "===> User has $avp(s:active_channels) active channels!");
}
setflag(4);
----------------------------------------------------------------------------
The log statements prints "===> User has 1 active channels!" when the first invite comes in. But the number doesn't decrease when the dialog gets finished. With the next invite (doesn't matter if the previous dialog is alive), it prints " ===> User has 2 active channels!" and so forth.
Any idea what's wrong here?
Regards,
Robert
-----Original Message-----
From: bogdan at voice-system.ro [mailto:bogdan at voice-system.ro]
Sent: Thursday, March 05, 2009 5:55 PM
To: robert.borz at web.de
Cc: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use
Robert,
if you do auth via RADIUS, you can push some AVPs in the reply:
http://www.opensips.org/html/docs/modules/1.4.x/auth_radius.html#id227162
The 1.5.0 is plan to be release in 2 weeks from now, if no major bugs
are discovered :)
Regards,
Bogdan
Robert Borz wrote:
> Hi Bogdan,
>
> thank you for this hint. I'll check it out.
>
> Yes, I also do auth over radius. Currently I've still OpenSER v1.3.2 installed on debian/lenny and it is working fine.
>
> Currently I'm thinking of updating to the latest OpenSIPS release. What's the current schedule for the first stable 1.5 release?
>
>
> Regards,
> Bogdan
>
>
> -----Original Message-----
> From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Bogdan-Andrei Iancu
> Sent: Thursday, March 05, 2009 4:57 PM
> To: robert.borz at web.de
> Cc: users at lists.opensips.org
> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use
>
> Hi Robert,
>
> Well, you can use the avp_radius module to load from a RADIUS server the
> number of maximum allowed calls:
> http://www.opensips.org/html/docs/modules/devel/avp_radius.html
>
> This is the most generic way to do it.
>
> Do you do auth via RADIUS also ?
>
> Regards,
> Bogdan
>
> Robert Borz wrote:
>
>> Hi Bogdan,
>>
>> thanks a lot. Looks really pretty with the example you showed.
>>
>> 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 'pots' has a simultaneous call limit of 1, a user belonging to the group 'isdn' has a limit of 2 concurrent calls...
>>
>> All rate information/customer attributes is/are stored in the radius and we want to keep it like this. So I think I'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?
>>
>>
>> Regards,
>> Robert
>>
>> -----Original Message-----
>> From: bogdan at voice-system.ro [mailto:bogdan at voice-system.ro]
>> Sent: Thursday, March 05, 2009 12:49 PM
>> To: robert.borz at web.de
>> Cc: users at lists.opensips.org
>> Subject: Re: [OpenSIPS-Users] Restrict Simultaneous-Use
>>
>> Hi Robert,
>>
>> You do not need Radius for this. OpenSIPS can do this by itself. See a
>> nice tutorial on this topic:
>> http://www.opensips.org/index.php?n=Resources.DocsTutConcurrentCalls
>>
>> Regards,
>> Bogdan
>>
>> Robert Borz wrote:
>>
>>
>>> Hi,
>>>
>>> currently I'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 "Simultaneous-Use" 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).
>>>
>>> But incoming calls from the PSTN come in over an Asterisk machine. There'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?
>>>
>>> Any hint would be really appreciated...
>>>
>>>
>>> Regards,
>>> Robert
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
More information about the Users
mailing list