PJSIP vs Chan_SIP... PJSIP extensions have bad static

I had been using Chan_SIP extensions. A couple of days ago I created new extensions using PJSIP because I have the need to have the same extension on multiple phones. I kept the old extensions, just in case.

Since switching my devices (Obi1062, Obi1032, Obi202) over to the PJSIP extensions, I have noticed some pretty bad static. Both the PJSIP & Chan_SIP are using the same trunk.

This evening I added the old extensions, Chan_SIP, to the devices so I can select the new or the old. I’ll make a call with the PJSIP extension, hear static… Hang up and call the same number with the Chan_SIP extension and the call is clear.

  • Raspberry Pi 3B+ / RasPBX
  • FreePBX Version:
  • Asterisk Version: 13.20.0

Has anyone else experienced this or have anything suggestions on how to trouble shoot it? I’m relatively new to FreePBX/Asterisk.

I appreciate any help, thank you.

What calls are affected (intra-office, internal functions e.g. echo test or retrieving voicemail, outbound, incoming)?
Is the impairment heard by the extension user, the remote party, or both?
What does it sound like (choppy voice, watery sound, clicks and pops, distortion, too loud or too soft, etc.)?
If you record the call (in FreePBX), does the recording also sound bad?
On a problematic call, what codecs are in use (on phone and on trunk)?
When you use chan_sip instead, what codecs are in use?

1 Like

@Stewart1 Well done on the troubleshooting questions!!

Ok, sorry for not replying sooner. I needed to collect some of the info and I was off site for much of the time.

  • Outbound and incoming
  • Extension user: static (clicks & pops). Remote user hears choppy.
  • Yes, the sound is heard on the recorded calls.
  • I couldn’t find a way to see the codec for previous calls. But during active calls, I could see it’s ulaw for both the chan_sip and pjsip extensions.

Sorry for not being more detailed, I just started falling asleep… you know when you all of a sudden hit a of over tired, lol

Goodnight and thank you for the reply and the thorough questions.

I’m very puzzled by your combination of observations.

In case you can’t fix this easily: If you just need incoming calls to ring multiple devices, a Ring Group may do the job and may offer better functionality. Also, follow-me may be a better solution. My extension is set up so if it’s not answered quickly, other phones (and my mobile) start to ring. Most calls are answered promptly, which avoids disturbing others or showing a false missed call on the mobile. If I’m on the phone, I can answer a second call via call waiting but the system is smart enough to not ring other phones. If I set do-not-disturb, no phones ring.

Check that on a failing call, the Pi’s CPU is not maxed out. Do you have more than one trunk provider? If so, do they all exhibit the problem? Does it matter if the trunk is pjsip or chan_sip?

Confirm that your ATA and IP phones are on the same LAN subnet as the Pi and that all devices are connected by wired Ethernet.

I’d start to debug this by capturing traffic from a failing call with tcpdump, then move the file to your PC and open it in Wireshark, which has extensive RTP analysis tools. Does the RTP from the trunk play properly? If not, what’s wrong with it (lost packets, excessive jitter, corrupted packets, etc.)? If it’s ok from the trunk, how about what’s forwarded to the extension? If that’s also ok, if you can get this to fail with a softphone extension, run Wireshark on the softphone machine and report what you see there.

1 Like

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