simonpainter
asked on
SIP & NAT with Asterisk 1.4.6
am a bit of a newbie to this and I am having a hell of a time configuring the trixbox I inherited so that it works with Voxbone.
I have a trixbox on a local IP. Static NAT is used to direct SIP and RTP traffic through to the trixbox from Voxbone.
The sip connection works but the address that the trixbox sends is the local IP rather than the public IP.
I have tried setting up the NAT in the SIP_NAT.conf file but it makes no difference (have both reloaded and restarted trixbox to make sure my conf changes were noticed.
Ideally I would just like to use a FQDN that resolves to the local IP on our internal DNS and the public IP on external DNS... I have set that bit up but don't know where in the config to change it so that Trixbox sends that rather than the interface address.
Any help greatly appreciated.
Below is a trace of the SIP communication which shows the private IP being sent.
U 62.190.48.219:5060 -> 81.201.82.39:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 81.201.82.39:5060;branch=z 9hG4bK7187 4db358b234 c12fb78b4e 92f04850;r eceived=81 .201.82.39 .
From: "003228080035" ;tag=7856.
To: ;tag=as619378da.
Call-ID: 3efafd15f627049fe62c672f61 3cc18f@81. 201.82.39.
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Contact: .
Content-Type: application/sdp.
Content-Length: 240.
.
v=0.
o=root 24043 24043 IN IP4 192.168.14.1.
s=session.
c=IN IP4 192.168.14.1.
t=0 0.
m=audio 13012 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.
========================== ========== ========== ========== ========== ========== ========== ========== ========== =
For reference the sip_nat.conf file looks like this:
nat=yes
externip = 62.190.48.219
localnet = 192.168.14.0/255.255.255.0
qualify=yes
I have trawled the forums and googled this to death and all the forums results tell me to do it exactly how I am but it's not working so I must be missing something.
I have a trixbox on a local IP. Static NAT is used to direct SIP and RTP traffic through to the trixbox from Voxbone.
The sip connection works but the address that the trixbox sends is the local IP rather than the public IP.
I have tried setting up the NAT in the SIP_NAT.conf file but it makes no difference (have both reloaded and restarted trixbox to make sure my conf changes were noticed.
Ideally I would just like to use a FQDN that resolves to the local IP on our internal DNS and the public IP on external DNS... I have set that bit up but don't know where in the config to change it so that Trixbox sends that rather than the interface address.
Any help greatly appreciated.
Below is a trace of the SIP communication which shows the private IP being sent.
U 62.190.48.219:5060 -> 81.201.82.39:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 81.201.82.39:5060;branch=z
From: "003228080035" ;tag=7856.
To: ;tag=as619378da.
Call-ID: 3efafd15f627049fe62c672f61
CSeq: 102 INVITE.
User-Agent: Asterisk PBX.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY.
Supported: replaces.
Contact: .
Content-Type: application/sdp.
Content-Length: 240.
.
v=0.
o=root 24043 24043 IN IP4 192.168.14.1.
s=session.
c=IN IP4 192.168.14.1.
t=0 0.
m=audio 13012 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
a=sendrecv.
==========================
For reference the sip_nat.conf file looks like this:
nat=yes
externip = 62.190.48.219
localnet = 192.168.14.0/255.255.255.0
qualify=yes
I have trawled the forums and googled this to death and all the forums results tell me to do it exactly how I am but it's not working so I must be missing something.
ASKER
Which other config files would be parsed for these settings?
sip.conf ends with the following lines:
; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
sip.conf ends with the following lines:
; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If that doesnt work then I suggest you raise a bug with the trixbox developers.
You might also want to have a look in sip.conf to make sure it is including the sip_nat.conf file and then through every other file it includes to make sure there are no other copies of these commands elsewhere which might be causing the problem.