How do I put my ATA in front of my router?

Share your tips, tricks and best practise ideas for Fongo services in here!
Post Reply
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

How do I put my ATA in front of my router?

Post by ScoFF »

I have a DSL modem TPLink 8816 with a Linksys SPA-2102 ATA and a Linksys WRT54G/GL using firmaware DD-WRT v24-sp2.

I have everything in my network static with my ATA behind my firewall but my ATA is failing a lot when trying to register with FPL, it seems from 7-9pm it fails most. A lot of people are complaining that they can't call in and it's busy, doesn't ring half the time or goes to v/m. It works most of the time but when it doesn't it does the following: when I call out but is dead a lot and sometimes gets a dial tone, dials but doesn't ring.

Sometimes I'll reset everything and it works when it comes up, sometimes not.

I tried putting the ATA in DMZ, and port forwarding 5060-5061 to the statis ATA address. It's far from perfect.

How do I put this ATA in front of my router? My DSL is in bridge mode right now (but has 4 ethernet ports) and my router does the PPPOE for me (4 ports). My ATA has 1 RJ-45 jack with a built in router.

I want to avoid 2 routers if possible, that would make things a mess, my linksys is preferred. I don't really want to use any router functions in my ATA, can I leave that bridge mode as well? What should I connect to what and what will be bridge mode, what should dial up PPPOE for me etc.
User avatar
bridonca
Technical Support
Posts: 1225
Joined: 11/16/2009
SIP Device Name: Netgear WGR615V
Firmware Version: latest
ISP Name: Eastlink
Computer OS: XP

Re: How do I put my ATA in front of my router?

Post by bridonca »

The idea setup would be to to put the TPLink 8816 in bridge mode, and let the WRT54G/GL handle the PPPoE login registration. I would connect the SPA-2102 to one of the WRT54G/GL LAN ports. It seems that is exactly what you are doing.

This is what your problem is. You need to forward ports to your SPA-2102 from your WRT54G/GL or you will continue to experience the flaky behavior. SIP port 5060 and a RTP port like 12000 would be all you you need to forward from your WRT54G/GL router to your ATA. The ATa of course also has to be configured for those ports.

Here is a pretty decent tutorial on how to forward ports with dd-wrt. http://www.dd-wrt.com/wiki/index.php/Static_DHCP
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

I was told all say my phone was busy but no one was home :) I can call out fine though and it says registered.

HEre's what's in my Linksys router:
Application Port From Protocol IP Address Port To
SPA2102 5060 UDP 192.168.1.2 5060
SPA2102 5061 UDP 192.168.1.2 5061

In my ATA 2102 My SIP port is 5060.

I turned off QOS completely tonight, I'll see how that goes, I should at least get good service unless I'm doing internet activity but I won't be for a while to test.
Every manual I see say to put the ATA in front of the router, I'd prefer it behind too but it seems some setting might be causing the problem.

What the best way to post a whole whack of screenshots of my configs and not get yelled at? Upload images or host them somewhere? I'll take a look at that link.

Going form my router to the ATA, should I be using the single ethernet port on the ATA or the 'internet' port? I've been using the internet port. I guess the ethernet port is just for console management or when you use the router functionality to the rest of my network?
User avatar
bridonca
Technical Support
Posts: 1225
Joined: 11/16/2009
SIP Device Name: Netgear WGR615V
Firmware Version: latest
ISP Name: Eastlink
Computer OS: XP

Re: How do I put my ATA in front of my router?

Post by bridonca »

Because you can make calls, I am almost certain you still have a port forwarding issue. The SPA2102 is a bit of a stupid device, and needs clarity on where to route the SIP traffic. Your DD-WRT router needs to forward at least 2 ports (5060 and 12000) to the SPA2102, and the SPA2102 has to be configured to accept them.

From the DD-WRT router, did you forward those 2 ports to the SPA2102 (5060 and 12000)? I am assuming SPA2102 is set up to always be at 192.168.1.2 so the DD-WRT router knows where to forward the ports.

QOS is currently not your problem. I assume since you can make outgoing calls, the hardware is set up correctly. Your modem router is effectively disabled as a router, now that it is in bridge mode. So the only router you have to deal with is the DD-WRT router. When you correctly forward ports from the DD-WRT router to the SPA2102

I just noticed something else. The TPLink 8816 uses 192.168.1.x as a default IP. DD-WRT router also uses 192.168.1.x as a default IP. If that is the case, you got to change one of them to something like 192.168.0.x or 10.x.x.x just to eliminate any routing confusion. I suspect the SPA2102 does not have a clue of where to route the IP either.
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

Can you log into the SPA's web configuration page from a computer and confirm that it's reporting, in the status page, the same IP address as the one you're connecting to, and also the same as your router's forward rule?

Some ATAs can have two IP addresses (one for internet side, one for local network side), and confusion can occur...
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

bridonca wrote:Because you can make calls, I am almost certain you still have a port forwarding issue. Your DD-WRT router needs to forward at least 2 ports (5060 and 12000) to the SPA2102, and the SPA2102 has to be configured to accept them.

From the DD-WRT router, did you forward those 2 ports to the SPA2102 (5060 and 12000)?
When it fails I can't make or receive calls, I think only once I ahd the situation where it was one way only. That's the first I heard of 12000 as a port required for the ATA. I heard of 5060 and 5061 and also 13000 for the software version but not 12000.
laurent wrote:Is the same IP address as the one you're connecting to, and also the same as your router's forward rule?
Yes, the ip in the ATA is the same as what the outside world is seeing.

I'll try and post all of my screenshots of my ATA. There's so many settings in there it's not funny and 95% of the stuff I have no idea what they are. If you see anything post a comment. Most is default but I've made some changes from things I've seen on other forums like ring oltage, DTFM options (some call center menu options still don't register), ring waveform, EXT SIP port (???).
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Here are my settings 1-3/11
Attachments
Router-03.JPG
Router-02.JPG
Router-01.JPG
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Here are my settings 4-6/11
Attachments
Voice-02.JPG
Voice-01.JPG
Router-04.JPG
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Here are my settings 7-9/11
Attachments
Voice-05.JPG
Voice-04.JPG
Voice-03.JPG
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Here are my settings 10-11/11
Attachments
Voice-07.JPG
Voice-06.JPG
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

No comments on any of these settings? This might help other users as well.

I still have to unplug/plug in my router, modem, ATA every couple days because I notice it won't register, then it works again.
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

In voice, line 1, NAT settings, Nat mapping enable. Try that to "NO".

Since you're forwarding your ports manually, one would reason that there is no need for automatic NAT traversal techniques, so perhaps it's better to disable that.

Also, as it's been mentioned by another member, you really ought to verify that there's no conflict of internal IP addresses between your 3 devices.

Finally, once again we will re-iter that your issue appears to be one of port forwarding, and you need to check (and perhaps tell us what the settings are) for your main DD-WRT router.

Finally finally, have you tried the ATA directly in the modem? Does it work? How long? Etc.
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

laurent wrote:In voice, line 1, NAT settings, Nat mapping enable. Try that to "NO".
I had it at no, which was default but some website told me to try that as yes and the # of problems improved since I changed it to Yes.
laurent wrote:Also, as it's been mentioned by another member, you really ought to verify that there's no conflict of internal IP addresses between your 3 devices.
My internal ip's are all charted out, no ip conflicts on my network. If you're talking about post #5 mentions, the ip shown in Voice/Info as the external ip is the same as the WAN ip is from the main router as the isp given ip. My static ip given the to ATA is internal as 192.168.1.2.
laurent wrote:Finally, once again we will re-iter that your issue appears to be one of port forwarding, and you need to check (and perhaps tell us what the settings are) for your main DD-WRT router.
Here are my router port forwards (attached)
laurent wrote:Finally finally, have you tried the ATA directly in the modem? Does it work? How long? Etc.
No, I'd like to try, that the why I originally posted, I was asking how to do this with my particular gear. My Modem has a built in router, now in bridge mode. My ATA has a built in router, now in bridge mode and my linksys WRT is a router. I don't want to have two routers activated at the same time. How do I set up my modem, ata and then my router? My ATA has one ethernet output, I thought this was just for console access, not out to a router.
Attachments
Router.jpg
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

Who is IP 192.168.1.108 and why are you forwarding most port of FreePhoneLine to it?

It appears from this screen that you are forwarding port 8081 to your ATA, and the other ones are forwarded to another device, perhaps your pc.

You need to forward all of these port to your ATA: 5060, 5061, 6060, 6061, 13000, 13001. The reason is that these ports are "called" form the internet side to your router, and your router forwards those requests to the ATA for processing (call, voice, etc).

8081 is presumably only the web interface in which you adjust the settings of your ATA. This should not be forwarded from the internet because you end up giving access to your ATA's configuration to everyone on the internet.
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

laurent wrote:Who is IP 192.168.1.108 and why are you forwarding most port of FreePhoneLine to it?
.108 is the laptop where the software version of free phone line is installed if we want to use it, I was told port 6060-1 was just for the software version, 5060-1 were for the ATA if it's actually using that port in the ATA, which mine is, it's the default port? 13000-1 I have no idea what that is, software ports, ATA hardware ports?
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

For the ATA to work, you absolutely need to forward 5060 and 5061 to it. From the screenshots, I can see that you're not forwarding them, so that would cause problems.

If you don't to take any chances, forward *ALL* ports (5060, 5061, 6060, 6061, 13000, 13001) to the ATA's IP address.

Also, do *NOT* try to use the Softphone at the same time. It cannot work at the same time as the ATA.
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Okay, I've forwarded all of those ports like what was last mentioned and tonight at 9pm, just like every other night registration fails and it's been okay for the rest of the day. At 11:00pm it'll be fine again. 2 hours of flakeiness every night.

I run a syslog on my ATA and my Linksys router. Do isolate the ATA on the network would take more work, I'd have to unplug everything and stop network activity but the syslog on the ATA is just giving me this:


[0]<<208.65.240.142:5060(420)
[0]<<208.65.240.142:5060(420)
SIP/2.0 401 Unauthorized

SIP/2.0 401 Unauthorized

[0]->208.65.240.142:5060(717)
[0]->208.65.240.142:5060(717)
REGISTER sip:voip.freephoneline.ca SIP/2.0
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

You now, I used to had an HT502 as my ATA, and every few days it would stop working and drop the registration. I would then have to go power-cycle it and it would work again for a few days. Another issue I remember having with the HT502 was loss of password. Every now and then, I had to go to the configuration page, write the password for my SIP account, click update and reboot, and it would work.

I have since purchased a 40$ Linksys/Cisco PAP2 device instead, and it has been working beautifully ever since. You might not have the same issues as I did, but just to tell you that maybe you're doing everything right already, for this ATA.
tbrummell
Tried and True
Posts: 330
Joined: 09/21/2010
SIP Device Name: PIAF/Mitel/PolyCom/Cisco
Firmware Version: Asterisk 1.8
ISP Name: Rogers
Computer OS: CentOS/Windows2008/Win7/Android
Router: pfSense/Neoware thin client
Location: Ottawa

Re: How do I put my ATA in front of my router?

Post by tbrummell »

Seeing 401 Unauth is normal when registering. If you look at the whole sequence you will see the 401, followed by a successful registration, when it is working properly.

See this informative article regarding troubleshooting with Wireshark, 1/2 way down shows a proper registration:
http://integrationfanatics.posterous.co ... shoot-voip
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

I'l try again tonight when it drops at 7pm again but will use the full syslog output options. I'd like to figure what's going on, I do notice my ip address changes when I'm having problems. Is there an option that will update the server with my new ip or something to re-register? the new ip does show up in the SIP's status page, do I fugure it knew what to do with it. That would be my 5th screenshot, Voice/Info.
That other screenshop, Voice/Line 1 (above), those settings look important. Not sure what RTP or EXT sip port is but it's mostly all default.
tbrummell
Tried and True
Posts: 330
Joined: 09/21/2010
SIP Device Name: PIAF/Mitel/PolyCom/Cisco
Firmware Version: Asterisk 1.8
ISP Name: Rogers
Computer OS: CentOS/Windows2008/Win7/Android
Router: pfSense/Neoware thin client
Location: Ottawa

Re: How do I put my ATA in front of my router?

Post by tbrummell »

And just to clarify above, when using the ATA, you only need 5060/1 forwarded to it, not the others, they are all softphone related. It's also a good idea to forward the RTP ports FPL uses as well. I don't forward those myself, and my sh!t works, but I'm using Asterisk (not that it matters). SIP is SIP after all, we still have to follow the protocol for the most part.

Since you mention that it fails when your IP changes, I'm guessing lowering the registration timer.....but I assume you've already done that.
ScoFF
Quiet One
Posts: 25
Joined: 09/09/2010
SIP Device Name: Linksys SPA2102-NA
Firmware Version: 3.3.6
ISP Name: Acanac
Computer OS: Windows XP
Router: Linksys WRT54GL DD-WRT v24

Re: How do I put my ATA in front of my router?

Post by ScoFF »

Everyone's telling me different stories on what ports to forward, the list just keeps on growing. Not just this thread/forum but others too, even after I tell them I'm not involved with softphone whatsoever.
The timer is at 180 seconds now. My phone's out again an hour earlier than as regularly scheduled.
I don't know how to troubleshoot this because I don't understand how the whole system works. I want to know what addresses I should be able to ping, resolve, reach out to in order to see if traffic is allowing itself to my router and out to freephoneline.ca. I can ping the address in the log I pasted above, the ip is updated in my ata's front page that matches my wan ip. That's the extent of my arsenal. Any ideas? What traffic has to flow in order to get my request to register instead of failing? I don't know if my problem is my router, ata or not my problem at all. Before I've even put my router ATA port in DMZ mode but still fails at 7pm-9pm. I put all ports forwarded that I'm told. It's gotta be something on my ATA settings. I'll have to try putting the ATA in front of my router but I don't really want to do that.
tbrummell
Tried and True
Posts: 330
Joined: 09/21/2010
SIP Device Name: PIAF/Mitel/PolyCom/Cisco
Firmware Version: Asterisk 1.8
ISP Name: Rogers
Computer OS: CentOS/Windows2008/Win7/Android
Router: pfSense/Neoware thin client
Location: Ottawa

Re: How do I put my ATA in front of my router?

Post by tbrummell »

You only need to be able resolve and ping 1 host, voip.freephoneline.ca.

SIP is SIP, they have to follow the RFC else they wouldn't be able to interop with off the shelf products (ATA's/softswitches). Read up on the SIP protocol, a basic registration is:

You to FPL: Hello, I'd like to register, here is my phone number.
FPL to you: Sorry, not authorized, use this key and send me a register again.
You to FPL: Hello, I'd like to register, here is my number & password, including encryption key.
FPL to you: 200 OK, you are registered.

That is it in a nut shell. When placing a call it basically does the same thing except sends call details instead of register. It still rejects the request the 1st time and sends back the encryption key to use, to which the ATA sends a 2nd request with key. Then a RTP port is chosen (once the call is answered) and used for the audio stream, this is why you *may* need to forward the RTP ports.

The best and most decisive way to figure out what is happening, and I'm not sure you have the equipment to do this is to set up Wireshark between your modem & your router, that way it catches ALL traffic in & out of the modem/router. Then we could analyze what happens. Basically the setup would be this:
Cable/DSL modem-----hub with Wireshark installed on a pc------Router (WAN port)------ATA

That would capture all traffic in/out of the modem & router, we'd know what the heck is going on....
laurent
*Go-To Guy*
Posts: 532
Joined: 08/06/2010
SIP Device Name: Grandstream HT-502
Firmware Version: 1.0.1.63
ISP Name: DSL TekSavvy
Computer OS: OSX Snow Leopard
Router: Linksys WRT54GL w/tomato

Re: How do I put my ATA in front of my router?

Post by laurent »

ScoFF wrote:Everyone's telling me different stories on what ports to forward, the list just keeps on growing. Not just this thread/forum but others too, even after I tell them I'm not involved with softphone whatsoever.
The official FAQ of FreePhoneLine explicitly lists 6 ports to forward to ensure that all FreePhoneLine services (SIP and softphone) work properly. When in doubt, this is your reference: http://freephoneline.ca/faq
User avatar
Bloodsong
Tried and True
Posts: 362
Joined: 09/18/2009
SIP Device Name: Zoiper| Grandstream GXP2000
ISP Name: Tek Savvy Internet (DSL)
Computer OS: CentOS, Arch, Widows 7, AIX, AS/400
Router: Cisco ASA 5520
Smartphone Model: Samsung Galaxy Ace Q
Android Version: 2.3.6
Location: Simcoe County
Contact:

Re: How do I put my ATA in front of my router?

Post by Bloodsong »

The other option to wiresharking what is happening between your "modem" and router, ATA & Router, or ATA & "modem" is to combine it's use with Ettercap.

To do this for testing I would suggest booting your computer with a live distro of Backtrack Linux which comes with tools for network monitoring and testing.

Ettercap (run with the correct command) will perform what's known as ARP poisoning, so that your computer will be able to read ALL traffic on the network destined for any machine. Your machine will then pick up the rest with wireshark and voila!
Post Reply