Cisco IAD2432 with chan_pjsip

I have recently built a new FreePBX server running FreePBX 16.0.33 System Version 12.7.8-2208.sng7

I am trying to connect my Cisco IAD2432 Version 15.1 using chan_pjsip, this use to work find on Asterisk 13 using chan_sip, but I am unable to get it fully working on chan_pjsip.

There is no registration or authentication, I have tried various both to add it via the FreePBX GUI and also adding configs in the custom_conf files. I am almost always able to call from the Cisco IAD2432 to Asterisk without issue, but have yet to be able to get a call to go from Asterisk to the Cisco, I either get a reorder tone, or a ringback depending on how I have the various pjsip files configured, but I never see anything hitting the Cisco with debug turned on in the Cisco.

Has anyone gotten a Cisco IAD2432 or similar Cisco device to connect using chan-pjsip or have sample conf files for pjsip?

These are the two most relevant errors I see on the Asterisk logs.

This is the error I see when I leave the qualify_frequency=60 out of the pjsip.aor_custom.conf but do get a ring back.

16065[2023-03-03 19:03:24] ERROR[15907][C-00000055] pbx_functions.c: Function SIP_HEADER not registered

If I add the qualify_frequency back I get a reorder and see this error.

18120[2023-03-03 19:06:58] ERROR[22458] res_pjsip.c: Endpoint ‘Cisco_IAD2432_1’: Could not create dialog to invalid URI ‘Cisco_IAD2432_1’. Is endpoint registered and reachable?

18121[2023-03-03 19:06:58] ERROR[22458] chan_pjsip.c: Failed to create outgoing session to endpoint ‘Cisco_IAD2432_1’

Please run the CLI command “pjsip set logger on”, then provide the output, from /var/log/asterisk/full, when the CISCO is attempting to register. Upload it to, when that is working again.

Instead of posting about a couple of leaves, please describe the forest.
What resources are you trying to use on the IAD (FXS ports, T1/E1 ports, both)?
Is the IAD on the same LAN subnet as the PBX? If not, please describe the networking between them.
Paste a copy of the IAD configuration at and post the link here. If you are too new to post links, just post the last eight hex characters of the URL.

If you still have it, post the peer details (and user details if not blank) for the chan_sip trunk on your old system.

IMO, it is unlikely that you will need to modify any pjsip config files manually. Qualify Frequency is a setting in the GUI, and is likely unimportant (though if there is no response at all to OPTIONS sent by Asterisk to the IAD, you need to find out why and fix it). I recommend removing all config customizations and troubleshooting the setup you entered in the GUI. Posting screenshots of the trunk configuration would be useful.

Using pjsip logger as @david55 noted, paste the Asterisk log for a successful incoming call, as well as one for a failing outgoing call. Both are useful because what the IAD is sending is a good clue to what is expects to receive. Since neither end should be registering, the registration attempt he mentioned is probably not relevant.

Does the PBX otherwise work correctly? For example, can you call from one local extension to another? If it has other trunking resources (SIP, POTS, etc.), can you make and receive external calls?

Go into the Asterisk console and do the following: pjsip show endpoint Cisco_IAD2432_1 and pastebin those results. Because this is looking like a misconfigured endpoint that can’t create needed URI’s to send outbound requests to the device.

Sorry it won’t allow me to post a link yet but here is the end of the pjsip show endpont link 669b0bf6

It has been removed. You need to post it again. In fact, you can just post it here.

The Cisco IAD is for FXS ports, it is on the same local LAN as the PBX, yes otherwise the PBX works with SIP devices, TE420 to ADIT 600 via a T-1 interface, SIP and IAX2 trunks, no other issues than the Cisco IAD.

Log for a call from Ext 6842009 (SIP Phone) to Ext 5551111 (on the IAD) d4ae9383

Log for a call from Ext 5551111(on the IAD) to Ext 6842009 (SIP Phone) 50017b92

freepbx*CLI> pjsip show endpoint Cisco_IAD2432_1

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: Cisco_IAD2432_1 Unavailable 0 of inf
Aor: Cisco_IAD2432_1 0
Contact: Cisco_IAD2432_1/sip: 5e95e42add Unavail nan
Transport: udp 3 96
Identify: Cisco_IAD2432_1/Cisco_IAD2432_1

ParameterName : ParameterValue

100rel : yes
accept_multiple_sdp_answers : false
accountcode :
acl :
aggregate_mwi : true
allow : (ulaw|alaw|gsm|g726|g722|h264|mpeg4)
allow_overlap : true
allow_subscribe : true
allow_transfer : true
allow_unauthenticated_options : false
aors : Cisco_IAD2432_1
asymmetric_rtp_codec : false
auth :
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-internal
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 : 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 :
outbound_proxy :
outgoing_call_offer_pref : remote_merge
pickup_group :
preferred_codec_only : false
record_off_feature : automixmon
record_on_feature : automixmon
refer_blind_progress : true
rewrite_contact : false
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
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 : off
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 :
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

Your device isnt responding to keepalives and therefore Asterisk thinks it is down and wont send calls to it.

Thanks! Didn’t notice that, I’ll set that and try again.

In line 919 of the outbound attempt:
OPTIONS sip: SIP/2.0

You apparently set pjsip Port to Listen On to 41119. I assume that you chose a non-standard port to minimize malicious traffic from the outside. No problems there.

But the IAD is listening on the standard port of 5060; line 151 of the inbound call shows
Via: SIP/2.0/UDP;branch=z9hG4bK060
so it is not responding to the OPTIONS request.

Why are you sending OPTIONS to port 41119 on the IAD? Does 41119 appear anywhere in its configuration, other than the session target of IMO it shouldn’t, but if so, please explain. Does 41119 appear anywhere in the trunk configuration on the PBX? IMO it shouldn’t, but if so, please explain.

I recommend that you take out any custom config files entries related to the IAD, set up the trunk with a very simple starting configuration and troubleshoot from there. For example:
Authentication: None
Registration: None
SIP Server:
SIP Server Port: 5060
Context: from-internal
Match (Permit):
Rewrite Contact: No
Direct Media: No
Force rport: No

Leave everything else at defaults (I hope I didn’t forget anything important) and test. With luck, any errors will point to simple changes that will get it all working.

Unrelated to making and receiving calls, I noticed problems related to voicemail subscriptions. Is this something that you will eventually need to get working (do the analog phones have MWI, VMWI and/or need stutter dial tone)? If so, it may be possible (and simpler) to configure the IAD and PBX as a block of extensions, rather than with a trunk between them. Or, you might set up a block of virtual extensions on the PBX. Or, another solution with customization?

Stewart, that was the issue, port 41119, I figured since that was the port configured with in the Asterisk SIP Settings that they all need to match. I am now able to call in both directions thanks a lot!

For the voicemail subscriptions there are only two extensions with voicemail configured both on SIP phones, I will have to look at those logs again myself, probably just being focused on things related to the IAD I didn’t take notice. No there won’t be any need for MWI on these analog devices, they are just to demonstrate my old analog phones mostly.

You do have me curious to your statement of “it may be possible (and simpler) to configure the IAD and PBX as a block of extensions, rather than with a trunk between them” I’m not sure I’m following what you are describing.

FreePBX manages and tracks numerous features associated with ‘extensions’. These include voicemail, call forwarding, Follow Me, call waiting, call pickup, BLF, various aspects of ring groups and queues, etc. Many of these depend on each extension being an endpoint. As a result, when a block of extensions is connected via a single endpoint, it is difficult (or sometimes impossible) to get these features to work properly.

Most gateway devices can be configured to act as a separate endpoint for each extension. For the IAD, I believe you can set up multiple VoIP dial peers, each registering to Asterisk as an extension. Although maintaining many registrations is less efficient technically, the additional load is usually minimal.

If the phones connected via your IAD only need to make and receive calls, your existing trunk setup is fine. However, if there are needed features that you can’t get working through the trunk, consider the multiple extension approach.