Search code examples
asterisknat

Asterisk + NAT. Either get called or be called


My Asterisk set up is as follows: - I have 2 grandstream GXP 2000 phones connected to my router - My small linux server (with asterisk) is connected to the router as well

I have a dynamic ip from my isp provider, but I signed up for DynDNS

When I started I could call people and talk to them. If people rang me, the phone would ring, and I could hear them speak. They could not hear me. I found out this was because of the directmedia / canreinvite setting. So I set this to:

canreinvite=no directmedia=no

Now, people could call me and I could answer. However, due to this change I can call people, but as soon as they answer, I can't hear them, I only hear static. When I remove the two lines I add, everything is back as it was before.

What could be the issue ? The 5060 port is forwarded to my server ,as well as the 1000 - 2000 udp rang.

Regards, Digits


Solution

  • Ok, some information for other people in the same situation: - check your codecs, make sure you get no errors in the Asterisk CLI (command line interface). I got errors, but it worked, so I didn't care. That was a mistake - upgrade to asterisk 1.8 - set directmedia = no - it's upd range 10000 to 20000 (I missed a 0).

    This all fixed this problem.