Help setup Cisco Linksys SPA3000 with FreePBX 16

I’ve been trying to setup a SPA3000 as a trunk, however I cannot place any outbound call, nor am I able to receive any inbound call. Here are my settings:




Inbound Route:

Can anyone help me setup the same correctly ?

Where are the logs showing the details of the failure?

In the mean time, what is this:

image

If this represents the FreePBX system, you should not be trying to register.

This is the FreePBX address indeed. If I don’t register, I cannot even get the trunk to register.

Log :

|29904|[2023-04-02 15:49:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|---|---|---|
|29905|[2023-04-02 15:50:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|29906|[2023-04-02 15:51:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|29907|[2023-04-02 15:52:06] WARNING[2269] res_pjsip_pubsub.c: No registered publish handler for event presence from 2901||
|29908|[2023-04-02 15:52:24] WARNING[2269] res_pjsip_pubsub.c: No registered publish handler for event presence from 2901||
|29909|[2023-04-02 15:52:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|29910|[2023-04-02 15:53:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|29911|[2023-04-02 15:54:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||
|29912|[2023-04-02 15:55:56] WARNING[2269] res_pjsip_outbound_registration.c: Temporal response '502' received from 'sip:10.2.0.226:5062' on registration attempt to 'sip:[email protected]:5062', retrying in '60'||

As I said you should not be trying to register. The purpose of registration is to tell the other part the URI to which to send incoming calls to you. It is not intended as a means of authentication.

502 is Bad Gateway, and normally indicates that the request could not be sent onto the next hop, but I don’t know why it would think there was a next hop, so you would probably need the logging from the Linksys to understand that. However there is no need to register in this case/

The SPA3000 is not a SIP registrar so it is not possible for Asterisk to register to it.

You can configure statically, but I prefer having the SPA register to Asterisk; this avoids unwanted interactions with the FXS side and allows the SPA to be remote. Please try:

In PJSIP Settings → General:
Authentication: Both
Registration: Receive
(Username, Auth username, SIP Server and SIP Server Port are greyed out and can be left blank)

In PJSIP Settings → Advanced:
Match Inbound Authentication: Auth Username
Rewrite Contact: Yes

In the SPA3000> PSTN Line:
User ID: SPA3000
Password: (same as Secret in the trunk)
VoIP User 1 Auth ID: SPA3000
VoIP User 1 Password: (same as Secret in the trunk)
Dial Plan 2: (<:2901>S0)
VoIP Caller Auth Method: HTTP Digest
PSTN Caller ID Pattern: (leave blank)

I probably forgot some stuff. If the SPA doesn’t register, report what, if anything, appears in the Asterisk log when it tries. Otherwise, post logs for failing inbound and/or outbound calls, as well as trunk settings (including Advanced) and SPA PSTN line settings.

Thanks a lot, I can receive inbound calls successfully.
Outbound calls are not working at the moment, however I believe that is a problem with my analog side of setup.

One problem I’m encountering is that I’m not receiving the correct PSTN Caller ID on my softphones:


can you please help me here too !

After receiving a call, look at the Info page of the SPA. Does Last PSTN Caller show the correct caller ID? If not, try increasing PSTN Answer Delay to 6. If that doesn’t help, check on the Regional tab that Caller ID Method and Caller ID FSK Standard are set correctly for your country. If no luck, use an analog phone to confirm that caller ID is present on the analog line.

If Last PSTN Caller is correct, paste the Asterisk log (with pjsip logger on) for an incoming call at pastebin.com or similar, and post the link here.

What do you hear? Does the Info page Last Called PSTN Number show what should have been dialed? If it’s blank, paste the Asterisk log (with pjsip logger) for the attempt.

The way I read the screen shots, it is seeing SPA3000 as the From user, but I couldn’t see anything obvious on the Linksys that would set that value as caller ID, but I didn’t know enough about the Linksys to really comment.

It might happen if the Linksys is trying to authenticate that way and no alternative caller ID mechanism has been provided (P-Asserted-Identity, or Remote-Party-ID - I believe the Asterisk side of these is set in Advanced Trunk Settings).

Humm could be PSTN polarity connection.

Have you try to reverse PSTN polarity connection??

Analog telephone hooked to the line correctly shows the caller ID after the second ring completes.

I have increased the PSTN Answer Delay to 6. Even then the SPA is not receiving the callerID

I’m from India > hence I have tried setting the Caller ID Method: to DTMF(Denmark) and DTMF(Finland) even then I am not receiving the correct caller ID. How to proceed from here ?

Outbound calls have started working. I had to increase the

PSTN Dial Digit Len: 0.3/0.2

because the campus PBX was not registering the DTMF tones if dialed too quickly.

Last PSTN Caller doesn’t show a number, so the problem is with caller ID detection (not with sending it to Asterisk).

Try (one at a time) for Caller ID Method: ETSI DTMF After Ring, ETSI DTMF, ETSI DTMF With PR.

If no luck, do you have a way to record the audio on the analog line, so we can see what format is being sent?

Could you please provide the full contents of the INVITE packet you receive from the ATA. I suspect that it is either not configured to send caller ID, or you have not configured Asterisk to receive the method it is using to send it.

Also, on what basis have you selected DTMF as the method of signalling caller ID over the analogue line. In the UK, and I think the USA, the data is transmitted with frequency shift keyed ASCII data, not DTMF (V.23 in the UK). There seem to various permutations of line reversal and ringing start and of DTMF and V.23 signalling, see Caller ID in India - Asterisk Project - Asterisk Project Wiki

1 Like

Sorry, I missed that. So if the ETSI DTMF methods don’t work, try ETSI FSK and ETSI FSK With PR, in each case setting Caller ID FSK Standard to v.23.

If none of those work, we really do need a recording that shows what the campus PBX is sending. Possibly, it’s not even an Indian format.

What is the current situation of your question? because have two separated issues.
“cannot place any outbound call”
“not able to receive any inbound call”

Both have been solved, but caller ID on incoming calls is not yet working.

  • Tried almost all combinations with FSK as well as v.23.
  • Reversed the RJ 11 contacts, still no luck

How does one record the incoming ring? I noticed caller ID is received on 2nd ring on my analog phones, but how do I record the line while ringing… voltages are as high as 30V and it’ll damage any recording equipment I have

I am still not convinced that it isn’t being decoded correctly, and just not signalled effectively in the INVITE.

Also, are you sure the host PBX even supports forwarding caller ID

I am reasonably certain that Last PSTN Caller will show caller ID even if the call isn’t sent to VoIP.

Confirmed by OP in post #10.

Butt set if you have one. Otherwise, put a 0.1 uF to 1.0 uF capacitor in series with an earphone, bridged across the line. Record the audio with smartphone or computer mic.

In countries where caller ID is sent after ringing, it’s generally after the first ring. However, to allow the caller ID to be seen earlier, some systems send a very short (< 0.5 s) first ring, then a pause during which caller ID is sent, then regular ringing (2 s on, 2 to 4 s off). If that’s what your system uses, it’s possible that adjusting Ring Validation Time, Ring Indication Delay and/or Ring Timeout will help, but I don’t understand how those are used so we’ll have to experiment.

The SPA syslog may give some clues as to what is going wrong.

Can you post a simple circuit diagram on how to hook this up ? I’m not getting what to put in series and what to bridge

I might be able to arrange a butt set - I don’t own one … but how will I record even through that ?

Sorry for being such a noob and asking at every point :sweat_smile: