Calling between two computers over WAN

I am new to asterisk and telephony. I have setup an Asterisk Server with FreePBX. For starters, I created two General SIP Devices with extension 1000 and 2000 to call between two computers on two different networks outside of Asterisk Server.

For example:

Xlite Phone1
extension 1000
username user1
password user1

Xlite Phone2
extension 2000
username user2
password user2

Now the problem is my softphones are on different networks are configured to contact Asterisk Server Public IP

Xlite Phone1 : 55.1.1.1
Asterisk Server: 66.1.1.1
Xlite Phone2 : 77.1.1.1

Question:

How would I make this to work, I opened wirehark and noticed that I kept getiing 503 service unavailable response from Asterisk Server and noticed in SIP header that Asterisk had “hung up for unknown reason”.

How would I tell asterisk server that soft phone on extension 2000 is on 77.1.1.1 and phone on extension 1000 is on 55.1.1.1? is this possible? How does Asterisk know to where to route the call to?

Thanks :slight_smile:

This is not an Asterisk question, this is a networking question.

The phones register with Asterisk to inform the system of dynamic hosts.

Then the IP protocol handles routing.

It sounds as if you have NAT issues. Before you open up ports make sure you understand the risks and security implications.

I am getting replies back from the Asterisk server as confirmed in wireshark, if it was a NAT issue then I would never have had any UDP replies from the destination. Therefore the problem is with Asterisk configuration or Client configuration.

You mentioned that Asterisk phone register themselves with the server. If the phones gets registered where would I see that in FreePBX?

Thanks

This is now solved, phones had not registered with the server due to client mis-configuration. Under account settings for XLite client , under domain proxy, I enabled register with domain and receive calls.

I can now call between two computers

Go into the Asterisk Info module and click on SIP to see registrations.