Gilles
2010-Dec-14 15:56 UTC
[asterisk-users] Asterisk + VOSP account working configuration?
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
Gilles
2010-Dec-14 16:52 UTC
[asterisk-users] Asterisk + VOSP account working configuration?
On Tue, 14 Dec 2010 16:56:14 +0100, Gilles <codecomplete at free.fr> wrote:>PS: Here's what I'm thinking of using:At this point, Asterisk seems to register OK with my VOSP, but when I call the number from my cellphone, I get this error: "NOTICE[88]: chan_sip.c:14033 handle_request_invite: Call from 'myvospaccount' to extension 's' rejected because extension not found." Incidently, how does Asterisk know how to link calls from the VOSP to an extension in the dialplan? Here's what I'm using: ;================ sip.conf [general] port = 5060 bindaddr = 0.0.0.0 ;deny=0.0.0.0/0 ;permit=<IP address of VOSP server> externip=<my public IP address> localnet=192.168.0.0/24 nat=yes ;all RTP packets go through Asterisk canreinvite=no disallow=all allow=ulaw allow=alaw allow=gsm ;incoming calls from VOSP ;can't use "s" extension? context = vosp-incoming register => myvospaccount:mypasswd at myvosp.com ;================ extension.conf [general] static=yes writeprotect=yes clearglobalvars=no autofallthrough=yes [vosp-incoming] exten => s,1,Dial(SIP/6011) exten => s,n,Hangup Thank you.