[asterisk-users] Asterisk + VOSP account working configuration?
Gilles
codecomplete at free.fr
Tue Dec 14 15:56:14 UTC 2010
Hello
I'm having a difficult time finding precisely what to put in
sip.conf and extensions.conf (and possibly other files) to get a
working configuration to connect an Asterisk (1.4) server to a VoIP
provider with the Asterisk server + SIP clients located in a private
LAN behind a NAT router:
http://img560.imageshack.us/img560/3749/asterisknat.png
Would someone have a full, direct (ie. doesn't depend on GUIs like
FreePBX, etc.) working example that I could look at as reference?
Thank you.
PS: Here's what I'm thinking of using:
;====================== sip.conf
[general]
;map this UDP port on NAT router
port = 5060
bindaddr = 0.0.0.0
;just to be safe
context = dummy
deny=0.0.0.0/0
permit=<IP address of VOSP server>
externip=<public IP address of NAT router>
localnet=192.168.0.0/24
disallow=all
allow=ulaw
allow=alaw
allow=gsm
;all RTP packets go through Asterisk
canreinvite=no
;incoming calls from VOSP
register => me:mypasswd at mysipprovider.com
;for outgoing calls to VOSP
[vosp]
;friend = peer+user
type=friend
username=me
fromuser=me
fromdomain=mysipprovider.com
authname=me
secret=mypasswd
host=mysipprovider.com
insecure=very
qualify=yes
context=outgoing
;Since VOSP is on the Net, nat=no or nat=yes?
nat=no
;extension for XLite
[6011]
type=friend
context=internal
secret=6011
host=dynamic
;client on same LAN as Asterisk
nat=no
;extension for IP phone
[6012]
type=friend
context=internal
secret=6012
host=dynamic
;client on same LAN as Asterisk
nat=no
;====================== extensions.conf
[general]
static=yes
writeprotect=yes
clearglobalvars=no
autofallthrough=yes
[vosp-incoming]
exten => s,1,Dial(SIP/6011)
exten => s,n,Hangup
[internal]
exten => 6011,1,Dial(SIP/6011)
exten => 6011,n,Hangup
exten => 6012,1,Dial(SIP/6012)
exten => 6012,n,Hangup
include => outgoing
[outgoing]
;Route calls starting with 0 to VOSP
exten => _0.,1,Dial(SIP/vosp/${EXTEN})
exten => _0.,n,Hangup
;====================== rtp.conf
[general]
rtpstart=10000
;1 even port for (symetric) RTP + 1 odd port for RTCP
;for a total of 10 concurrent conversations
rtpend=10020
More information about the asterisk-users
mailing list