Koozali.org: home of the SME Server

SPA3102 Registration Issues

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
SPA3102 Registration Issues
« on: February 16, 2012, 02:10:26 AM »
Hi all

I am trying to set up an SPA3102 for testing. I have followed the guide at http://www.sailpbx.com/mediawiki/index.php/SPA3k but am having issues.

For the time being I will focus on the PSTN only. I have set up the PSTN & VOIP trunk as described in the howto. The following settings on the Linksys are also enabled:

  • SPA3102 IP - static, 192.168.0.3
  • NAT mapping - disabled
  • NAT keepalive - enabled
  • SIP port - 5061 (have also tried 5060)

Here are the settings from SAIL peer:

Code: [Select]
type=peer
host=dynamic
qualify=3000
canreinvite=no
username=
fromuser=
secret=abc123
insecure=port,invite
disallow=all
allow=alaw
allow=ulaw

And there is no connection happening. The SPA3102 just says "Registration Failed", but there is nothing shown in the Asterisk log. Interestingly, if I remove the VOIP trunk definition from SAIL, I immediately get an error in the logs:

Quote
[Feb 16 11:56:05] NOTICE[18274] chan_sip.c: Registration from 'peer2190 <sip:peer2190@192.168.0.2>' failed for '192.168.0.3' - No matching peer found

So it looks like the registration gets beyond the simple username/password challenge but then fails somehow. What do I try next?

Edit: Note that I am using SAIL 3.1.0-140.

Thanks
David

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #1 on: February 16, 2012, 02:15:25 AM »
Quick update:
Here is the Dial Plan2 string: (<:0212342490>S0)

In SAIL, the trunk is defined as "GeneralSIP/02123412490"

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SPA3102 Registration Issues
« Reply #2 on: February 26, 2012, 12:14:49 PM »
Hi
you'll need to look at what Asterisk thinks the state of the end-point is with "sip show peers".

Also, a sip trace will show you what's passing between the two.  You can do a sip trace from the asterisk CLI with

       sip set debug ip <host[:PORT]>
or
       sip set debug peer <peername>

That will probably tell you what is wrong.

Kind Regards

S



Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #3 on: March 07, 2012, 12:11:18 PM »
Thanks for the help with this. Here's what I get:

Quote
voipbox*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status         
peer6707                   (Unspecified)    D          0        UNKNOWN         
5004/Ext5004               192.168.0.216   D          5060     OK (16 ms)     
5003/Ext5003               192.168.0.217   D          5060     OK (19 ms)     
5002/Ext5002               192.168.0.234   D          5060     OK (9 ms)       
5001/Ext5001               192.168.0.236   D          5060     OK (16 ms)     
5000/Ext5000               192.168.0.233   D          5060     OK (16 ms)     
6 sip peers [Monitored: 5 online, 1 offline Unmonitored: 0 online, 0 offline]
voipbox*CLI> sip set debug peer peer6707
Unable to get IP address of peer 'peer6707'
voipbox*CLI> sip set debug peer 192.168.0.3
No such peer '192.168.0.3'
voipbox*CLI> sip set debug peer 192.168.0.3:5061
No such peer '192.168.0.3:5061'
voipbox*CLI> sip set debug peer 192.168.0.3:5060
No such peer '192.168.0.3:5060'
voipbox*CLI>

That suggests something a bit weird is going on....

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SPA3102 Registration Issues
« Reply #4 on: March 07, 2012, 10:14:44 PM »
HI David

No drama, your sip debug syntax is a little wrong is all.   Because your device is not registered, you can't use the "peer" form of sip debug.  However you can use the IP form....

Code: [Select]
sip set debug ip 192.168.0.3
That will do what you want. 

Your registration is failing because Asterisk can't find the peer name the SPA is trying to register with.  If you look at your error messages, the peer name the SPA is trying to register is 'peer2190'.   The only peer name you have in sip.conf is peer6707.   So, you have a mismatch.  Either you need to change the SARK(Asterisk) peer name (or create a new one) or change peer name the SPA is using to register.

Hope this gets you on the right track.

Kind Regards

S
 

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #5 on: March 10, 2012, 07:50:32 AM »
Hi

Here is the output:

Quote
voipbox*CLI> sip set debug ip 192.168.0.3
SIP Debugging Enabled for IP: 192.168.0.3

<--- SIP read from 192.168.0.3:5060 --->
REGISTER sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-ce6e3850
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: peer6707 <sip:peer6707@192.168.0.2>
Call-ID: a3a1d8d5-b252a7ca@127.0.0.1
CSeq: 72724 REGISTER
Max-Forwards: 70
Contact: peer6707 <sip:peer6707@127.0.0.1:5060>;expires=3600
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura


<------------->
--- (12 headers 0 lines) ---
Using latest REGISTER request as basis request

<--- SIP read from 192.168.0.3:5060 --->
REGISTER sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-ce6e3850
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: peer6707 <sip:peer6707@192.168.0.2>
Call-ID: a3a1d8d5-b252a7ca@127.0.0.1
CSeq: 72724 REGISTER
Max-Forwards: 70
Contact: peer6707 <sip:peer6707@127.0.0.1:5060>;expires=3600
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura


<------------->
--- (12 headers 0 lines) ---
Using latest REGISTER request as basis request

<--- SIP read from 192.168.0.3:5060 --->
NOTIFY sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-a2c22a14
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: <sip:192.168.0.2>
Call-ID: 773d6358-dc2b6b80@127.0.0.1
CSeq: 42701 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

<--- SIP read from 192.168.0.3:5060 --->
NOTIFY sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-a2c22a14
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: <sip:192.168.0.2>
Call-ID: 773d6358-dc2b6b80@127.0.0.1
CSeq: 42701 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

<--- SIP read from 192.168.0.3:5060 --->
NOTIFY sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-a2c22a14
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: <sip:192.168.0.2>
Call-ID: 773d6358-dc2b6b80@127.0.0.1
CSeq: 42701 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

<--- SIP read from 192.168.0.3:5060 --->
NOTIFY sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-a2c22a14
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: <sip:192.168.0.2>
Call-ID: 773d6358-dc2b6b80@127.0.0.1
CSeq: 42701 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---

<--- SIP read from 192.168.0.3:5060 --->
NOTIFY sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-a2c22a14
From: peer6707 <sip:peer6707@192.168.0.2>;tag=7119c2383ef9a20o1
To: <sip:192.168.0.2>
Call-ID: 773d6358-dc2b6b80@127.0.0.1
CSeq: 42701 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA3102-3.3.6(GW)
Content-Length: 0


<------------->
--- (10 headers 0 lines) ---
voipbox*CLI> sip set debug off
SIP Debugging Disabled
voipbox*CLI> sip show peers
Name/username              Host            Dyn Nat ACL Port     Status         
peer6707                   (Unspecified)    D          0        UNKNOWN         
5004/Ext5004               192.168.0.216   D          5060     OK (16 ms)     
5003/Ext5003               192.168.0.217   D          5060     OK (16 ms)     
5002/Ext5002               192.168.0.234   D          5060     OK (16 ms)     
5001/Ext5001               192.168.0.236   D          5060     OK (16 ms)     
5000/Ext5000               192.168.0.233   D          5060     OK (15 ms)     
6 sip peers [Monitored: 5 online, 1 offline Unmonitored: 0 online, 0 offline]

Regarding the peer names, between now and then I must have deleted and readded the peer. Here is the /etc/asterisk/sark_sip_main.conf excerpt:

Code: [Select]
[peer6707]
type=peer
host=dynamic
qualify=3000
canreinvite=no
username=
fromuser=
secret=abc123
insecure=port,invite
disallow=all
allow=alaw
allow=ulaw

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #6 on: March 15, 2012, 05:48:40 AM »
I noticed that the SPA was set to use the G711u codec as preferred. So I have changed "disallow=all / allow=" etc to simply "allow=all". No effect.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SPA3102 Registration Issues
« Reply #7 on: March 16, 2012, 04:36:16 PM »
It isn't a codec problem you are experiencing.  The SPA is not registering correctly with Asterisk.  As you will have seen from other posts here, in general, users are not having problems with registration so it is something specific to your site or your method.   I would suggest you go back to the beginning and check the guide here

http://www.sailpbx.com/mediawiki/index.php/SPA3k

I can't see what you've filled out in the SPA3K but I can see for example that you have specified a secret in the peer entry, which is not exactly the same as the guide.    I would suggest you do it exactly as the guide and then build from there once you get it working.   If you are already satisfied that you have set it up correctly then you probably have some kind of network problem which is stopping packets getting to one side or the other of the registration dialogue. You'll need to check firewalls and the like to see how they are set.

Kind Regards

S


Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #8 on: March 16, 2012, 04:37:38 PM »
Thanks - will do. I may have gotten confused between the PSTN line and the extension (which does have a secret).

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: SPA3102 Registration Issues
« Reply #9 on: March 30, 2012, 07:14:17 AM »
Good news: looks like this was a bug. I upgraded the voice server to the latest Asterisk, DAHDI and SAIL versions, as well as a general upgrade from the SME 8.x repositories. Registration now works as expected.