Cannot register SIP with Viatalk

Hi All,

After over a month of reading and trying everything I can think of, I just can’t get asterisk to register with my SIP provider. It works just fine on a Linksys PAP2 device, but I can’t get it working with asterisk. I get status “Auth Sent” and then after the first timeout it goes into “Request Sent” status and stays there.

tcpdumps on the router show the Linksys registering, several rounds of 100 and 401 responses from the server, before it finally gets a 200. Asterisk tries to register, only gets one 100 and one 401 reply and then the server on the other end doesn’t seem to chat back again except for some “register” and “option” packets.

Everything else on my asterisk config works fine: Digium card, local SIP devices, dial plans, etc. I’ve tried so many different config options I think I’ve tried it all. At the end please see a rough network diagram and my current attempt at a minimal sip.conf just to get registered on Viatalk for incoming. If I can get that working I can take it from there putting back the local devices etc.

I’ve tried NAT on and off, setting externip and not setting it, type = user, friend, peer. I’m running the version of asterisk provided as stable by Gentoo (1.2.21.1) but have also tried the latest 1.4 version to make sure that’s not the problem. Nothing works, I’ve never registered successfully.

Strangely enough I see that with the Linksys the IP address inside the SIP header is the private IP (192.168.15.2), and all ports (SIP and RTP) are forwarded directly to the asterisk server, so I have no idea how the Linksys is even working but it is. By changing the externip and NAT options I can get the IP address set to my public or private IP (just like the Linksys) but neither works with asterisk. All I’ve told the Linksys is my server, username (phone num) and password and it works like a champ! I am unplugging the Linksys PAP2 of course when trying asterisk. I’ve tried rebooting the router and waiting a few hours as well just to make sure it starts with a “clean slate” so to speak, no change.

Any help appreciated!!!

Thanks in advance,

David

Simple network diagram:

| (my public IP) 10.0.0.138 | 10.0.0.1 (DMZ Host on DSL Modem) 192.168.15.1 | 192.168.15.2 (SIP and RTP ports forwarded from firewall)

Current sip.conf (as simple as I can make it):

[general]
externip=(my public IP)
localnet=192.168.15.0/24
register => (my phone num):(my password)@newyork-1.vtnoc.net

[newyork-1.vtnoc.net]
type=user
username=(my phone num)
secret=(my password)
host=newyork-1.vtnoc.net
context=incoming
nat=yes

support.viatalk.com/index.php?_a … ils&_i=123

does this help?

[quote=“nedved”]
Simple network diagram:

| (my public IP) 10.0.0.138 | 10.0.0.1 (DMZ Host on DSL Modem) 192.168.15.1 | 192.168.15.2 (SIP and RTP ports forwarded from firewall)

Current sip.conf (as simple as I can make it):

[general]
externip=(my public IP)
localnet=192.168.15.0/24
register => (my phone num):(my password)@newyork-1.vtnoc.net

[newyork-1.vtnoc.net]
type=user
username=(my phone num)
secret=(my password)
host=newyork-1.vtnoc.net
context=incoming
nat=yes[/quote]

Fix your setup first!

| as a [b]bridge[/b] | (my public IP) as a PPPoE (?) client as required by ISP 192.168.15.1 | 192.168.15.2 (nothing forwarded)

[newyork-1.vtnoc.net]


nat=no ; because Asterisk knows your public IP
qualify=yes ; because you need keepalives to keep NAT pinhole open on your router

After the proper setup check sip set debug peer for that peer and see what is wrong.

Thanks to both of you for your replies, both are helpful.

The viatalk page has several things that I’m not doing so once I get my PBX registered I will need a few of those settings, thanks.

I will get my DSL modem reconfigured as a bridge and take it from there. A friend had already thought that double NAT was a big part of my problem. He was thrown off that though when I showed him the tcpdump of the linksys PAP2 registering across the same network. I think that somehow the linksys is a little more idiot-proof and must have some workarounds for less than optimal network settings.

Thanks for all the help,

David

It took forever, but I finally got my router logging in via PPPOE. I had to buy a new modem and only could find one modem that would bridge PPPOA to PPPOE - the Draytek Vigor 100. It seems it’s only available in the UK, and the places that ship it will only ship to the UK, but I eventually got it in last week via a friend who lives in Scotland. Asterisk now registers straight away, that was it. Thanks guys!