I upgraded my installation of FreePBX to version 17 and I am running into an issue with the FXS ports on my Cisco SPA8800. I can’t get ports to register any longer now that all of the communications has been moved to pjsip. Nothing was changed for the configuration of the SPA8800 from before the migration to post migration. The port that it is configured to operate on is still 5060 and the FX0 ports are registering successfully.
Can you check on the Asterisk CLI if the register message has been received? You can enable SIP logging by running ‘pjsip set logger on’ or ‘sip set debug on’. If you don’t see the register message in Asterisk, there may be an issue with the FXS gateway configuration or the gateway not being properly pointed to Asterisk.
What port was chan_sip listening on in the old system?
Chan_sip was using port 5060
I also brought the old freepbx server back up and changed the chan_pjsip on it to 5060 and converted the extensions over to pjsip and the FXO ports on the SPA8800 were able to register successfully on the old server.
Would the fact that the FXO interfaces are now configured using pjsip and no longer with chan_sip causing the issues with the registration? I have been trying to see if anything shows in the logs on Freepbx, but all I can find is the FXO trunks showing up in the file and nothing related to the FXO ports.
I captured the syslog debug messages from the SPA 8800. I’m not sure why it’s getting a 404 error since it was able to register with the old server without an issue.
08-08-2024 21:06:11 Local7.Debug 10.0.13.10 REGISTER sip:10.0.13.7:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.13.10:5060;branch=z9hG4bK-f51ce572
From: “Office” sip:[email protected];tag=a101c03e13fd5acfo0
To: “Office” sip:[email protected]
Call-ID: [email protected]
CSeq: 26297 REGISTER
Max-Forwards: 70
Contact: “Office” sip:[email protected]:5060;expires=3600
P-Station-Name: ;mac=b8621f896464; sn=CCQ194700C4
User-Agent: Cisco/SPA8800-6.1.11(XU)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
08-08-2024 21:06:11 Local7.Debug 10.0.13.10 SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.0.13.10:5060;rport=5060;received=10.0.13.10;branch=z9hG4bK-f51ce572
Call-ID: [email protected]
From: “Office” sip:[email protected];tag=a101c03e13fd5acfo0
To: “Office” sip:[email protected];tag=z9hG4bK-f51ce572
CSeq: 26297 REGISTER
Server: FPBX-17.0.19.1(21.4.1)
Content-Length: 0
What appears in the Asterisk log when the SPA attempts to register?
In Connectivity → Extensions, does extension 200 appear with type pjsip?
At the Asterisk command prompt, type
pjsip show endpoint 200
and post the output.
Oops, I answered your last post without reading the penultimate.
Yes, your trunk is probably conflicting, especially if using static configuration.
Please try settings like:
Trunk Name: (matches username for the SPA FXO port)
Secret: (matches password for the SPA FXO port)
Authentication: Both
Registration: Receive
Match Inbound Authentication: Auth Username
Rewrite Contact: Yes
Here is the output from the asterisk cli. As you can see from the output, the extension is registered on a different FXS device without an issue.
[0K
Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>
Endpoint: 200/200 Not in use 0 of inf
InAuth: 200-auth/200
Aor: 200 2
Contact: 200/sip:[email protected]:5060 bafe34dfb4 Avail 45.370
ParameterName : ParameterValue
100rel : yes
CHANNEL(parkinglot) : default
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : false
allow : (ulaw|alaw|gsm|g726)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
allow_unauthenticated_options : false
aors : 200
asymmetric_rtp_codec : false
auth : 200-auth
bind_rtp_to_media_address : false
bundle : false
call_group :
callerid : “Office” <200>
callerid_privacy : allowed_not_screened
callerid_tag :
codec_prefs_incoming_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method : invite
contact_acl :
context : from-internal
cos_audio : 5
cos_video : 4
device_state_busy_at : 0
direct_media : true
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false
dtls_auto_generate_cert : No
dtls_ca_file :
dtls_ca_path :
dtls_cert_file :
dtls_cipher :
dtls_fingerprint : SHA-256
dtls_private_key :
dtls_rekey : 0
dtls_setup : active
dtls_verify : No
dtmf_mode : rfc4733
fax_detect : false
fax_detect_timeout : 0
follow_early_media_fork : true
force_avp : false
force_rport : true
from_domain :
from_user :
g726_non_standard : false
geoloc_incoming_call_profile :
geoloc_outgoing_call_profile :
ice_support : false
identify_by : username,ip
ignore_183_without_sdp : false
inband_progress : false
incoming_call_offer_pref : local
incoming_mwi_mailbox :
language : en
mailboxes : 200@device
max_audio_streams : 1
max_video_streams : 1
media_address :
media_encryption : no
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_passthrough : false
moh_suggest : default
mwi_from_user :
mwi_subscribe_replaces_unsolicited : yes
named_call_group :
named_pickup_group :
notify_early_inuse_ringing : false
one_touch_recording : true
outbound_auth :
outbound_proxy :
outgoing_call_offer_pref : remote_merge
overlap_context :
pickup_group :
preferred_codec_only : false
record_off_feature : apprecord
record_on_feature : apprecord
refer_blind_progress : true
rewrite_contact : true
rpid_immediate : false
rtcp_mux : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_keepalive : 0
rtp_symmetric : true
rtp_timeout : 30
rtp_timeout_hold : 300
sdp_owner : -
sdp_session : Asterisk
security_mechanisms :
security_negotiation : no
send_aoc : false
send_connected_line : yes
send_diversion : true
send_history_info : false
send_pai : true
send_rpid : false
srtp_tag_32 : false
stir_shaken : no
stir_shaken_profile :
sub_min_expiry : 0
subscribe_context :
suppress_q850_reason_headers : false
t38_bind_udptl_to_media_address : false
t38_udptl : false
t38_udptl_ec : none
t38_udptl_ipv6 : false
t38_udptl_maxdatagram : 0
t38_udptl_nat : false
timers : yes
timers_min_se : 90
timers_sess_expires : 1800
tone_zone :
tos_audio : 184
tos_video : 136
transport :
trust_connected_line : yes
trust_id_inbound : true
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false
voicemail_extension :
webrtc : no
I will give this change a try and see if it corrects the registration issue.
I made the suggested changes and now the FXS and FXO ports are all registered and while I am able to make outgoing calls just fine, incoming calls are being blocked.
The following message was displayed in the Asterisk log
[2024-08-09 19:43:20] NOTICE[200753] res_pjsip/pjsip_distributor.c: Request ‘INVITE’ from ‘“SPA8800FXO0” sip:[email protected]’ failed for ‘10.0.13.10:5061’ (callid: [email protected]) - Failed to authenticate
I’m very puzzled. I don’t have an SPA8800 (and don’t know much about it), but the settings I gave work with an SPA3102, which I thought was very similar, except for having only one FXS and one FXO. Possibly, multiple FXO lines registering from the same IP and port is confusing pjsip.
At the Asterisk command prompt, type
pjsip set logger on
wait for the SPA to attempt registration (or reboot it if retry intervals have been set long), paste a section of the Asterisk log showing failing registration attempts for at least two FXO ports, at pastebin.com and post the link here.
I forgot to ask that the log also show a failing incoming INVITE and associated responses. This can be a separate paste if that’s more convenient.
Stewart1,
I have captured the logs and have uploaded the captures SPA8800 FXS ports failing to register after move to FreePBX17 - Pastebin.com
I’m very confused. The pastebin shows only failing REGISTER attempts from the FXS ports; no FXO activity appears. But you said that after changing the trunk settings, the FXS ports were working fine and the trouble was limited to incoming FXO calls. The timestamps show a very recent capture (trunk settings already changed).
Sorry, I forgot that I moved things back so inbound calling would work on the FXO ports. I’ll change things back to what you had suggested and rerun the logs.
Here is a new capture with the FXO ports. I also placed a test call during the capture where the call was not ringing on any of the FreePBX extensions.
The incoming INVITE from the SPA has a correct Authorization header (assuming correct password), so I’m puzzled why Match Inbound Authentication: Auth Username is not working.
At the Asterisk command prompt, type
pjsip show endpoint SPA8800FXO0
and post the output.
Here is the requested information.
Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>
Endpoint: SPA8800FXO0 Unavailable 0 of inf
OutAuth: SPA8800FXO0/SPA8800FXO0
InAuth: SPA8800FXO0/SPA8800FXO0
Aor: SPA8800FXO0 1
Transport: 0.0.0.0-udp udp 3 96 0.0.0.0:5060
ParameterName : ParameterValue
100rel : yes
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : true
allow : (ulaw|alaw|gsm|g726)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
allow_unauthenticated_options : false
aors : SPA8800FXO0
asymmetric_rtp_codec : false
auth : SPA8800FXO0
bind_rtp_to_media_address : false
bundle : false
call_group :
callerid :
callerid_privacy : allowed_not_screened
callerid_tag :
codec_prefs_incoming_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method : invite
contact_acl :
context : from-trunk
cos_audio : 0
cos_video : 0
device_state_busy_at : 0
direct_media : false
direct_media_glare_mitigation : none
direct_media_method : invite
disable_direct_media_on_nat : false
dtls_auto_generate_cert : No
dtls_ca_file :
dtls_ca_path :
dtls_cert_file :
dtls_cipher :
dtls_fingerprint : SHA-256
dtls_private_key :
dtls_rekey : 0
dtls_setup : active
dtls_verify : No
dtmf_mode : auto
fax_detect : false
fax_detect_timeout : 0
follow_early_media_fork : true
force_avp : false
force_rport : true
from_domain :
from_user :
g726_non_standard : false
geoloc_incoming_call_profile :
geoloc_outgoing_call_profile :
ice_support : false
identify_by : username,ip
ignore_183_without_sdp : false
inband_progress : false
incoming_call_offer_pref : local
incoming_mwi_mailbox :
language : en
mailboxes :
max_audio_streams : 1
max_video_streams : 1
media_address :
media_encryption : no
media_encryption_optimistic : false
media_use_received_transport : false
message_context :
moh_passthrough : false
moh_suggest : default
mwi_from_user :
mwi_subscribe_replaces_unsolicited : no
named_call_group :
named_pickup_group :
notify_early_inuse_ringing : false
one_touch_recording : false
outbound_auth : SPA8800FXO0
outbound_proxy :
outgoing_call_offer_pref : remote_merge
overlap_context :
pickup_group :
preferred_codec_only : false
record_off_feature : automixmon
record_on_feature : automixmon
refer_blind_progress : true
rewrite_contact : true
rpid_immediate : false
rtcp_mux : false
rtp_engine : asterisk
rtp_ipv6 : false
rtp_keepalive : 0
rtp_symmetric : true
rtp_timeout : 0
rtp_timeout_hold : 0
sdp_owner : -
sdp_session : Asterisk
security_mechanisms :
security_negotiation : no
send_aoc : false
send_connected_line : no
send_diversion : true
send_history_info : false
send_pai : false
send_rpid : false
set_var :
srtp_tag_32 : false
stir_shaken : no
stir_shaken_profile :
sub_min_expiry : 0
subscribe_context :
suppress_q850_reason_headers : false
t38_bind_udptl_to_media_address : false
t38_udptl : false
t38_udptl_ec : none
t38_udptl_ipv6 : false
t38_udptl_maxdatagram : 0
t38_udptl_nat : false
timers : yes
timers_min_se : 90
timers_sess_expires : 1800
tone_zone :
tos_audio : 0
tos_video : 0
transport : 0.0.0.0-udp
trust_connected_line : yes
trust_id_inbound : false
trust_id_outbound : false
use_avpf : false
use_ptime : false
user_eq_phone : false
voicemail_extension :
webrtc : no
I forgot to also mention that I also re-entered the passwords for the FXO ports on the SPA8800 just to be sure.