Building my first system - Cisco 7945G woes


I’m just setting up my first system. It’s on the Raspberry Asterisk distro running on a Pi mk 3. I was donated a Cisco 7945G phone that started this whole project and I’m having terrible trouble getting it working. At this point my config is a Frankenstein’s monster of various fragments I found online and I have no idea whether my phone config, FreePBX config or both are faulty. I would appreciate any help you could offer.

My .cnf.xml file: SEP0008308A7D9D.cnf.xml

My dialplan.xml: dialplan.xml

The firmware I have for the phone is 9.2.1

I have locked pjsip into TCP and turned force-rport off.

The phone gets its option 150 from my DHCP server and appears to successfully load everything except the locale. It then gives me a screen that leads me to believe it is registered and operational but nothing that requires the establishment of an audio channel works and the Asterisk Report says it is unavailable:

Endpoint:  201/201                                              Unavailable   0 of inf
InAuth:  201-auth/201
Aor:  201                                                1
Contact:  201/sip:[email protected]:50298         b4087f3223 Unavail         nan
Transport:               tcp      3     96

I turned on PJSIP logging, allowed the phone to register and then tried to dial *65 as a test. I get no audio from the phone even though it indicates a call in progress

The log says: PJSIP log

Thank you very much for taking the time to read all this and in advance for your help.

All the best,

Asterisk is rejecting your media offer for some reason:

e[0K[2020-04-01 00:32:08] e[1;31mERRORe[0m[21595]: e[1;37mres_pjsip_session.ce[0m:e[1;37m716e[0m e[1;37mhandle_incoming_sdpe[0m: Failed to handle incoming SDP. Session has been already disconnected

Nothing obvious stands out to me in the SDP that Asterisk would dislike, but there are a lot of Cisco options in there and maybe one of them is causing the problem. The phone is offering very standard acceptable codecs.

You say that you are using TCP but the registration request and the call invite are coming from the phone as UDP.

I have a 7965G which is a very nice phone but I set it up using the skinny protocol. You should be able to get your 7945G to work with SIP but as many here will tell you it is challenging to set up the Cisco enterprise 79xx series; not a great “first phone.” (Is your donor a friend, enemy, or Cisco supplier?)

edit: I didn’t study your config but one thing stood out and it also showed up a lot in the logs – “kpml” being offered, which Asterisk doesn’t understand. It would probably be good to disable it in your config xml file:


(probably set to 0)

This may not solve any problems but it will clean up the SIP a little.

But line 976 of your log shows:
Contact: <sip:[email protected]:5060;transport=udp>

Which are you trying to use?

Thank you both.

Honestly, I don’t mind whether I use TCP or UDP as long as it works. I found a post online that said Cisco phones wouldn’t work on UDP so I turned UDP off in the PJSIP config, selected in the extension definition and set transportLeyerProtocol to 1 in the phone config (which the guides I found all said was TCP-only.

Lines 196-205 of the log mention TCP but I too had noticed various mentions of UDP. With all the above switches set, I have no clue why UDP is still being attempted. Have I put the transportLayerProtocol line in the Cisco config in the wrong place or chosen the wrong value?

I’m not sure where the [email protected] is coming from. It’s nowhere in my config.

I’ve tracked (but don’t really help with) Cisco phones using the SIP load. The assertion that the phones will only work with TCP is not necessarily correct, although I do recall that some of the newer phones (797* and 8***) both seem to work better with the TCP options than UDP.

The way to analyze the UDP traffic is to look at the direction the traffic is flowing. If the UDP references are coming from the server, then the misconfiguration is in Asterisk somewhere. If the option calls are coming from the phone, you may need to set up TCP/UDP both as your protocol choices on the server.

As mentioned above, you are on a very challenging path for a first-time user. I love these phones and use them almost exclusively in my commercial work, but I don’t use the SIP load on them. The old phones, especially the older ones, simply don’t have the horsepower to make them work well in that configuration.

With anything older than the 7970, I always recommend looking into the possibility of using Chan-SCCP-B which leaves the phones in their SCCP mode. If you get to the point that you are completely stumped, it might be worth a look for you. It installs as a loadable Asterisk module instead of patches to Asterisk, so it’s easier to add and delete. It may require some base-file editting to get the sccp.conf files squared away, but it is an option for you.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.