URGENT HELP** SPA3102 as FreePBX Extension?! Failed to Authenticate

Hi Guys,

Wondering if you can help me. I currently have a FreePBX (IP Address 10.1.10.30) server running asterisk with no problems. I have 4 IP Phones within my home connecting via SIP to my PBX. I currently have an analog phone which i want to use with FreePBX in exactly the same way my IP Phones are configured. I realised that to achieve this i would need to buy a Linksys SPA3102 Gateway. I have purchased one of these and created an extension within FreePBX called 600

I want to register this SPA3102 as an extension so that the Analog phone connected can make and receive calls like the rest of the extensions within the home. Whenever i’m entering the information on the setup page i’m receiving the following from asterisk CLI.

[2018-06-02 17:27:59] NOTICE[38604]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“600” sip:[email protected]’ failed for ‘10.1.10.28:5160’ (callid: [email protected]) - No matching endpoint found
[2018-06-02 17:27:59] NOTICE[38604]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“600” sip:[email protected]’ failed for ‘10.1.10.28:5160’ (callid: [email protected]) - No matching endpoint found
[2018-06-02 17:27:59] NOTICE[38604]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“600” sip:[email protected]’ failed for ‘10.1.10.28:5160’ (callid: [email protected]) - Failed to authenticate
[2018-06-02 17:27:59] NOTICE[38604]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“600” sip:[email protected]’ failed for ‘10.1.10.28:5160’ (callid: [email protected]) - No matching endpoint found
[2018-06-02 17:27:59] NOTICE[38604]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘“600” sip:[email protected]’ failed for ‘10.1.10.28:5160’ (callid: [email protected]) - Failed to authenticate

I have attached a screenshot of how i currently have my SPA3102 Registration page configured. If you can spot any information that can explain why i’m not being able to register this device please let me know :slight_smile:

Any help is appreciated!

Thanks
Callum

Here is some more of the configuration on the SPA3102 which may be useful

I am assuming that you have a default setup with pjsip on port 5060, chan_sip on port 5160 and you have configured extension 600 as a chan_sip extension. If not correct, please provide a detailed explanation.

SIP Port: 5060
EXT SIP Port: (leave blank)
Proxy: 10.1.10.30:5160
Outbound Proxy: (leave blank)
Use Outbound Proxy: no

You will want to set up the SPA3102 on the SIP port not the PJSIP port… because no one has bothered (as of my last look) to document the translation of SIP configuration specifications to the PJSIP schema. I was rather annoyed given the change in default port numbers.

To set up the Trunk:

Under SIP Settings:

The Outgoing Trunk Name is best set to the same name used for the trunk. You will use the trunk name in the Outbound Route to tie a dialing plan to outbound calls.

The following works for Outgoing Peer Details:
secret=yoursecret
canreinvite=no
dtmfmode=rfc2833
host=dynamic
incominglimit=1
nat=never
port=5060
qualify=yes
type=friend
disallow=all
allow=ulaw

The User Context should match your PSTN telephone number.
For the Incoming Peer Details:
secret=yoursecret
type=user
context=from-trunk

On the SPA3102 under “PSTN Line” and “Subscriber Information” the “Password” should match the secret in the Outgoing Peer Details and the Incoming Peer Details.

On the SPA3102 under “PSTN Line” and “VoIP-To-PSTN Gateway Setup” the “Line 1 VoIP Caller DP” should be set to dial plan 1. Under “Dial Plans” the “Dial Plan 1” should be set to (xx.)

On the SPA3102 under “PSTN Line” and “PSTN-To-VoIP Gateway Setup” the “PSTN Caller Default DP” should be set to dial plan 2. Under “Dial Plans” the “Dial Plan 2” should be set to (S0<:yourPSTNnumber>) yourPSTNnumber number will be delivered with the incoming call and should be used as the DID number specified in the Incoming Route.

On the SPA3102 under “PSTN Line” and “FXO Timer Values (sec)” the “PSTN Answer Delay” should be set to 3, otherwise the device may forward the incoming call to the PBX before the calling party number is captured from the PSTN.

Hope this gets you going.

And yes, I moved the SIP default port back to port 5060.

Change your type to “peer” just to avoid the confusion that could come from duplicate “user” contexts (“friend” is the same as “user+peer”)

Note that you could also do away with the Peer configuration and move the “context=from-trunk” entry into the Peer setting and leave the “type=friend” entry.

Sorry, I jumped the gun. Normally, the SIP page is only interesting for setting up the PSTN and that is the most difficult part.

The more likely problem with your situation is that the PSTN configuration cannot share the same SIP port as Line 1.You cannot have a trunk and an extension both using the same IP address and SIP port.

You will probably want to configure the PSTN line to use some other SIP port, since it sounds like you are not using it anyway. Otherwise, set Line 1 to use another port (say 5061… that is normally the default setting). You will need to configure the corresponding extension to use that port as well.

Your information is AFAICT all correct, but IMO it’s unlikely to help the OP. He was asking about the FXS (Line 1) section of the SPA3102. He did not mention a problem with the FXO (PSTN Line) nor any desire to use it. He may not even have an analog line to connect.

If host=dynamic is set, the port is also automatically dynamic and can be left at the 5060 default. For example, extensions behind a NAT will often have their source port numbers translated by the router; this causes no problems for chan_sip.

From the Linksys ATA Administrator Guide Document Version 3.1 page 4-2:

With the SPA3102 and AG310, a second VoIP account can be configured to support PSTN gateway calls
exclusively. A different SIP port should be assigned to Line 1 and the PSTN Line. The same VoIP
account may be used for both Line 1 and the PSTN Line if a different SIP port is assigned to each.

In theory using two separate accounts might be sufficient, the excerpt is confusing. However my recollection (from almost a decade ago) is that it was necessary to use separate ports to get the SPA3102 to work.

In addition, the SIP port is dynamic only if the DHCP server has been configured to deliver that information. I am using DHCP with a reserved address… primarily to specify DNS servers for the network in one place.

I concur with the need for separate ports assigned statically, these devices are old as Methusalah, but work surprisingly well for the 12 bucks the chinese ones cost ( a bit like me :slight_smile: ), pay a lot of attention to the impedance of the FXO side to reduce echo, reflecting your locale’s delivered copper pair ( no they are not the “all the same” ask an englishman !) and don’t bypass the FXO tuning that Dahdi provides for the FXS side (yes, confusingly they are FXO’s as far as Asterisk is concerned.) that way , both of the 2-4 wire hybrids are hopefully optimized .

Delete all “vertical feature codes” to save confusion.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.