Hi, I'm trying to get a softphone configured. In Sip.conf [general] I found an example that said I need: nat=yes localnet=192.168.xxx.xxx Is localnet supposed to be a LAN IP or a WAN IP? Thank you, Gary
On Tuesday 07 December 2010 20:31:20 Gary Kuznitz wrote:> Hi, > > I'm trying to get a softphone configured. In Sip.conf [general] I found > an example that said I need: > nat=yes > localnet=192.168.xxx.xxx > > Is localnet supposed to be a LAN IP or a WAN IP?Neither. It's supposed to be a range of IPs, either in CIDR or netmask notation, which can directly contact your server. If all machines can directly contact your server (i.e. you have a public IP address), then you should not be using the localnet setting at all. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org
I have no idea the correct way to configure this software phone.
It's called Express Talk
The Asterisk box is at IP = WanLocation
Software phone is at IP = WanSoftware
They are not on the same LAN.
What I have in Extensions.conf is:
[gary-incomming]
exten => 1001,1,Dial(IAX2/gogh)
exten => 1001,2,HangUp()
exten => 120,1,Dial(SIP/Gary)
exten => Gary,1,Goto(120,1)
exten => i,1,Playback(invalid)
exten => i,2,Goto(s,1)
exten => s,1,Wait(1)
exten => s,2,Answer()
exten => s,3,NoOp(${CALLERID})
exten => s,4,NoOp(${CALLERIDNUM})
exten => s,5,NoOp(${CALLERIDNAME})
exten => s,6,Wait(4)
exten => s,7,Playback(vm-goodbye)
exten => s,8,Wait(2)
exten => s,9,HangUp()
What I have in Sip.conf is:
[authentication]
[general]
context = default
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes
limitonpeers = yes
allow = all
allowguest=no
nat=yes
[Gary]
type = friend
username = Gary
callerid = 120
secret = 5351
host = dynamic
defaultip = dynamic
context = gary-incomming
dtmfmode = rfc2833
allow=all
When I reload the dialplan I get an error from Asterisk saying:
[Dec 7 22:01:48] NOTICE[5630]: chan_sip.c:15593 handle_request_register:
Registration from '<sip:Gary at WanLocation>' failed for
'WanSoftware' - No matching
peer found
The Softphone SipTrace log says:
17:25:35 UDP Packet Received from WanLocation:5060
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
SIP/2.0 404 Not found
Via: SIP/2.0/UDP
192.168.168.7:5060;branch=z9hG4bK03856;received=WanSoftware;rport=16699
From: <sip:Gary at WanLocation>;tag=1424
To: <sip:Gary at WanLocation>;tag=as214040c6
Call-ID: 1291771532-3856-GARYLT at LocalIP
CSeq: 2 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0
Any ideas on how to configure it better are welcome.
Thank you,
Gary
The phone is finally registering. That's great.
I'm trying to understand what all these lines in Extensions.conf are
defining.
I can't make heads or tails them. I have been reading the manual
AsteriskManualTheFutureOfTelephony2ndEdition.
I'm currently getting an error when placing a call on the cmd line saying:
NOTICE[5630]: chan_sip.c:14383 handle_request_invite: Call from 'Gary'
to
extension '91AreaCodePhone#' rejected because extension not found.
What I have in Extensions.conf is:
[gary-incomming]
exten => 1001,1,Dial(IAX2/gogh)
exten => 1001,2,HangUp()
exten => 120,1,Dial(SIP/Gary)
exten => Gary,1,Goto(120,1)
exten => i,1,Playback(invalid)
exten => i,2,Goto(s,1)
exten => s,1,Wait(1)
exten => s,2,Answer()
exten => s,3,NoOp(${CALLERID})
exten => s,4,NoOp(${CALLERIDNUM})
exten => s,5,NoOp(${CALLERIDNAME})
exten => s,6,Wait(4)
exten => s,7,Playback(vm-goodbye)
exten => s,8,Wait(2)
exten => s,9,HangUp()
What I have in Sip.conf is:
[authentication]
[general]
context = default
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes
limitonpeers = yes
allowguest=no
nat=yes
[Gary]
type = friend
username = Gary
callerid = 120
secret = password
host = dynamic
defaultip = dynamic
context = gary-incomming
dtmfmode = rfc2833
allow=all
Frustrated,
Gary