2 Asterisk server Germany - Saudi Arabia IAX2 connection

I have 2 Asterisk Server, the german server (GER) with a static IP and the Server (SA) in Saudi Arabia with dynamic IP adress. For the SA server I am using a domain service from no-ip.org. Each server internal are using sip. Sever to Server IAX2. I have made in SA a portforwarding in my router to the asterisk server 4569 TCP and UDP. Both servers are connected everything is working well. But after 3 or 4 hours, the servers are dicconnected. The WAN IP adress has NOT changed on Server SA. IAX2 reload on both servers without result. I get the message: “request send” or “Time out” on both servers. The firewall on both servers are disabled. When I reset my router, it works well for 3 or 4 hours again. If my system is working and I disconnet the ADSL cable to my ISP, wait for one minute, I get a new WAN IP adress. After my no-ip Client update my WAN IP-adress, both servers are connected. In this case I have not to reboot my router.

What´s happend when they are disconnected after 3 hours and each server coudn´t found each other?

thx. Michael

suggestion- instead of using no-ip, register the servers. set them both as friends, and add a register => statement to the SA server’s iax.conf file. That will make it register itself to the other server, which will update in realtime (not no-ip). then in iax.conf on the german server, set the SA server to be host=dynamic.

if that doesn’t help, make sure your routers are not dropping mappings…

thx. for your reply. But it doesn´t help. Both host are dynamic

host=dynamic

Cheers
Michael

if the german box has a static ip then you can use that.
on the SA box, defining the german peer, set host=itsipaddress. then register to that.
on the german box for the SA peer- leave host=dynamic and type=friend

this way the SA box will always register to the german box and they stay connected

thanks again, I have changed the setings to:

Server in Saudiarbia (dyn.IP)

[location60_SA]
type=peer
username=location60_SA
auth=md5
secret=PWD
host=staticIP-from germanSever
context=default

before it was:

[location60_SA]
type=friend
username=location60_SA
auth=md5
secret=PWD
host=dynamic
context=default

Do you think it´s right? I come back to you. In Asia was a earth quake, which destroy some Internet cables, we have also problems with the bandwith at hte moment.

Cheers
Michael

yes that is right. now add at the top in the general section:

register => location60_SA:YOURPASSWORDHERE@location60_SA

sorry now I am totaly confuse, this is add at the german server
not at the SA Server

register => location60_SA:YOURPASSWORDHERE@location60_SA

Cheers
Michael

[quote]

thanks again, I have changed the setings to:

Server in Saudiarbia (dyn.IP)

[location60_SA]
type=peer
username=location60_SA
auth=md5
secret=PWD
host=staticIP-from germanSever
context=default

before it was:

[location60_SA]
type=friend
username=location60_SA
auth=md5
secret=PWD
host=dynamic
context=default

Do you think it´s right? I come back to you. In Asia was a earth quake, which destroy some Internet cables, we have also problems with the bandwith at hte moment. [/quote]

hi…!!!

my opinion is that you should do as follows :

(Server at saudi arabia)

Register => iax2/server_sa:yourpassword@xxx.xxx.xxx.xxx (ip of germany’s server)

[server_ger] ; so that server germany can log in to saudi arab server
type=friend
username=server_ger
auth=md5
secret=PWD
host=staticip ; ip of germany’s sever
context=default

(Server at Germany)

; no need to register

[server_sa] ; account for saudi arabs server to log in germany’s server
type=friend
username=server_sa
secret=yourpassword ; incase of md5 use md5 authorization pattern.
host=dynamic
context=default

-----------

I hope this would work…

cheers
Qasim