  joako Premium join:2000-09-07 /dev/null
·AT&T U-Verse
| reply to DogFace05 Re: How multiple ATAs can be behind same NAT router?
said by DogFace05 :said by christcorp :P.S. If you have a 2 LINE VOIP ADAPTER; like a PAP2; then the 1 IP address is running to voip circuits. In that case, you have to make sure the 2 different voip channels are on different ports. But individual adapters don't matter. That's an all too common misconception. The reality is that Linksys/Sipura ATAs will happily run with both lines sharing the same port number. Try it and you'll see. I used to make the same assumption until low and behold, one day by accident I ended up with both lines of my adapter set to the same port, and to my surprise it was accepted just fine. As it turns out, the lines are identified and differentiated by their associated user id, so they do not each need to have their own distinct port number. Assuming the ATA is correctly configured AND the NAT router plays well with SIP you are totally correct. But if you have problems first thing I might suspect is the router. -- 09:F9:11:02:9D:74:E3:5B:D8:41:56:C5:63:56:88:C0 |
|
  christcorp Premium join:2001-05-21 Cheyenne, WY
·Bresnan Online
·VOIPo
| reply to DogFace05 said by DogFace05 :said by christcorp :P.S. If you have a 2 LINE VOIP ADAPTER; like a PAP2; then the 1 IP address is running to voip circuits. In that case, you have to make sure the 2 different voip channels are on different ports. But individual adapters don't matter. That's an all too common misconception. The reality is that Linksys/Sipura ATAs will happily run with both lines sharing the same port number. Try it and you'll see. I used to make the same assumption until low and behold, one day by accident I ended up with both lines of my adapter set to the same port, and to my surprise it was accepted just fine. As it turns out, the lines are identified and differentiated by their associated user id, so they do not each need to have their own distinct port number. I agree that it will accept it fine. I have, through experience, been talking on 1 line when a call came in on the other line; so the caller said; and it wouldn't ring on my end. I experimented with it and it was a problem when 1 line was in use and the other tried to receive a call. Not saying that YMMV; just that it happened consistently on mine. Later... Mike.... |
|
  DracoFelis Premium join:2003-06-15
| reply to joako
said by joako :Not sure about the Cisco but for the Linksys set the following, no need to forward ports. Everything else leave default except for whatever settings are needed for your ITSP. Actually I'm not sure your settings will do much of anything, as you are trying to tell the adapter to process the VIA's, in concert with your STUN and the remote end, but then you are telling the adapter not to use STUN. i.e. I'm not sure you enabled much of anything, with the settings you chose...
And if you did enable STUN with the VIA settings set to "YES", you may experience problems. In my experience, the 4 VIA handling settings, while great in theory, actually cause more incompatibilities than they solve, because they require the remote VoIP company to handle the extra work (and many VoIP companies don't enable those features on their servers). Which is why I prefer the following (alternate) way of setting up adapters, shown below:
NOTE: These STUN settings work most reliably when you are NOT using an "Outbound Proxy" (i.e. the "Outbound Proxy" field, not to be confused with the main "Proxy" field, is empty/blank). However, in most cases, you really don't need the provider's "Outbound proxy" (even if/when they have one) when you have a proper STUN setup on your ATA.
NOTE: Do NOT enable both the initial four "Handle/Insert" VIA settings and the two substitution settings at the same time. They are either/or. I find the two substitution settings to be generally much more reliable, but that's me. In any event, enabling both will almost always cause the two methods to "fight", resulting in your phone calls not working. |
|
  DracoFelis Premium join:2003-06-15
| reply to artisticcheese said by artisticcheese :Gizmo Project and VOicestick. One ATA is SPA 2002 and another one CISCO IP Phone 7960 I can't answer for the Cisco (as I don't know their setup), but for the SPA-2002 your client (ATA) port is set on: the "Line x" tab, field "SIP Port:", under the "SIP settings". For example, the ATA line shown in the attached graphic is currently set to client (ATA) port 5064, but still using 5060 (the default) for the remote (proxy) end of the connection.
The way SPA-xxxx adapters work, the "SIP Port" field always represents just your LOCAL (your ATA) port number (NOT the remote proxy port number).
If/when you want to setup the remote proxy (VoIP provider) port number (which usually you want to stay at the default of 5060), you do that (on an SPA-xxxx adapter) by including the number after a colon (:) in the normal "Proxy:" field. If you don't provide a colon in the "Proxy", you will always get the default (remote end) port 5060. However, if you fill in your proxy with "provider:port" (where provider is your VoIP provider, and port is the desired remote port number), you will use that port on the remote end. For example, "Vbuzzer" (a company I used to use a while back) is one of the few VoIP providers that uses an alternate (remote end) proxy. In the case of Vbuzzer, the remote port has to be 80. So when I was using Vbuzzer as my provider, I filled in the proxy field with "vbuzzer.com:80". |
|
 B Premium,MVM join:2000-10-28
| reply to jensjewels said by jensjewels :This is a great thread. I for one am learning lots from it Fooey! That's exactly what I came in here to say!

-- B -- In a realm outside causality and function |
|
 artisticcheese
join:2004-11-09 Carrollton, TX
·Future Nine Corpor..
·VoiceStick
| reply to joako
said by joako :Not sure about the Cisco but for the Linksys set the following, no need to forward ports. Everything else leave default except for whatever settings are needed for your ITSP. Interesting settins. On my linksys pretty much everything after NAT settings were not set. So all this "VIA" settings supposed to make working behind single IP address easier for NAT router, right?
The only issue why I started the thread is odd behaviour I was getting with new VOIP providers with 2 ATAs behind my router. If I don't use port forwarding then Gizmo Project account will not even ring when incoming call will come in. On the other hand if I do have static port forwarding set to Gizmo Project ATA then incoming calls to Linksys will come in, phone will ring but I would not hear the other party on first time they call, next time they will call and connection establish just fine so I assume mapping for RTP is not done correctly on first call becouse of some weirdness with all this NAT mapings. I'll try settings below and see if I can use both VOIP adapaters without any port forwarding in place. |
|
 jensjewels
join:2006-01-09 Austr | reply to artisticcheese This is a great thread. I for one am learning lots from it  |
|
  DogFace05
join:2005-12-09 Cary, NC
| reply to christcorp said by christcorp :P.S. If you have a 2 LINE VOIP ADAPTER; like a PAP2; then the 1 IP address is running to voip circuits. In that case, you have to make sure the 2 different voip channels are on different ports. But individual adapters don't matter. That's an all too common misconception. The reality is that Linksys/Sipura ATAs will happily run with both lines sharing the same port number. Try it and you'll see. I used to make the same assumption until low and behold, one day by accident I ended up with both lines of my adapter set to the same port, and to my surprise it was accepted just fine. As it turns out, the lines are identified and differentiated by their associated user id, so they do not each need to have their own distinct port number. |
|
  joako Premium join:2000-09-07 /dev/null
·AT&T U-Verse
| reply to artisticcheese Not sure about the Cisco but for the Linksys set the following, no need to forward ports. Everything else leave default except for whatever settings are needed for your ITSP.
Not related to NAT but for best audio quality also set:
RTP Packet Size: 0.020 (default is 0.030)
-- Am Heimcomputer sitz' ich hier, und programmier' die Zukunft mir |
|
  christcorp Premium join:2001-05-21 Cheyenne, WY
·Bresnan Online
·VOIPo
1 edit | reply to artisticcheese I tried reading all the responses and got a little side tracked on some of the responses. So, if my answer is a repeat of someone else's, then my apologies.
You can have as many ATAs behing a NAT router as you want as long as you have enough bandwidth to handle it. Because the ISP and backhaul doesn't QOS yours or anyone else's traffic on the internet, a good NAT router with QOS will help at least with the upload. This is only important if you plan on using 3 or 4 voip adapters at the same time making calls; or if you also plan on surfing a lot while making all these calls.
But, as far as connecting ATA's and having them work, go until your heart is content. Or until you run out of IP addresses in your subnet. (Basically, 254 devices). As far as PORTS go, that doesn't matter at all. You could have 10 Voip adapters on your router and they can all use port 5060 and there wouldn't be any problems. Why? Because when the traffic comes in and out of your router, it isn't based on the port primarily. It's based on the IP address. Once it hits the IP address, THEN it worries about the port.
I.e. 4 different voip adapters. IP addresses of 192.168.1.101 through 192.168.1.104. Each of them can use port 5060 for SIP signaling because when the packet comes in, it's looking for the IP address. Once it finds that, it opens the port. Each IP address in IPv4 uses 65535 ports. It doesn't matter if it's the same port number. Imagine you lived in APARTMENT #4. I ALSO live in APARTMENT #4. My I live at 100 Main St. and you live on 200 Elm st. The APARTMENT number is the port, but the street address is the IP address.
Hope this helps. If I just repeated myself from what someone else said, I apologize. It's been a long night. Later... Mike....
P.S. If you have a 2 LINE VOIP ADAPTER; like a PAP2; then the 1 IP address is running to voip circuits. In that case, you have to make sure the 2 different voip channels are on different ports. But individual adapters don't matter. |
|
 artisticcheese
join:2004-11-09 Carrollton, TX | reply to joako Gizmo Project and VOicestick. One ATA is SPA 2002 and another one CISCO IP Phone 7960 |
|
  joako Premium join:2000-09-07 /dev/null | reply to artisticcheese What provider are you connecting to and what VoIP ATA are you using? -- Am Heimcomputer sitz' ich hier, und programmier' die Zukunft mir |
|
 artisticcheese
join:2004-11-09 Carrollton, TX | reply to priller ActionTec (provided by Verizon for FIOS) |
|
 priller
join:2000-10-20 Gainesville, VA | reply to artisticcheese
BTW ... What router are you using? |
|
 artisticcheese
join:2004-11-09 Carrollton, TX
·Future Nine Corpor..
·VoiceStick
| reply to jensjewels said by jensjewels :Use the SIP Port field. THe only SIP port field refers to server port I shall be connecting to not client port. |
|
 jensjewels
join:2006-01-09 Austr | reply to artisticcheese Use the SIP Port field. |
|
 artisticcheese
join:2004-11-09 Carrollton, TX
·Future Nine Corpor..
·VoiceStick
| reply to DracoFelis How do I setup port on my end on ATA? The only fields I have is registar's address and protocol and port number. Where do I put custom client port on my end? I understand this is ATA specific but terminology will be used for such field in ATA configuration? |
|
  DracoFelis Premium join:2003-06-15
| reply to artisticcheese said by artisticcheese :So how does this work. I have 2 VOIP providers which expect me to register with their servers at UDP 5060. I have 1 public dynamic IP on router which I can do port forwarding with. What exactly I'm supposed to enter on ATAs for those 2 different VOIP providers for them to use a different port? You are forgetting that the port on your end doesn't have to be the same number as the port on their end. And almost all VoIP providers will let you use any port you like on YOUR END, provided the port on THEIR END is UDP 5060.
So here's how I would set it up:
1) Set one ATA to using UDP 5060 on your end, and register with the provider using UDP 5060 on their end.
2) Setup the 2nd ATA to using UDP 5062 on your end, but still register with the VoIP provider (for your 2nd ATA) on their UDP port 5060.
3) Setup port forwarding on your router, to send packets to YOUR UDP port 5060 (no matter what the source port is on their end) to the 1st VoIP adapter. Likewise, setup port forwarding for UDP packets sent to your port 5062 to your 2nd ATA.
Voila, both providers should be happy with your registrations, as both adapters are sending to (on their end) UDP port 5060. But because one of the adapters is set to port 5062 (on your end), replies for that adapter (from the remote end) will also be sent to UDP 5062. As a result, all the ports are consistent in this situation, and the port forwarding assures that your router shouldn't block any inbound calls by closing the SIP ports. |
|
 artisticcheese
join:2004-11-09 Carrollton, TX
·Future Nine Corpor..
·VoiceStick
| reply to DracoFelis said by DracoFelis : However, you always have the option to bypass these limits/issues by putting each VoIP adapter on different ports, and then telling your router to forward specific ports to specific VoIP adapter. Because in that case, which ports you use will uniquely identify the adapter to send the traffic to. So how does this work. I have 2 VOIP providers which expect me to register with their servers at UDP 5060. I have 1 public dynamic IP on router which I can do port forwarding with. What exactly I'm supposed to enter on ATAs for those 2 different VOIP providers for them to use a different port? |
|
  DracoFelis Premium join:2003-06-15
| reply to joako said by joako :Simple answer if you have a decent NAT router it will just work. That might be true in the simple/routine case where you only get inbound calls from sites you are "registered" with. Because in that case, the router could (if it is decent/smart enough) relate which VoIP proxy (or proxies) each adapter is "registered" with, and redirect replies to the proper adapter. And since that case is the most common (for example, it's what you normally get with pre-provisioned adapters from VoIP providers), many people (apparently including you) might find that they are OK with multiple VoIP adapters on "the same ports" behind their router.
However, when you get past the simple VoIP case, you find that there are many options where you can receive calls from places where you are NOT "registered". For example, many free VoIP adapter to VoIP adapter "calls" fit in this latter category. And once you start accepting calls from places you aren't first "registered" with (and this can sometimes even happen when using some free VoIP services/proxies, due to how they may redirect the call to you) your router loses the "registration" step details to keep the sessions/adapters separate. And when that happens, you pretty much have to setup "port forwarding" on your router, and put each adapter on different ports. Because without the "registration" queues to the router, you need the different ports to keep the traffic separate (i.e. know which incoming VoIP traffic goes to which adapter).
Bottom line: You can sometimes get away with putting all your VoIP adapters on the same SIP (and RTP) ports, and let your router sort it out. But for that to work, you both have to have a router that is good enough, and have to limit what you do with your VoIP (although those limits are consistent with how many use their VoIP). However, you always have the option to bypass these limits/issues by putting each VoIP adapter on different ports, and then telling your router to forward specific ports to specific VoIP adapter. Because in that case, which ports you use will uniquely identify the adapter to send the traffic to. |
|