Audio problems with remote extensions on asterisk

I have a problem with the external extensions of my PBX Asterisk.

Inside my office’s intranet everything works perfectly with the SIP Numbers and extensions, tested on the Grandstream and YeaLink telephones. It also works perfectly on Softphones such as Zoiper and X-Lite.

The problem is when you try to connect to an external or remote extension, the necessary ports are already open (5060 and UDP 10000-20000), and the Softphone programs are registered correctly on the PBX. While dialing to another extension or a conventional number the link is established and the phone rangs, but when the call is answered neither of us is able to listen anything.

Eventually the call ends, 5 to 20 seconds later after.

I’ve been told that I might have the RTP protocol blocked in my D-link router DIR-857.

Does anyone know what could be happening?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

On your asterisk server make sure you have localnet= and sipip= (or siphost) defined correctly in your sip.conf file. That will enable it to detect that the remote user is on a different network.
Also for the sip accounts the remote client logs in as make sure you have nat=yes defined.

You probably dont have RTP blocked as such. What is most likely happening is that your sip client is telling the server the ip address to send the packet back to but its telling it your internal ip address behind the dlink. The 'nat=yes' will make asterisk work around this issue.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WebserviceMXAuthor Commented:
Your answer solves the problem, thank you very much :D
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Voice Over IP

From novice to tech pro — start learning today.