Getting spa3102 with FreePBX14.0.1.20 and Asterisk 13.17.2 to function as a trunk

I upgraded to Asterisk 14.01.20 under FreePBX 13.17.2 and now my spa3102 won’t register. I have followed the guide for “Configure SPA3000 as SIP Trunk | FreePBX 13 (PJSIP)” from “https:”//wiki.freepbx.org/pages/viewpage.action?pageId=55476525. I’ve followed to the letter, but still the 3102 won’t successfully register. The asterisk log shows:

colleen*CLI> sip set debug peer Dakotacom
SIP Debugging Enabled for IP: 10.9.26.248
[2017-10-29 16:45:00] NOTICE[2812]: chan_sip.c:15875 sip_reg_timeout: – Registration for ‘[email protected]’ timed out, trying again (Attempt #614)

What should I be looking at to get to the solution? I really need to get this working. thanks.

setting ‘sip set debug’ won’t do much for a pjsip channel try ‘pjsip set logger your-host’.

You probably have your ports screwed up, both stacks can’t use the same port, make sure the ata is using the same port as the channel driver of the relevant extension

Thanks for the reminder about the port numbers. I checked those and realized that I had set the port incorrectly on the pstn line. I set it to the correct one, 5160 and now I’m getting this in the asterisk log:

[2017-10-29 18:51:16] NOTICE[13814]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5160’ (callid: [email protected]) - No matching endpoint found
[2017-10-29 18:51:16] NOTICE[12541]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“Pantry” sip:[email protected]’ failed for ‘10.9.26.248:5060’ (callid: [email protected]) - Failed to authenticate

What I’m not understanding here is it appears that the first line which references sip:dakota is using port 5160 which is what is not configured on the 3102 and in the freepbx config for the pstn line on the 3102.

The second line, is trying to authenticate for extension 2006 which is configured as a pjsip which uses 5060 and that’s how it’s configured on the 3102.

This is the command line I’m using to look at the asterisk log:

[root@colleen asterisk]# asterisk -r -vvvvv

After doing this I:

colleenCLI> pjsip set logger host 10.9.26.248
PJSIP Logging Enabled for host: 10.9.26.248
colleen
CLI> sip set debug peer Dakotacom
SIP Debugging Enabled for IP: 10.9.26.248

and tell the 3102 to reload it’s config and then get:

<— Received SIP request (469 bytes) from UDP:10.9.26.248:5062 —>
REGISTER sip:10.9.26.147 SIP/2.0
Via: SIP/2.0/UDP 10.9.26.248:5062;branch=z9hG4bK-c61dbfe5
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 58808 REGISTER
Max-Forwards: 70
Contact: sip:[email protected]:5062;expires=3600
User-Agent: Linksys/SPA3102-5.2.13(GW002)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

[2017-10-29 19:16:38] NOTICE[13814]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5062’ (callid: [email protected]) - No matching endpoint found
<— Transmitting SIP response (487 bytes) to UDP:10.9.26.248:5062 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.9.26.248:5062;rport=5062;received=10.9.26.248;branch=z9hG4bK-c61dbfe5
Call-ID: [email protected]
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected];tag=z9hG4bK-c61dbfe5
CSeq: 58808 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1509329798/7ce7ada8d739275756035368ab66d4e2”,opaque=“37c522ef2bacc23d”,algorithm=md5,qop="auth"
Server: FPBX-14.0.1.20(13.17.2)
Content-Length: 0

<— Received SIP request (723 bytes) from UDP:10.9.26.248:5062 —>
REGISTER sip:10.9.26.147 SIP/2.0
Via: SIP/2.0/UDP 10.9.26.248:5062;branch=z9hG4bK-cc0134d6
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 58809 REGISTER
Max-Forwards: 70
Authorization: Digest username=“dakota”,realm=“asterisk”,nonce=“1509329798/7ce7ada8d739275756035368ab66d4e2”,uri=“sip:10.9.26.147”,algorithm=MD5,response=“e7c1891e4e77787db496a2fe8ffe3e69”,opaque=“37c522ef2bacc23d”,qop=auth,nc=00000001,cnonce="ae978d1"
Contact: sip:[email protected]:5062;expires=3600
User-Agent: Linksys/SPA3102-5.2.13(GW002)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

[2017-10-29 19:16:38] NOTICE[12541]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5062’ (callid: [email protected]) - No matching endpoint found
[2017-10-29 19:16:38] NOTICE[12541]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5062’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (487 bytes) to UDP:10.9.26.248:5062 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.9.26.248:5062;rport=5062;received=10.9.26.248;branch=z9hG4bK-cc0134d6
Call-ID: [email protected]
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected];tag=z9hG4bK-cc0134d6
CSeq: 58809 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1509329798/7ce7ada8d739275756035368ab66d4e2”,opaque=“0b050e1e59ebe161”,algorithm=md5,qop="auth"
Server: FPBX-14.0.1.20(13.17.2)
Content-Length: 0

<— Received SIP request (724 bytes) from UDP:10.9.26.248:5062 —>
REGISTER sip:10.9.26.147 SIP/2.0
Via: SIP/2.0/UDP 10.9.26.248:5062;branch=z9hG4bK-fffa27d7
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 58810 REGISTER
Max-Forwards: 70
Authorization: Digest username=“dakota”,realm=“asterisk”,nonce=“1509329798/7ce7ada8d739275756035368ab66d4e2”,uri=“sip:10.9.26.147”,algorithm=MD5,response=“0e5632f00f822de31858ed6e7d8e64dc”,opaque=“0b050e1e59ebe161”,qop=auth,nc=00000001,cnonce="3bc6a096"
Contact: sip:[email protected]:5062;expires=3600
User-Agent: Linksys/SPA3102-5.2.13(GW002)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces

[2017-10-29 19:16:38] NOTICE[17714]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5062’ (callid: [email protected]) - No matching endpoint found
[2017-10-29 19:16:38] NOTICE[17714]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.9.26.248:5062’ (callid: [email protected]) - Failed to authenticate
<— Transmitting SIP response (487 bytes) to UDP:10.9.26.248:5062 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.9.26.248:5062;rport=5062;received=10.9.26.248;branch=z9hG4bK-fffa27d7
Call-ID: [email protected]
From: sip:[email protected];tag=1b4c8971c3b85192o1
To: sip:[email protected];tag=z9hG4bK-fffa27d7
CSeq: 58810 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1509329798/7ce7ada8d739275756035368ab66d4e2”,opaqu
On the second line, is is trying to open port 50

The referenced web page says that the pstn trunk should be setup as chan_sip which is using 5160. I have the pstn port on the 3102 set tp 5160 and the outgoing sip setup is:
user=dakota
type=friend
secret=xxxx
quality=yes
port=5160
nat=no
host=10.9.26.248
context=from-pstn
canreinvite=no

The configuration wiki page says to configure a phone extension to use pjsip which I know is using port 5060 and says to configure the pstn line as a sip port which the new version of asterisk uses port 5160 and I have that configured to use port 5160. I have the username and password for the pstn line set the same on the 3102 and the asterisk system.
e=“53732853302d5ddc”,algorithm=md5,qop="auth"
Server: FPBX-14.0.1.20(13.17.2)
Content-Length: 0

It looks like asterisk is trying to connect to the 3102’s pstn line using port 5062. What am I missing here. Seems like something is messed up with the configuration. Everything in the web GUI looks right, but it really looks like there is something hidden that is not apparent. Is some of the connection information stored in the MySQL db. All static configuration files in /etc/asterisk look correct, so that’s why I ask about the db.

thanks,

ted