Cisco 7940 registration problem RESOLVED

I threw this into pjsip.endpoint_custom.conf;

[233]
force_rport=no

Now I can see the phone sending REGISTER’s but there seems to be no reply (using ngrep port 5060 to watch).

This is what I get now. Added the force_rport option and recreated the extension (it wasn’t showing up in the chan_pjsip peers list, so thought that going back and forth between stacks had stuffed it up)…

U 172.22.3.228:51440 -> 172.22.4.8:5060
REGISTER sip:172.22.4.8 SIP/2.0.
Via: SIP/2.0/UDP 172.22.3.228:5060;branch=z9hG4bK505b3494.
From: <sip:[email protected]>;tag=001469a7180c0011603d4433-6cef1ff3.
To: <sip:[email protected]>.
Call-ID: [email protected].
Max-Forwards: 70.
Date: Wed, 22 Jul 2015 00:41:48 GMT.
CSeq: 114 REGISTER.
User-Agent: Cisco-CP7940G/8.0.
Contact: <sip:[email protected]:5060;user=phone;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001469a7180c>";+u.sip!model.ccm.cisco.com="8".
Content-Length: 0.
Expires: 120.
.

#
I 172.22.4.8 -> 172.22.3.228 3:3
....E..:)...@................&..REGISTER sip:172.22.4.8 SIP/2.0.
Via: SIP/2.0/UDP 172.22.3.228:5060;branch=z9hG4bK505b3494.
From: <sip:[email protected]>;tag=001469a7180c0011603d4433-6cef1ff3.
To: <sip:[email protected]>.
Call-ID: [email protected].
Max-Forwards: 70.
Date: Wed, 22 Jul 2015 00:41:48 GMT.
CSeq: 114 REGISTER.
User-Agent: Cisco-CP7940G/8.0.
Contact: <sip:[email protected]:5060;user=phone;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-001469a7180c>";+u.sip!model.ccm.cisco.com="8".
Content-Lengt

Weird that the second packet is cut off? Not sure about that …

Okay I’ve found the problem to the solution…

pjsip.endpoint_custom.conf isn’t being included properly, or I have the syntax in that file wrong.

I added force_rport=no under [233] in pjsip.endpoint.conf and reloaded only Asterisk. It worked!

My pjsip.endpoint_custom.conf looks simply like this;

[233]
force_rport=no

But this setting takes no effect. What am I doing wrong with the custom file?

In the custom file try using this syntax:

[233](+)
force_rport=no

That didn’t work either. Seeing as though I have found the solution for why the 7940’s aren’t registering, I’ve started a new ticket to address why the custom file isn’t working - Pjsip.endpoint_custom.conf Not Working RESOLVED

It doesn’t work, but it should (imo). I have filed a bug report with additional details here:

http://issues.freepbx.org/browse/FREEPBX-9810

I’ve wasted days in the past trying to get a 7940 to register with pjsip and I was only able to get registration with chan_sip. I also went down the ‘force_rport=no’ rabbit hole and it went nowhere. The ports in SIPDefault.cnf are right at the top of the file labelled: proxy1_port:, proxy_emergency_port, proxy_backup_port: etc. I changed all mine to 5061 as indicated in the extensions module, rebooted the phones and they’re working now.

Your not alone having same issue with the Cisco 7941/7961 phones. Tried to change firmware to sip from sccp and some got stuck to the point where I put it down to see clearly from another pov. I have nine phones total 6-7941g,3-7961g and I want to scream.

This has now been fixed in core v12.0.39 as per http://issues.freepbx.org/browse/FREEPBX-9810

Add the force_rport=no config to pjsip.endpoint_custom_post.conf file.

I can confirm that my 7940’s are working well with PJSIP.

Seems that I was slightly premature with claiming this was resolved …

When a phone sends anything to the PBX, the PBX will reply on port 5060 (instead of the random high source port the phone sent on) - so force_rport=no seems to be working in that respect.

Eg. Phone sends REGISTER on 52799, PBX replies with 401 UNAUTHORIZED on 5060 --> working as required.

However, when I try to ring another endpoint, the PBX sends INVITES to that endpoint on it’s random high port -
Eg. PhoneA sends INVITE:52799, PBX replies 100 TRYING : 5060, then 180 RINGING:5060
PBX then sends to PhoneB INVITE:52465, and repeats forever because PhoneB only wants to receive on 5060.
PhoneA hears ringing, hangs up and sends 487 Request Terminated, the PBX will reply 200 OK on 5060.

It seems that whenever Asterisk replies to anything, it won’t use the source port. If Asterisk generates something new, it will try sending that on the random high source port. How can I get Asterisk to send new requests on port 5060?

Bah … I changed Rewrite Contact to NO, reloaded FreepBX and made no difference. Rebooted the phones so they re-registered and now it seems to be working properly. Also, each endpoint is now showing it’s contact address as port 5060.

1 Like

I’ve just installed a fresh version - FreePBX Framework is 12.0.70 and this issue referenced in bug FREEPBX-9810 seems to be back. If I put the below in pjsip.endpoint_custom.conf and reload it does not function. If I edit the FreePBX generated file, pjsip.endpoint.conf and add force_rport=no to the extension the phone registers and all is well.

[233](+)
force_rport=no

Try pjsip.endpoint_custom_post.conf instead.

pjsip.endpoint_custom_post.conf did not exist, created and added the same info with no luck.

So I see in the issue ticket the resolution was to add an include in pjsip.conf for pjsip.endpoint_custom_post.conf at the end of the file, it is not present. When I add the include statement back and setup the pjsip.endpoint_custom_post.conf file this everything works! Obviously until FreePBX overrides the pjsip.conf file. I’m now more convinced the original bug was somehow reintroduced…

Where is this SIPDefault.cnf file located ??

the SIPDefault.cnf file resides in a tftp folder of your own choice, you could have it on the freepbx machine or on another server. The SIPDefault.cnf file is not part of freepbx, it’s a seperate file that the cisco phone needs to boot up. On the cisco phone settings (buttons on the rhs) there’s an option to specify the ip address of the machine that has the SIPDefault.cnf file.

Neuronetv, so if it is not there, I would need to create the file? I got two 7975 IP phones from a friend who “gave up” on getting them working and I am now trying to get them working on my freepbx and I must say they are picky :frowning:

yeah you’d need to create your own, but here:
http://198.91.92.112/SIPDefault.cnf
is a bog-standard SIPDefault.cnf file that you can modify to suit your own system. Get it quickly because it will be deleted from my server soon.

Thanks Neuronetv, I have downloaded the file.