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 pastebin.freepbx.org, 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 pastebin.freepbx.org 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.
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
In line 919 of the outbound attempt: OPTIONS sip:192.168.4.210:41119 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 192.168.4.210:5060;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 192.168.4.201:41119? 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: 192.168.4.210
SIP Server Port: 5060
Context: from-internal
Match (Permit): 192.168.4.210
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.