Putting 2nd asterisk server on same LAN

I am going to be putting a second asterisk server on my LAN.  I will obviously be setting it to listen on an alternate port than the primary asterisk server, such as port 5062.

My question is, how to set the Linksys SPA942 phones, across the WAN, to look for the asterisk server at an alternate port than 5060?  There is an EXT SIP Port setting, in the phones, but not sure if that is it.  

Thanks!
LVL 4
jkocklerAsked:
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.

Ron MalmsteadInformation Services ManagerCommented:
Why do you need it to listen on a different port ?

There's no reason you can't have both Asterisk servers on the same lan, using standard ports.... as long as they are on seperate IP addresses.
0
Kamran ArshadIT AssociateCommented:
Hi,

As the above comment mentioned, you need only to have a different IP address for the 2nd asterisk server. No need to change the SIP port.
0
jkocklerAuthor Commented:
Well for two reasons.

1.)  I can only forward 5060 to one LAN  ip address, in the firewall.  Plus, keeping each sip device on it's own port, usually works best for me.

2.) I am building the server, as a backup server.  While testing it, the same users are going to be listed in sip.conf.  I do not want the phones to start using the new server during testing, and having the server listening on 5060, would cause this to happen.  
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

shaf81Commented:
When configuring the Linksys, to specify a separate port other than 5060, you'll have to mention the port along with the sip server address. For instance, if you new asterisk is asterisk2.mydomain.com listening on 5062, then you would enter the proxy address on your Linksys as-

asterisk2.mydomain.com:5062

If users are registering from the Wan and you have to do port forwarding on the router/firewall, you can forward port 5062 to the asterisk IP:5062, users will register to sip_server:5062 or sip_server_ip:5062.

Hope this helps.
0

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
jkocklerAuthor Commented:
Thanks!!
0
Ron MalmsteadInformation Services ManagerCommented:
Simply listing users in sip.conf or the server listening on 5060 on a second server, will not reconfigure the phones.

Also, if you are NAT 'ing on your firewall/router, i'm not sure how you will get away with using two asterisk boxes concurrently over a wan....from a single external IP.  You must be forwarding other ports as well...(UDP 10001 - 20000).

confirm ?

I know the question is closed already, but I wanted to give you the info anyway.
0
jkocklerAuthor Commented:
xuserx2000,  that is a good point on the rtp ports.  Since this is only a backup server, that I am going to test for functionality, and then take offline, it should not be an issue.  I guess when I do need an alternate asterisk server because of load issues on the primary, it will have to be at a different WAN IP, with it's own firewall.  Kind of a bummer, but what can you do if you want NAT control of the network.?

As for your point, "Simply listing users in sip.conf or the server listening on 5060 on a second server, will not reconfigure the phones."
- I would think that 2 asterisk servers, with the same users in sip.conf, listening on the same port, would "fight" for the registrations of the phones.  No?
0
Ron MalmsteadInformation Services ManagerCommented:
"I would think that 2 asterisk servers, with the same users in sip.conf, listening on the same port, would "fight" for the registrations of the phones.  No? "

No...  the phones need to be configured to use the new asterisk server.... even if their configuration is handed down by a tftp server, they still need to be "pointed" to it.

The Sip.conf file tells Asterisk which devices can register under which extensions.... but it doesn't directly tell your phone to use that particular asterisk server.
0
jkocklerAuthor Commented:
"No...  the phones need to be configured to use the new asterisk server.... even if their configuration is handed down by a tftp server, they still need to be "pointed" to it.
The Sip.conf file tells Asterisk which devices can register under which extensions.... but it doesn't directly tell your phone to use that particular asterisk server."

- I hear what you are saying, but in a situation with say, No Nat, as I think you originally thought was the case, you have 2 asterisk servers, both listening on port 5060, both behind the same WAN IP, I do not see how the phones will be prejudice as to which server they register with.  How will the phones even know the difference between the 2 servers?  All the phones have is a wan ip address, or a host name, to register to.  So say they are looking at 75.xx.xx.xxx for registration etc, and there are identical asterisk servers sitting at that ip address, both listening on port 5060, which server gets the registration??
0
shaf81Commented:
jkockler - there is no need to be confused here. in case of a wan and sip phones registering from outside the network, then only 1 asterisk server would be valid - and that would be decided based on where the public IP:PORT pair is forwarded to in the LAN. If you need both Asterisk servers to work, and no have additional WAN IP, then next resort is to use a different port. Simple.
0
Ron MalmsteadInformation Services ManagerCommented:
right except you are forgetting one thing...  both servers are on differnt INTERNAL ip addresses....
Since you only have ONE external address right now,..you can only forward to one of the servers regardless.  So simply setting up a box next to the other, even with the same sip.conf...or same port... is not enough to make phones register to the wrong server.

More simply...  you won't be able to use both boxes at the same time either way over the WAN if you only have one address.  You can setup the second box, test it internally... ..then when it's time to make the switch.... you either change the port forwarding to the new internal ip, or you flip flop the internal IP's of the asterisk servers.
0
Ron MalmsteadInformation Services ManagerCommented:
fyi - my last message was to jkockler.... not shaf81
0
Ron MalmsteadInformation Services ManagerCommented:
shaf81 -  using a different port forward from the WAN is not going to make a bit of difference...

We're either talking about a static IP mapping ...or a port mapping on the WAN... and in the case of port mapping, 5060 is not the only relevant port. ...(UDP 10001 - 20000) also would need to be forwarded for RTP traffic.... you can't forward that range to two different servers.

One IP address on the WAN = ONE asterisk server in use over the WAN.
BOTH Asterisk servers could still be used internally however.
0
shaf81Commented:
xuserx2000 - Well, you're correct about the RTP ranges (UDP ports). I was not addressing that issue. I was just clearing jkockler's doubt. I am not an expert on Asterisk, but I've extensively worked on other SIP and IP telephony platforms. If there is a possibility to specify the RTP port range for each Asterisk box, then the port forwarding can be managed properly, if not, then the RTP traffic should be tunneled - anyway, that's a different context altogether.
0
jkocklerAuthor Commented:
You actually can set the RTP port range of an asterisk box.

What do you think about that option XuserX?  Just for the sake of discussion.  

I probably will just use another WAN Static ip address, as I believe that even if I set asterisk rtp ports to say 30000-40000,  I believe the carrier on my back-end would still be sending RTP traffic to the standard 10000-20000...
0
Ron MalmsteadInformation Services ManagerCommented:
Back to the original point of this question.... for this setup... changing the port to 5062 isn't going to work, so don't bother changing it on the phones or adding another forward on your router.  It simply won't work.
0
Ron MalmsteadInformation Services ManagerCommented:
jkockler... that should work.  I didn't think of that.  If you change the RTP range, on the server and the router...then you should be good.   Never tried it myself.
0
Ron MalmsteadInformation Services ManagerCommented:
I've always found it easier to just get another IP address.....
0
jkocklerAuthor Commented:
It is worth a shot I guess, just to know the outcome.  Although I still think the back end carrier will continue to send traffic to rtp traffic to 10000-20000.
0
Ron MalmsteadInformation Services ManagerCommented:
....i'm not sure on that one...  as I understand it though.., the RTP port to be used is "negotiated" with the peer by Asterisk.  I'm actually leaning toward it working, but since i've never done it myself i'm not sure... it would be a neat experiment though.  Let me know if you do it and if it works.
0
jkocklerAuthor Commented:
will do.
0
shaf81Commented:
Sure it can be done. I've done it myself on many boxes, but never on an asterisk. Most of my work has been on Carrier grade switches (Nextone etc). However, if you're talking about a carrier to carrier solution, then this type of setup is not ideally suited, and you'd be in-fact looking at dedicated WAN Ip's
0
jkocklerAuthor Commented:
I setup the new server, on the same WAN IP, behind the firewall, and it seems to work fine with the alternate RTP ports registered in RTP.conf

I set a range of 30000-40000 ... Put the new server on 5062, and forwarded the ports to the second server -- set the phone to register at my host name w/port --- voip.hostname.com:5062 ---

I have only been able to test with a phone on the same LAN, but it is pointed to the external WAN IP, with the hostname and port.

I can also tell you that I forgot to reload asterisk after setting the new port range, and I did have a one way audio problem.. After the reload, the audio was perfect.  So I feel that even though the ip phone is on the same LAN, pointing outside, and coming back in, that it will still most likely work with an external phone.  

Additionally, my back-end carrier will have to change a port setting on their end as well.  The carrier must send calls to specified DIDs, to static the ip address w/ alternate port, 75.xxx.xx.xx:5062.  That is the only hurdle left to conquer.  Hopefully they will not have a problem with that.  Either way at least we know it works.

Hope this helps, have a good one, and thanks for the help!

0
Ron MalmsteadInformation Services ManagerCommented:
Excellent.
Glad to help.
0
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
IP Telephony

From novice to tech pro — start learning today.