Extension not deleted

I made a PJSIP extension, 1002. I now want to delete it and re-do it as CHAN_SIP. I deleted it, but when I try to add a new extension it says “1002 extension number already in use by: User Extension: 1002”

I’m used to working through Elastix 2.4, but I’m now trying to just use freePBX by itself so it’s a bit different. I’m using FreePBX 14.0.1.4. I’m confused by the CHAP_SIP banner of “This device uses CHAN_SIP technology listening on Port 5160 (UDP - this is a NON STANDARD port)”, vs the PJSIP on 5060. The phones I’m working on are an Aastra 6755i and a couple of re-flashed Cisco 7942G that worked fine under Elastix 2.4 and the “Generic SIP extension” so I don’t know which type to use here.

Actually, I figured the “delete” part out via Advanced > Aggressive check. still working on comprehending the PJ VS CHAN_SIP issue for the phones themselves.

You can use either SIP driver, bearing in mind that chan_sip is the legacy driver that you are most familiar with. The banner is telling you which driver the extension uses, and which port the driver is bound to. This is critical information for you to know if you are configuring devices, as you must specify the sip port correctly when registering phones.

The Cisco phones are not registering, and I’m seeing lines in the logs:
[2017-08-03 13:00:18] ERROR[3080] res_pjsip_config_wizard.c: Unable to load config file ‘pjsip_wizard.conf’

[2017-08-03 13:00:18] VERBOSE[3080] config.c: Parsing ‘/etc/asterisk/pjsip_custom_post.conf’: Found
[2017-08-03 13:00:18] ERROR[3080] res_pjsip/config_transport.c: Transport ‘127.0.0.1-udp’ could not be started: Address already in use
[2017-08-03 13:00:18] ERROR[3080] res_sorcery_config.c: Could not create an object of type ‘transport’ with id ‘127.0.0.1-udp’ from configuration file ‘pjsip.conf’
[2017-08-03 13:00:18] ERROR[3080] res_pjsip/config_transport.c: Transport ‘10.0.0.20-udp’ could not be started: Address already in use
[2017-08-03 13:00:18] ERROR[3080] res_sorcery_config.c: Could not create an object of type ‘transport’ with id ‘10.0.0.20-udp’ from configuration file ‘pjsip.conf’
[2017-08-03 13:00:18] ERROR[3080] res_pjsip/config_transport.c: Transport ‘127.0.0.1-tcp’ could not be started: Address already in use
[2017-08-03 13:00:18] ERROR[3080] res_sorcery_config.c: Could not create an object of type ‘transport’ with id ‘127.0.0.1-tcp’ from configuration file ‘pjsip.conf’
[2017-08-03 13:00:18] ERROR[3080] res_pjsip/config_transport.c: Transport ‘10.0.0.20-tcp’ could not be started: Address already in use
[2017-08-03 13:00:18] ERROR[3080] res_sorcery_config.c: Could not create an object of type ‘transport’ with id ‘10.0.0.20-tcp’ from configuration file ‘pjsip.conf’

10.0.0.20 is the IP of my freePBX server. Looking in the /etc/asterisk/ there is no pjsip_wizard.conf.

Other than it being “new technology / newer protocol”, is there a specific reason to have the pjsip enabled? I’m contemplating disabling it, and changing the chan_sip to 5060…

I also just noticed the timezone was off (even though I set it during the initial ISO config) so that’s been fixed now.

The Aastra 6755i phone is registered using chan_pjsip, but the Cisco 7942 is still sitting at “Registering”.

I see it trying to register, but it seems to be failing here:

[2017-08-03 13:55:10] DEBUG[16419]: res_pjsip_endpoint_identifier_ip.c:222 ip_identify: Identify checks by IP address failed to find match: ‘10.0.0.206:50077’ did not match any identify section rules
[2017-08-03 13:55:10] DEBUG[16419]: res_pjsip_endpoint_identifier_user.c:133 username_identify: Attempting identify by From username ‘1001’ domain ‘10.0.0.20’
[2017-08-03 13:55:10] DEBUG[16419]: res_pjsip_endpoint_identifier_user.c:137 username_identify: Endpoint not found for From username ‘1001’ domain ‘10.0.0.20’
[2017-08-03 13:55:10] NOTICE[16419]: res_pjsip/pjsip_distributor.c:649 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘10.0.0.206:50077’ (callid: [email protected]) - No matching endpoint found

I didn’t have to set up any “endpoint” for the Aastra, I’m now researching that area inside the freePBX itself to see what’s up with that. Any suggestions would be most helpful!

I realized I had the extension set as pjsip, so I changed the port in the XLM to 5060; but then it doesn’t show up in the freepbx*CLI at all. I changed the XLM to a chan_SIP extension and rebooted the phone;

With Ciscos in the mix, this would be a good step. It also reduces some other possible conflicts and thinko-related problems from happening.

I enabled the pjsip debugging, and it shows:

<— Received SIP request (935 bytes) from UDP:10.0.0.206:53142 —>
REGISTER sip:10.0.0.20 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.206:5060;branch=z9hG4bKbce61874
From: sip:[email protected];tag=1caa07106be5000817b34689-1767ace2
To: sip:[email protected]
Call-ID: 1[email protected]
Max-Forwards: 70
Date: Thu, 03 Aug 2017 19:03:51 GMT
CSeq: 105 REGISTER
User-Agent: Cisco-CP7942G/9.4.2
Contact: sip:[email protected]:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-1caa07106be5”;+u.sip!devicename.ccm.cisco.com=“SEP1CAA07106BE5”;+u.sip!model.ccm.cisco.com="434"
Supported: replaces,join,sdp-anat,norefersub,resource-priority,extended-refer,X-cisco-callinfo,X-cisco-serviceuri,X-cisco-escapecodes,X-cisco-service-control,X-cisco-srtp-fallback,X-cisco-monrec,X-cisco-config,X-cisco-sis-6.0.0,X-cisco-xsi-8.5.1
Content-Length: 0
Reason: SIP;cause=200;text="cisco-alarm:14 Name=SEP1CAA07106BE5 Load=SIP42.9-4-2SR3-1S Last=cm-closed-tcp"
Expires: 3600

I do see it listed in pjsip show endpoints as 1003/1003. Some documentation I’m reading however states the Identity should be showing an IP address / CIDR not “1003-identify/1003” as what it is.

I just saw this scroll by:
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/screen’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/pinless’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/dialopts’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/novmpw’ in family ‘AMPUSER’
[2017-08-03 14:49:32] DEBUG[23145]: manager.c:6323 process_message: Running action ‘Command’
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/novmstar’ in family ‘AMPUSER’
[2017-08-03 14:49:32] DEBUG[23145]: manager.c:6323 process_message: Running action ‘Command’
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/state’ in family ‘AMPUSER’
[2017-08-03 14:49:32] DEBUG[23145]: manager.c:6323 process_message: Running action ‘Command’
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/state’ in family ‘AMPUSER’
[2017-08-03 14:49:32] DEBUG[23145]: manager.c:6323 process_message: Running action ‘Command’
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/busy/state’ in family ‘AMPUSER’
[2017-08-03 14:49:32] DEBUG[23145]: manager.c:6323 process_message: Running action ‘Command’
[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/temp/state’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/0/ext’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/1/ext’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/vmxopts/timeout’ in family ‘AMPUSER’

[2017-08-03 14:49:32] DEBUG[23145]: db.c:376 db_get_common: Unable to find key ‘1003/vmx/unavail/2/ext’ in family ‘AMPUSER’

It finally registered! This is what I had to do:
Disable CHAN_PJSIP
Change CHAN_SIP to port 5060
Enable TCP in Sip settings (I set the “button” to “Enable TCP” and “other” of tcpenable=yes and tcpbindaddr=0.0.0.0, this may be duplication but this is what I had to do in earlier freePBX but they didn’t have the button)
Convert the extension to CHAN_SIP
Set the Transport to “All - TCP Primary” in the extension.

Cisco says to “not use UDP” for these phones; however it still seems to be using “transport=udp” so…meh it’s working!

The main reason I’ve been fighting with this is because I’ve got a couple of job offers with MSPs who both are interested in converting clients over to freePBX, and I know there will be Cisco phones in the “mix” so I needed to nail this down in my lab environment for the final interviews. Now to finish writing up the documentation to take in!

A simpler solution might be to take a few hours and explore Chan-SCCP-B. I wrote a Wiki page for them on integrating it with FreePBX and even wrote a FreePBX module for it (the module is no longer useful because of the underlying changes in the FreePBX data models). I use this channel driver for all of my Cisco implementations and have always been really happy with it. It also preserves the functionality of the phones that you lose with the SIP load.

Sweet! Thanks, I will take a look at that!