Which is more efficient, ChanSIP or PJSIP?

Hi
I always used the traditional chan sip with FreePBX until the last 8 months ive started doing setup with pjSip.

Both are setup correctly, however I have had the perception that pjSip is less efficient / needs more resources or more bandwidth to operate efficiently and ultimately seems to have more cutouts or interruptions.

Im not sure whether this is because of pjSip or other variables.

So my question is, which should I use for the next deployment if both are an option?

Thanks

My oppinion is that pjsip is more stable with nat and firewalls. But for me it is not stable enough at the moment to configure pjsip by a customer appliance. Some DECT devices like Snom have connection problems from time to time. Last version 13.17 dropped all connections after fwconsole reload. So i still will wait a while before using pjsip.

Chan SIP it is then!

Thanks

PJSIP is no more stable with NAT or firewalls than Chan_SIP. It is SIP the core concepts of how SIP should work with NAT/firewalls is the same.

SIP Stacks may contain certain features that other SIP Stacks do not but they are generally 90% or more the same in core concepts and stands.

The routers or the ITSPs or other sides don’t care about Chan_PJSIP or Chan_SIP. I mean look at it now. You still need 5060 for signaling and 10,000 to 20,000 for RTP, that doesn’t change.

So they are similar in standard so is there a benefit of one over the other then? Like I said chan sip seemed more tolerant of less bandwidth but thats a loose perception and in no way backed up?

Chan_PJSIP = next phase of Chan_SIP. Instead of trying to rebuild Chan_SIP to have new features added to it the option was a new driver that they can make the changes too freely and make wide base updates to the underlying code.

Chan_PJSIP is also young in comparison and in this industry. It has not been proven out like Chan_SIP and by that I mean, it has not been deployed in a lot of high capacity scenarios like Chan_SIP has. Even the guys at Digium have admitted people using Chan_PJSIP in those scenarios can find issues they would not have been found or looked for because they haven’t had it deploy in that way.

What are you actually trying to achieve?

Setting up a new FreePBX and just want to know which is best for a production server?

At this point, I would say unless you really need the few things PJSIP offers that Chan_SIP doesn’t, stay with Chan_SIP.

1 Like

Ok will do, seems weird to not be using the ‘more modern’ technology though.

Thanks

chan_sip is no longer maintained and hasn’t been in 4ish years

As of the 25th of this month it will receive no more security patches.

Performance depends on what you are doing. 1 call chan_sip will win performance wise, under a normal to high call load pjsip will win.

Most of the “issues” people have are likely configuration issues. This is not super suprising with ~200 config options in PJSIP it is pretty daunting from the outside. You don’t need then all. It is especially more difficult than pasting a blob from some cha_sip example and pressing go.

There are resources like https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip#Migratingfromchan_siptores_pjsip-SidebySideExamplesofsip.confandpjsip.confConfiguration but this doesn’t mean much when configuring from the gui. We are going to work on documenting “chan_sip blob” to “pjsip GUI settings”

I think from using both pjSip is easier :slight_smile: setup is really assisted by the verbose logging

Understand that what you start with is always the easiest. Some folks have been using chan_sip over a decade so the switch is not overly desirable. About 8years ago I tried playing with freeswitch after years of using Asterisk. After an hour or so I moved on. This isn’t anything wrong with freeswitch, just my brain simply said NOPE because it lived in Asterisk mode.

1 Like

Hi James, curious if you got around to documenting the below GUI steps.

1 Like