[Serusers] gateways routing, based on prefix and blocking calls

Iqbal iqbal at gigo.co.uk
Wed Apr 27 16:21:13 CEST 2005


Hi

I am trying to find an easy way to route calls, based on prefix, and 
also to block others.
I have prefixes for my calls routes bound to gateways using lcr

Now using the grp table I have 3 types of user

Type A = can call Uk (landline)... setflag(50)
Type B = can call UK landline AND mobile... setflag(51)
Type C = does what he wants... setflag(52)

Obviously over time this will get even more complicated, hence the 
reason for finding a simple way :-)

in ser.cfg if the user is of Type A, he should only be able to call 
00441X and 00442X
if type B he should be able to call 0044X

So in ser I am testing something like this

if (uri=~"^sip:00.*@*") {
    if (uri=~"^sip:0044[1-2].*@*") {
          if isflagset(50) {
                   call route }

    }
    if (uri=~"^sip:0044.*@*") {
          if isflagset(51) {
             call route }
    }
}

Now this is fine for a few different type of customer, and prefixes, but 
when I have say Type 4 who can call 0091, 0092, 0094, 00880 for example, 
then its starts to add up in tersm of pain :-)

Is there a way of linking customer to package (I guess via grp) and then 
grp to prefix ---lcr )

Iqbal






More information about the sr-users mailing list