Asterisk serveur behind a NAT

Hi,
Dear My serveur is behind a nat router and I’ve redirect SIP port 5060 to the server internal IP.
My phones are able to register and I try to make a call the end peer ring I cannot hear the end peer.
Could somone help?
regards.

Hi toure32!

I think you also need to forward RTP ports udp 10000:10100
the same way you did with 5060.

You can take a look at this page!
http://www.linuxjournal.com/article/9399

Virtually yours // Nypon

You need to forward the RTP ports, but that range is not the default range use by Asterisk, and not the one in the sample configuration.

Hi,
I’ve done all config for NAT, now when I place a caller hear the voice the other party does’nt.
and I ca see this error :
res_rtp_asterisk.c:3944 ast_rtp_read: Unknown RTP codec 126 received

That’s a protocol violation by something outside of Asterisk, or you have a version with the bug relating to non-standard codec numbers for telephony events. You need to tell us which version of Asterisk you are using and provide the output of sip set debug on (enable full in logger.conf, set verbose and debug levels to 5 in the CLI and run sip set debug on).

I using Asterisk 11.10.2

SIP.conf :

[general]


; [add by toure for NAT support]
externip=46.218.61.62
localnet=192.168.201.0/255.255.255.0    ;my subnet !
canreinvite=no

....
[friends_internal](!)
type=friend
host=dynamic
context=from-internal
disallow=all
allow=alaw,ulaw,g722
nat=yes
qualify=yes

[demo-alice](friends_internal)
secret=***** ;

[demo-bob](friends_internal)
secret=***** ; 

[kiss](friends_internal)
secret=****** ; 

RTP.conf :

rtpstart=10000 rtpend=20000
I’ve redirect SIP port 5060 and rtp port 10000:20000 to the asterisk server.
Do I miss somethink?

Hi,

I’m having the same issue, and I’m using the same Asterisk version, on Ubuntu 12.04. Did you manage to solve the problem? If you did, please let me know how?

Regards,

Jassem