Dial Barring

Hello
I have installed asterisk 1.4 win and three sip clients 501 502 and 503
I have configured viobuster for voice gw with the prefix 9

I want to control the calls each sip client is able to do
For example
i want 501 to able to call everywhere
i want 502 to able to call only phones 003028XXXXXXXX
i want 503 to able to call only 502 and 503

How can do it
Thank you

George

in sip.conf you have each phone “start” in a different context in extensions.conf and “include” contexts as you go. e.g.[code][from-503]
exten => _5XX,1,Dial(SIP/${EXTEN})

[from-502]
include => from-503
exten => _003028.,1,Dial(SIP/my_provider/${EXTEN})

[from-501]
include => from-503
exten => _XXXX.,1,Dial(SIP/my_provider/${EXTEN})[/code]

it’s very simplified, but you should be able to get the idea