Try the following configs:
/etc/asterisk/zaptel.conf
fxsks=1
loadzone=uk
defaultzone=uk
/etc/asterisk/zapata.conf
languages=en
context=inbound-analog
signalling=fxs_ks
; I always create dial groups for making outbound calls, you can use the specific channels as well group = 1 channel => 1
/etc/asterisk/sip.conf
[general]
; I generally prefer gsm and ulaw, you can allow any codecs you like
disallow=all
allow=gsm
allow=ulaw
; use your IP address in the bind address or leave as 0.0.0.0 to bind to
all active interfaces
port=5060
bindaddr=0.0.0.0
; set your tos - see www.voip-info.org command reference for tos values
tos =0x10
;next create an entry for your SIP phones
; you can specify username and secret or you can set a very explicit permit.
; canreinvite, no=asterisk remains in media path, yes=asterisk CAN step out
of media path
; if you have problems with authentication, try removing the username,
secret, and permit lines
; and setting host=a.b.c.d where a.b.c.d is the ip address of the SIP client
; the example permit will permit any clients with 10.0.0.0 255.255.255.0
address space
[2001]
type=friend
username=2001
secret=2001
host=dynamic
permit=10.0.0.0/8
canreinvite=no
context=intern
callerid=Test Caller
mailbox=2001
nat=yes
/etc/asterisk/extensions.conf
[general]
static=yes
writeprotect=yes
[globals]
; used for global variables, which in this basic example, we'll completely
ignore
[outbound-analog]
exten => _X.,1,Dial(Zap/g1/${EXTEN},60)
exten => _X.,2,Hangup
[inbound-analog]
exten => s,1,Dial(SIP/2001,20)
exten => s,2,Voicemail(u2001)
exten => s,3,Hangup
exten => s,102,Voicemail(b2001)
exten => s,103,Hangup
[local]
; Note we don't send local callers to Voicemail in this example
exten => 2001,1,Dial(SIP/2001)
exten => 2001,2,Hangup
exten => 2001,102,Hangup
exten => 2999,1,Answer
exten => 2999,2,Wait(1)
exten => 2999,3,VoiceMailMain
exten => 2999,4,Hangup
[intern]
include => local
include => outbound-analog
/etc/asterisk/voicemail.conf
servermail=voicemail@xyz.abc
attach=yes
maxmessage=300
maxgreet=60
[default]
2001 => 1234,John Doe,john_doe@xyz.abc
This should give you a very basic system with a SIP phone client, one
outside line via X100P, and voicemail. the Sip client will be able to call
voicemail using 2999, and any other sip clients you configure by dialing
their extension. When someone calls the analog number from the outside
world, the sip client at 2001 will ring, if no one answers, the caller will
be sent to leave a voicemail message, if 2001 is busy, the caller will be
sent to voicemail with a prompt indicating the caller is busy.
Hope this helps.
-Chris