[SOLVED] Linksys SPA400 Registry

Hello,

After lost [u]almost one week[/u] trying to figured out the problem about registry my SPA400 in Asterisk 11.12.1,[b] I have to rise up the white flag to beg you for some help[/b].

Before trying to setup the SPA400 on this new server (only with Debian and Asterisk 11.12.1), I installed the Distro of FreePBX 5.211.65 with Asterisk 11 on another server and the SPA400 worked well on it: registing, receiving and making calls with no problem.

On this new server I keep exactly the same configurations used in FreePBX, and It’s not registering on server.

My server IP: 172.16.0.51 / 172.17.0.51 (it has 2 ethernet interfaces)
My SPA400 IP: 172.17.0.200 (setting as static by dhcpd-server)

My sip.conf is below:

[general]
  udpbindaddr = 0.0.0.0
  bindport = 5060
  localnet = 172.16.0.0/24 ; on this net there are my sip phones
  localnet = 172.17.0.0/24 ; on this net there are my FXO/GSM gateways (including SPA400)
  alwaysauthreject=yes
  match_auth_username=yes 
  disallow = all
  language = pt_BR
  register => 9000@172.17.0.200/GW1 ; registering on SPA400 (GW1)

[GW1] ; Gateway Linksys SPA400 with 4FXO
  type = friend
  host = 172.17.0.200
  port = 5060
  disallow = all
  allow = ulaw,alaw
  username = 9000
  dtmfmode = rfc2833
  canreinvite = no
  context = pstn
  insecure = very
  qualify = yes

On CLI, the sip show registry command has this output, and never change:

avsrv1*CLI> sip show registry Host dnsmgr Username Refresh State Reg.Time 172.17.0.200:5060 N 9000 120 Request Sent 1 SIP registrations.

On CLI, the sip show peers command has this output:

avsrv1*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description GW1 172.17.0.200 Auto (No) No 5060 OK (69 ms) 1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]

On /var/log/asterisk/messages there are many registration attempts:

[Oct 7 10:49:27] NOTICE[3008]: chan_sip.c:15067 sip_reg_timeout: -- Registration for '9000@172.17.0.200' timed out, trying again (Attempt #120) [Oct 7 10:49:47] NOTICE[3008]: chan_sip.c:15067 sip_reg_timeout: -- Registration for '9000@172.17.0.200' timed out, trying again (Attempt #121)

Some screenshots of my SPA400 configurations are attached. I did NOT change anything about username, ID, etc… all fields are as factory default because I read in some post here that have some bug about change it.

Please give me some light. Thank you,
Toni

Another detail that I noticed on SPA400’s webservice setup is that SIP is marked as Registered !? :confused:

Guys I solved the problem!

Basically it was on registry comand on sip.conf general section. I changed:
register => 9000@172.17.0.200/GW1 ; registering on SPA400 (GW1)
to
register => 9000@172.17.0.200/9000 ; registering on SPA400 (GW1)

And the result is :mrgreen: :

[quote]avsrv1*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
172.17.0.200:5060 N 9000 105 Registered Fri, 10 Oct 2014 10:18:34
1 SIP registrations.
[/quote]

Now you can register your server on SPA400 too. I hope it help somebody.
Thank you guys from AsteriskForum for the space,
Toni

Thanks for sharing… It helps others members

No problem. I hope really help someone.

Another thing that I noticed, is that in this firmware version (1.1.2.2) you can change the ID9000 username (different of what I read on web). This way you can have more tha one gateway operating, or even have a hi-SLA/failover strategy running. If you set this field, for example, to USERNAME, you must click to SAVE and after that REBOOT the device. And on Asterisk server you must have a register on sip.conf like this:

Why? I’don know yet but it’s a limitation of the gateway I think.

Another myth about SPA400 that is clear now is about change fields and the device get crazy. I changed some other fields like SIP registration port from 5060 to 25060 and RTP range too, tone frequency, time to detect silence and have a auto hangup, and it worked like a charm.

So, don’t worry to change the fields, but make sure to be registered first at all =)