Hi ,
I have a NAT problem…
That is the network configuration (the Asterisk server has 2 intefaces) :
***** sip.conf *****
[general]
context=default
language=us
insecure=invite
auth=plaintext
bindport=5060
bindaddr=0.0.0.0
allow=ilbc
srvlookup=yes
externip=172.17.70.247
localnet=10.0.0.0/255.0.0.0
nat=yes
register => 0141877002@172.17.69.107/7002
[7002]
type=friend
callerid=“SJphone” <7002>
context=local
host=dynamic
disallow=all
allow=gsm
allow=ulaw
allow=alaw
allow=ilbc
allow=speex
**** extensions.conf ****
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
insecure=invite
[globals]
[default]
include => local
[local]
exten => 7002,1,Dial(SIP/7002,10,tT)
exten => 0675464598,1,Dial(SIP/0675464598@172.17.68.107)
Now I try to call the intern phone (7002) from the outside (0675464598), I capture the frame with ethereal, every thing is ok :
But if I call the outside from the inside !
There is clearly a problem with an additional SIP INVITE send by Asterisk which contains a bad SDP: Asterisk says to communicate directly !
Frame 14 (816 bytes on wire, 816 bytes captured)
Internet Protocol, Src: 172.17.70.247 (172.17.70.247), Dst: 172.17.69.107 (172.17.69.107)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Request-Line: INVITE sip:0675464598@172.17.69.107:5060 SIP/2.0
Message body
Session Description Protocol
Connection Information ©: IN IP4 10.51.51.52
Frame 16 (751 bytes on wire, 751 bytes captured)
Internet Protocol, Src: 10.51.51.51 (10.51.51.51), Dst: 10.51.51.52 (10.51.51.52)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
Request-Line: INVITE sip:7002@10.51.51.52:5060 SIP/2.0
Message body
Session Description Protocol
Connection Information ©: IN IP4 172.17.68.254
It should not send the direct IP of the phones !
I solved the problem by forcing the use of different codec: the internal phone uses GSM and the external one uses iLBC. With that configuration Asterisk does his proxy job. But I am looking for a better solution.
Please help me.
Alexis.