Blocking International Calls in the GUI

hi guys
does anybody know how to block international calls. i.e that you can’t call to china or some other country. Only local calls.
Thanks in advance

Hi
You have to build you dialplan to have different contexts to allow dialing to different destinations.

For example a user can have a context of Local

This is matched in the dialplan and only has local numbers allowed Then for example national has National destination and an include of the local context

Ian

Thanks you for your quick answer, but do you have an example for me.
I restricted the people that can’t call Local and International. But now i must restrict people who can call only local numbers.

; contexts with different authorities

[only_internal]
include => plaza_intern
include => plaza_no_authority

[internal_local] ;
include => plaza_intern
include => plaza_nl ; nl stands for Nederland/Netherlands the coutry where I live
include => plaza_no_authority

[internal_local_international]
include => plaza_intern
include => plaza_nl ; nl stands for Nederland/Netherlands the coutry where I live
include => plaza_int
include => plaza_no_authority

[plaza_intern]
;;;;;;;;
; the internal number range assuming that it is 4 positions and
; the numbers starts with 5. Extensions can be both SIP and IAX2
;;;;;;;;
exten => _5XXX,1,Dial(SIP/${EXTEN},20,rt)
exten => _5XXX,n,GotoIf($[ “${DIALSTATUS}” : “CHANUNAVAIL”]?iax:hangup)
exten => _5XXX,n(iax),Dial(IAX2/${EXTEN},20,rt)
exten => _5XXX,n(noanswer),n,Playback(plaza/niet_beantwoord)
exten => _5XXX,n,Goto(hangup)
exten => _5XXX,n(hangup),Playback(plaza/geen_autorisatie)
exten => _5XXX,n,Hangup() ;

[plaza_outbound_nl]
;;;;;;;;;;;;;;;;;;;
; using prefix 0 and the third number (the second number of
; the phonenumber) has to be 1,2,3,4,5,6,7,8 or 9. The number
; must have 10 positions.
; In Holland service numbers and sexlines starts with a 09 so it makes
; sence to replace the line with 00[12345678]XXXXXXXX so expensive
; service numbers can not be called
;;;;;;;;;;;;;;;;;;

exten => _00ZXXXXXXXX,1,Dial(IAX2/Voop5xxxx@voop_plaza/31${EXTEN:1},20,rt)
exten => _00ZXXXXXXXX,2,Hangup()

[plaza_outbound_int]
;;;;;;;;;;;;;;;
; international numbers start with two zeros. The length differs per country
; ;;;;;;;;;;;;;
exten => _000Z.,1,Dial(IAX2/Voop5xxxx@voop_plaza/31${EXTEN:1},20,rt)
exten => _000Z.,2,Hangup()

[plaza_no_authority]
;;;;;;;;;;;;;;;
; if the number entered doesn’t match anything
; you can (after recording the message) let the system play
; a message like “You have no authority to dial this number or the number ; doesn’t exist”
;;;;;;;;;;;;;;;
exten => _X.,1,Playback(plaza/no_authority)
exten => _X.,n,Hangup

If you add a sip entry to sip.conf that is only allowed to cal internal numbers add context=internal if the assumed users is allowed to make any call add context=internal_local_international to the entry.

This is just an example but from here I think it is easy to let the dial plan fit your needs.

Thanks for your response, i figured it out and it works fine. Thanks it was very usefull