[OpenSIPS-Users] Call limitation

Dani Popa dani.popa at gmail.com
Thu Jan 20 10:48:40 CET 2011


Hi,

you can use usr_preferences avp_table and avp_load to load from db
incoming/outgoing barring rules.
in usr_preferences table you should have something like:

| 139 |      | username | domain |  4122     |    2 |
*barring_number*     | 2011-01-11 12:19:31 |

define avp_aliases i:4122 named as you want and after that you can use
it in your opensips script.

avp_aliases = "ibarring=i:4122...."

.......

 if ( avp_check("$fu","fm/$avp(ibarring)/g") ) {
    call reject
}

Dani


Duane Larson wrote:
>
> What about the userblacklist module.  See if that does what you need.
>
> Sent from Droid
>
> On Jan 19, 2011 1:32 PM, <a.zagorskiy at oyster-telecom.ru
> <mailto:a.zagorskiy at oyster-telecom.ru>> wrote:
> > Hi Duane.
> >
> > The concurrent call limitation isn't what I want.
> >
> > I don't deal with money. I need to decide deny or allow
> > call only on prefix of a call's number
> >
> > Example:
> >
> > user 100 from domain mydomain1 has blocked calls that
> > begin from 811
> > user 200 from domain mydomain1 has blocked calls that
> > begin from 812
> > other users from domain mydomain1 haven't such limitation
> > and can call anywhere.
> >
> >
> > On Wed, 19 Jan 2011 11:07:52 -0600
> > Duane Larson <duane.larson at gmail.com
> <mailto:duane.larson at gmail.com>> wrote:
> >> My pc is currently broken so I can't copy the link, but
> >>if you go to the
> >> opensips tutorial page you will see concurrent call
> >>limitation. You can use
> >> that as a starting point. What you need is the dialog
> >>module and avpops
> >> module.
> >>
> >> Sent from Droid
> >> On Jan 19, 2011 10:15 AM, "Anton Zagorskiy"
> >><a.zagorskiy at oyster-telecom.ru <mailto:a.zagorskiy at oyster-telecom.ru>>
> >> wrote:
> >>> Hi.
> >>>
> >>> Please help me with advice.
> >>> I want to do a call limitation based on prefixes for
> >>>each user in each
> >>> domain. In other words, I need to deny or allow call
> >>>depend on username
> >> and
> >>> domain and value on a field in a sql table.
> >>>
> >>> Which module should I use?
> >>> Thanks!
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> WBR, Anton Zagorskiy
> >>> VoIP Developer, Oyster Telecom
> >>> Phone.: +7 812 601-0666
> >>> Fax: +7 812 601-0593
> >>> a.zagorskiy at oyster-telecom.ru <mailto:a.zagorskiy at oyster-telecom.ru>
> >>> www.oyster-telecom.ru <http://www.oyster-telecom.ru>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org <mailto: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