You have not covered very much of the configuration that can be done here.  So with that I have come up with a very generic config for you that I have not tested and is to the best of my memory but I will give it to you as a starting point.  I am posting the extensions.conf, zapata.conf and voicemail.conf.
 
It may make sense it may not.  I hope it at least helps and does not hinder.
 
Assuming FXO are channels 1 and 2
Assuming FXS are channels 3 through 5 
 
Since you do not have a direct mapping between users and extensions I gave users 1-3 direct access to Zap/3-5 and User 4 gets stuck with a voicemail only extension.
 
You did not mention if you wanted a menu system for incoming calls so I did not create one.  Instead all incoming calls from either line will just ring all three extensions.  If no one picks up it goes to a generic voicemail box of 1000.
 
User 1 can dial 9 1234 ??????? etc with 1234 being the password for user 1
User 2 can dial 9 2345 ??????? etc with 1234 being the password for user 2
etc...
 
Now in reality it would probably be a cleaner and nicer config using the Authentication app that is available to you but you asked for the user to be able to just dial 9 1-4 phone number.  I chose 4 digit passwords.  If you modify that make sure you modify the ${EXTEN:5} to what is needed. the :5 is trimming off the 9 and 4 additional digits for the password so if you were using 2 digit passwords you would want to change that to a :3.
 
Voicemail for each user is mute at this point as you have no menu system to direct a caller to a specific user hence voicemail here will be interoffice only at this point until you create a menu system or direct incoming lines to a specific user.
 
Use this at your own risk.  I did not try this configuration on any box.  I did this from memory and copying and tweaking some of my configs and my memory basically sucks so take that as you will.  Most of what I know came from samples around the net so you will see a lot of stuff from various people around the internet.  I am a newbie at this as well and did not see anyone replying to your message so I thought I would give it a shot at least to get you going in the right direction.
 
I am sure I forgot a lot of stuff that you would need but hopefully I covered what you asked for at least.
 
* NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES * NO FLAMES *
I know I use a lot of whitespace and have been told numerous times not too but my system works as it is supposed to
so I guess I have the whitespaces in the proper area.  Too bad if it uses more bandwidth here it makes it easier for
my brain to understand so you will just have to live with it all.  If you don't like the whitespace then don't read the
email.
 
Good luck and happy holidays,
 
Robert
 
_______________________________________________________________________________________________________________________
 
;zapata.conf
; Channels definitions for zapata.conf file
[channels]
 
language                = en
 
; FXO Channels
signalling              = fxs_ks ; Assuming you are using KewlStart if not change this to what you use.
group                   = 1
callgroup               = 1
pickupgroup             = 1
usecallerid             = yes
callerid                = asreceived
hidecallerid            = no
callwaiting             = yes
callwaitingcallerid     = yes
threewaycalling         = yes
transfer                = yes
cancallforward          = yes
echocancel              = yes
echocancelwhenbridged   = yes
rxgain                  = 0.6
txgain                  = 0.6
immediate               = no
busydetect              = no
callprogress            = no
musiconhold             = random
; Analog phone line attached to: ???-???-????
context                 = fxo-line1-in
mailbox                 = 1000 ; Not mapped to a specific user have them both go to generic vm 1000
channel                 => 1 ; X101P Card
; Analog phone line attached to: ???-???-????
context                 = fxo-line2-in
mailbox                 = 1000 ; Not mapped to a specific user have them both go to generic vm 1000
channel                 => 2 ; X101P Card
 
; FXS Channels
signalling              = fxo_ks ; Assuming you are using KewlStart if not change this to what you use.
group                   = 2
callgroup               = 2
pickupgroup             = 2
callwaiting             = yes
callwaitingcallerid     = yes
threewaycalling         = yes
transfer                = yes
cancallforward          = yes
echocancel              = yes
echocancelwhenbridged   = yes
mailbox                 =
callerid                = "Zap 3" <1>
context                 = fxo-out
channel                 => 3 ; TDM30B Port 1
mailbox                 =
callerid                = "Zap 4" <2>
context                 = fxo-out
channel                 => 4 ; TDM30B Port 2
mailbox                 =
callerid                = "Zap 5" <3>
context                 = fxo-out
channel                 => 5 ; TDM30B Port 3
 
;extensions.conf
[globals]
 
[general]
 
static                  = yes           ; These two lines prevent the command-line interface
writeprotect            = yes           ; from overwriting the config file. Leave them here.
 
[macro-exten]
exten                   => s,1,Dial(${arg1}/${MACRO_EXTEN},${arg2})
exten                   => s,2,VoiceMail2(u${MACRO_EXTEN})
exten                   => s,3,Hangup
exten                   => s,102,VoiceMail2(b${MACRO_EXTEN})
exten                   => s,103,Hangup
 
[macro-no-exten]
exten                   => s,1,VoiceMail2(u${MACRO_EXTEN})
exten                   => s,2,Hangup
 
[extensions]
 
exten                   => 2000,1,Macro(exten,Zap/3,20) ; User 2000 with a 20 sec ring before voicemail
exten                   => 2001,1,Macro(exten,Zap/4,20) ; User 2001 with a 20 sec ring before voicemail
exten                   => 2002,1,Macro(exten,Zap/5,20) ; User 2002 with a 20 sec ring before voicemail
exten                   => 2003,1,Macro(no-exten,Zap/g2,20) ; User 2003 no extension straight voicemail
exten                   => 2500,1,VoiceMailMain2(2000) ; User 1 dials 2500 to check their voicemail
exten                   => 2501,1,VoiceMailMain2(2001) ; User 2 dials 2501 to check their voicemail
exten                   => 2502,1,VoiceMailMain2(2002) ; User 3 dials 2502 to check their voicemail
exten                   => 2503,1,VoiceMailMain2(2003) ; User 4 dials 2503 to check their voicemail
exten                   => 3000,1,VoiceMailMain2(1000) ; General voicemail gets checked with 3000
; To set up a new user just copy the lines above and increment the 2003 to 2004 and so on.
 
[fxo-line1-in]
; There are so many scenarios for this. All phones ring for 30 seconds before going to general voicemail
exten                   => s,1,Dial(Zap/3&Zap/4&Zap/5,30)
exten                   => s,2,VoiceMail2(u1000)
exten                   => s,3,Hangup
exten                   => s,102,VoiceMail2(b1000)
exten                   => s,103,Hangup
 
[fxo-line2-in]
; There are so many scenarios for this.  All phones ring for 30 seconds before going to general voicemail
exten                   => s,1,Dial(Zap/3&Zap/4&Zap/5,30) ; Rings for 30 seconds before going to voicemail
exten                   => s,2,VoiceMail2(u1000)
exten                   => s,3,Hangup
exten                   => s,102,VoiceMail2(b1000)
exten                   => s,103,Hangup
 
[fxo-out]
;User 1 with a password of 1234
exten                   => _91234NXXXXXX,1,Dial(Zap/g1/${EXTEN:5}) ; User 1 can dial U.S. local calls
exten                   => _91234XNXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:5}) ; User 1 can dial U.S. Long Distance calls
exten                   => _91234911,1,Dial(Zap/g1/${EXTEN:5}) ; User 1 can dial U.S. 911 calls
;User 2 with a password of 2345
exten                   => _92345NXXXXXX,1,Dial(Zap/g1/${EXTEN:5}) ; User 2 can dial U.S. local calls
exten                   => _92345911,1,Dial(Zap/g1/${EXTEN:5}) ; User 2 can dial U.S. 911 calls
;User 3 with a password of 3456
exten                   => _93456NXXXXXX,1,Dial(Zap/g1/${EXTEN:5}) ; User 3 can dial U.S. local calls
;User 4 with a password of 4567
exten                   => _94567XNXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:5}) ; User 1 can dial U.S. Long Distance calls
; We are including the extensions so we may call phone to phone or phone to voicemail.
include                 => extensions
 
;voicemail.conf
;General definitions for the voicemail.conf file.
[general]
format                  = wav|gsm
serveremail             = yoursmtpserver
append                  = yes
maxgreet                = 30
maxmessage              = 180
;
; Local extension voicemail boxes.
[extensions]
1000                    => 9876,General Voicemail,[EMAIL PROTECTED]
2000                    => 1234,User 1,[EMAIL PROTECTED]
2001                    => 2345,User 2,[EMAIL PROTECTED]
2002                    => 3456,User 2,[EMAIL PROTECTED]
2003                    => 4567,User 2,[EMAIL PROTECTED]
 
________________________________________________________________________________________________________________________
 
----- Original Message -----
From: "Isianto Istiadi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 8:31 PM
Subject: [Asterisk-Users] Authentication

Dear all,
I have a question regarding the configuration of *. I have 3 port FXS, and 2
port FXO. I have 4 users that use analog phone connected to FXS (I have 3
phones). I need to limit the user's capability (user A can call
International, user B can call long distance, etc). I want to implement the
password say to call , he/she needs to puch 9(for outgoing call)2-4 digits
password,then the digits. I need the password to see who is calling, and to
limit his/her capability.

Is it possible to do it with *, if I can do it can you give me the sample
conf. I read about authentication applications, but is it the correct one?

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to