I have the same problem and the suggested tutorial hasn’t solved my problem.
I have the following scheme design:
Local users — AsteriskNOW Beta4 — NAT item — Internet — NAT ITEM — Users
–>I have included the following parameters in each account in the users.conf:
nat = yes
qualify = 3000
–> In sip.conf I have configured
nat = yes
canreinvite = nonat ;also tried no
port = 5060
bindaddr = 0.0.0.0
externip = xxx.xxx.xxx.xxx ; Public IP
localnet = 192.168.0.0/255.255.255.0 ; several lines with the IPs of the local nets
–> And in rtp.conf:
A user outside the local network can call other users (both in the local network and in the Internet), but they can’t hear each other, there is no sound.
If a user outside calls the voicemail he can hear the voicemail menu, but after 20seconds the call is finished by Asterisk, this is what I get from Asterisk:
– Executing [85000@default:1] VoiceMailMain(“SIP/5060-083126d8”, “”) in new stack
– Playing ‘vm-login’ (language ‘en’)
[May 7 13:01:40] WARNING: chan_sip.c:1881 retrans_pkt: Maximum retries exceeded on transmission email@example.com for seqno 1 (Critical Response)
[May 7 13:01:40] WARNING: chan_sip.c:1898 retrans_pkt: Hanging up call firstname.lastname@example.org - no reply to our critical packet.
== Spawn extension (default, 85000, 1) exited non-zero on ‘SIP/5060-083126d8’
When analysing the call with Ethereal I discovered that the SIP messages are correctly interchanged between the user and Asterisk, but the RTP traffic from the useris destinated to the private IP address of Asterisk instead of to its public IP. I think that this is caused because the Asterisk sends a SIP/SDP Status: 200 OK, with session description message to the user and the Connection informations is “IN IP4 192.168.100.150” instead of “IN IP4 puclic.ip.of.asterisk”.
What should I configure to get this scheme work properly?