On Friday 27 May 2011, salaheddine elharit wrote:
> i have installed asterisk and i have 3 sip 104 ,105 and 106
>
> Now I can make the calls with theses sip without issue
>
> I want to configure the outbound calls for these sips like that:
>
> 104 permission to call any number, but for 105 and 106 I want to specify
> some numbers to call
>
> Any help please

Specify different default contexts for your extension phones in sip.conf.  Say 
104 is in "outgoing-full" and 105 and 106 are in "outgoing-restricted".  Then 
you need something in your extensions.conf like

[outgoing-full]
; allow calls to internal numbers
include => internal

; include specially-chosen outgoing numbers
include => outgoing-restricted

; anything beginning with 0 is an STD call
exten => _0X.,1,Dial(${TRUNK}/${EXTEN})
exten => _0X.,2,Hangup()

[outgoing-restricted]
; allow calls to internal numbers
include => internal

; only allow calls to 01234567890 and 02345678901
exten => 01234567890,1,Dial(${TRUNK}/${EXTEN})
exten => 01234567890,2,Hangup()

exten => 02345678901,1,Dial(${TRUNK}/${EXTEN})
exten => 02345678901,2,Hangup()


Note this is a highly minimal example and will need expanding on, but you 
should get the general idea.

-- 
AJS

Answers come *after* questions.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to