1

I have a trixbox server and every works find except the external SIPs. Inside net all sound goes fine, but if I use a SIP phone outside the net, I can connect, I can receive calls but I there is no sound.

I have this text in the sip_nat.conf:

nat=yes
externhost=xxxxx.dyndns.org
localnet=192.168.1.0/255.255.255.0
localhost=192.168.1.210
externrefresh=10
qualify=yes

And I have the ports from 5036 to 5082, 4569 and from 10000 to 20000 redirected to 192.168.1.210 on TCP and UDP.

What's wrong?

tombull89
  • 2,958
  • 8
  • 39
  • 52
Leandro Vidal
  • 43
  • 2
  • 6

2 Answers2

1

You may need to configure the RTP ports, the reason you can initiate the call and you cannot hear is because SIP uses one port for data (5060) and a random one for voice (RTP).

In /etc/asterisk/rtp.conf:

[general]
;
; RTP start and RTP end configure start and end addresses
;
rtpstart=10000
rtpend=20000
ghm1014
  • 944
  • 1
  • 5
  • 14
0

Try specifying the external ip address:

nat=yes
externip = X.X.X.X
externhost=xxxxx.dyndns.org
localnet=192.168.1.0/255.255.255.0
localhost=192.168.1.210
externrefresh=10
qualify=yes

And restart asterisk.

93196.93
  • 291
  • 1
  • 4
  • 13
  • Also, if you're opening up, make absolutely sure that your internet SIPs have strong secrets! Install APF and BFD as shown here: http://www.packtpub.com/article/securing-your-trixbox-server – 93196.93 Jun 24 '11 at 10:44
  • I had a trixbox install at my previous workplace connected to an ISDN30 line. I opened it up so they could have some home workers and over night one night, because I forgot to give 1 extension a secret, someone managed to connect and make twenty hours worth of calls over an 8 hour period costing the company £750 . Luckily they weren't too bothered but I hear folks have been seeing £10,000+ bills from toll theft recently. – 93196.93 Jun 24 '11 at 10:47
  • I can't specify the external IP because y dynamic, this is why I use externhost with the dyndns address – Leandro Vidal Jun 24 '11 at 12:37
  • And you're able to resolve DNS queries? – 93196.93 Jun 24 '11 at 13:20
  • I don't know what you mean. If I ping google.com it responds – Leandro Vidal Jun 25 '11 at 10:12
  • dig xxxxxx.dyndns.org from the trixbox server and see what IP address is returned. Also, you could try removing the externhost and setting externip to your current IP, restart asterisk to see if this works. – 93196.93 Jun 25 '11 at 12:05
  • it works! now the question is... what can I do if I have a dynamic IP? – Leandro Vidal Jul 01 '11 at 08:59
  • 1
    Did you find out if you can resolve DNS queries from your trixbox server? Type dig xxxx.dyndns.org into your terminal and see if you get the right IP address back. Apparently Asterisk's handling of externhost is rather flakey and might not work correctly. – 93196.93 Jul 02 '11 at 02:25