Public Asterisk with NAT Phone Client

I setup my Asterisk server within my LAN and had everything working great, but I could not connect my Phone Client from Remote locations.

Since that was part of what I was trying to do, I moved my Asterisk server to a Public IP address (so it is no longer NATted…) and have all my Phone extensiont (clients) behind my NAT firewall. (That way, no matter where I am, I should be able to connect to my asterisk server the same way.)

I can log in to the server just fine (the X-Lite phone client shows the connection…) Phones ring, and I can answer them. I can speak and be heard by other people.

However, I get no return voice. I can’t hear anything.

I have been looking for the answer, and it seems to be STUN. But I can’t seem to get that working, either.

Does anyone have any ideas as to where I should look for answers? Anyone done anything like this?

You don’t say, but i assume you’re talking about SIP connections.

Have you got two-way voice between your remote phone client and your asterisk server (echo test?)? Have you got two-way voice between the local phone clients and the asterisk server?

If the answer to both these is yes, then you maybe you haven’t got “canreinvite=no” in sip.conf, for all clients involved. I don’t think you’ll ever get the type of setup you’re talking about to work if “canreinvite” is set to “yes”.

I tried to achieve this also and was never able to, at least not with softphones. I had my most success with remote software clients using the IAX protocol, Firefly is currently the only one i know of which supports this.

I got two way voice working with this, but it killed the computer which was running Firefly, at up all the resources even after the call terminated. I had to do a hard reboot as it was frozen.

I havn’t tried again since mainly because I never needed this anyway, but I think STUN is the way to go as you said.

If you havn’t already, have a read of this:

voip-info.org/wiki-NAT+and+VOIP

Pretty much explains it all including solutions/work arounds…

From reading that document it looks like VOIP through any sort of firewall is nearly impossible and probably not worth the trouble.

Well that’s definitely not the case. To a large extent it depends how much control you’ve got over the firewall configuration. If you’ve got no control, it depends on what type of firewall it is.

[quote=“WillKemp”]
Well that’s definitely not the case. To a large extent it depends how much control you’ve got over the firewall configuration. If you’ve got no control, it depends on what type of firewall it is.[/quote]

Very true. You need end to end control. In my case, I had full control where the asterisk server was, but not where I was running the client.

I knew this was the case.

Basically, its not yet at a level where you could just go to anyones network with your laptop and make calls using your * server without tinkering…but its close:).

asteriskguru.com/tutorials/s … erisk.html

Have a look here, it describes different situations and their configurations.

Sonicwall firewalls have excellent VOIP protocol support, especially h.323 and SIP routing/NATing.