Chan_sip vs pjsip

I recently created a 13 FreePBX

I see working with PJSIP

I do not know the difference …

Can anyone help me understand

Or indicate how to document in detail?

Else

If I decide to use “SIP chan” how can I change the 13 to work with “SIP chan”?

I saw that you can set in the old SIP “Advanced settings”

There is the appropriate heading “SIP Channel Driver”

I still doubt what changes between one and the other ??? !!!

Maybe this helps:
http://blogs.digium.com/2013/11/20/asterisk-12-part-iv-sip-stack-future/

yeah old post. but, for you and me probably the most important thing is, pjsip will eventually replace chan_sip…
and the makers consider pjsip supreme to chan_sip - as long as it does what it is supposed to…
In Other Words: there shouldn’t be any difference to end users; but it makes life better for the coders. In which case, we end users (of tools like FreePBX) should not know any difference. If that makes sense :wink:

1 Like

But, it will make a difference to end users. The newer code in PJSIP is more likely to have bugs than the very mature code used by chan_sip. Also, the configuration parameters (i.e. PEER details in chan_sip) and the configuration parameters used in PJSIP are completely different from one another…

If you mean, it feels like being fast-tracked, it sort of does feel that way :wink:
Can’t help to feel that too; but, PJSIP is being used by a lot of things you might not know already (ZoIPer or other softphones, mobile or PC, come to mind) good luck doing that with chan_sip. [ license differences excluded, cause I did not read license of either ]

I think the implication here is, if you stick to FreePBX ways of doing things, you should be fine :wink:

for now I still work at the “old way” I’ve been of help thanks

I have been experimenting with pjsip on both freepbx 12 and 13 with various success and failure.

From the point of extensions there seems to be no difference, chan_sip and pjsip have worked well for me, the benefit of multiple end points on pjsip is useful.

As regards trunks I have had a lot more problems. I have a sipgate (UK Supplier) account setup with pjsip, it registers fine, will receive calls fine but refuses to let me dial out.

I have another trunk with orbtalk (UK Supplier) that requires an out bound proxy, that also registers fine with pjsip, calls can be made in and out but I only get audio in, no outbound audio on external calls.

My problems with these trunks remain as I haven’t had time to investigate further.

A trunk between two Freepbx 13 systems is working fine.

My biggest problem has been dealing with dynamic IP addresses. With chan_sip a change of IP at any location can quickly be recovered from with all trunks, service providers and internal links back up and working in less than five minutes without any need for user intervention.

However on pjsip this has proved a nightmare. Firstly the on pbx behind the IP change the pjsip channel collapses completely, no trunks are available and interestingly even pjsip extensions become unavailable and only recover after restarting the asterisk service.

Remote pbx’s only make a partial recovery, they update the dns name fine and can call into the pbx again on the new IP but fail to update the match field to allow calls from the new IP to come in. Interestingly I tried to set the match field to allow all IP’s and this caused the whole pjsip channel, all trunks and extensions to stop working. The match field only seems to update on an asterisk service restart.

One other strange thing I have noticed is I have two pbx’s (one and two) with a pjsip trunk working fine between them . A user at location one has a iPhone app that logs into a pjsip extension to check voice mail, this works fine from any location except location two when the registration is matched with the trunk “match” IP field, sent to the trunk not the extension to register and fails. With chan_sip this setup works fine, although a little inefficiently.

In general chan_sip seems a very robust and reliable technology that can recover easily from any network disturbance, pjsip quite the opposite, I really don’t look forward to the day when there is only one choice, and that is pjsip.

For now I have been forced to stick with chan_sip.

1 Like

No, just the opposite. Even with FreePBX, you’re going to have to learn how to configure the PEER details on pjsip, and that will be totally different than how you do it with chan_sip.

So even if I do work out how to configure my problem trunks with pjsip and get them working how will I overcome the problems of unreliability.

Is pjsip supposed to be the finished product in freepbx 13 or will there be considerable improvements to follow. It feels to me that NAT is not well supported (easy to configure and control) in pjsip and if the pbx is behind a router with a dynamic IP address pjsip is not a viable option at the moment.

Trying to work with pjsip compared to chan_sip currently feels like a big step backwards, or have I just lost the plot here.

I just use chan_sip and everything works great. Why fix what’s not broken?

I think that is the point, chan_sip is not broken, but pjsip feels very broken, the problem is as end users we might not always have the option to choose.

It’s not an immediate problem, but from the point of software security (knowing you can rely on it in the future) I would love to see pjsip working a lot better and more reliably than it is today.

I am not sure what other software uses the pjsip technology but I get the feeling it is better suited to supporting phones and soft phones than to pbx’s and trunks, again maybe I have lost the plot, but at the moment I would rather see a future with chan_sip and not pjsip.

I don’t know if other users have had better experiences than me with pjsip but when I have posed questions on this forum about its reliable implementation answers have been few and far between.

1 Like

I do not know between different Pjsip sip and where? anyone can help me on this.
thank you

Here is an obvious question, are pjsip and Chan_SIP interchangeable on older phones with older firmware? I have a lot of old PolyCom 501’s that are running the firmware 3.1.8 of course since these phones are well past their EOL the firmware if not being updated at all. Will pjsip work with them, or do I just have to stay with chan_sip until I get new phones?

Pjsip and Chan_Sip are the options for the PBX not the phone, think of them as “firmware” for the PBX, any sip compatible phone will work with either of them.

Your 501 will work with option.

1 Like

I’ve just spent 3 days trying to register a couple of SNOM handsets to FreePBX using Chan-Sip (as per the Crosstalk Solutions videos). Ugraded and downgraded firmware, tried all the settings changes I could find on a hundred forums etc, and nothing. Always failed to authenticate. Then created a Pjsip extension, and registered immediately. I haven’t tried working with it yet, or even set up a trunk for it, but the Chan_Sip was not going to work with these phones. I’d love to know if anyone else has had that experience.
This is on the very latest stable FreePBX distro download (13.0.189). I could try messing around a bit more with ports etc, but time to move on. (I am an Asterix newbie, by the way)

I am running the latest beta and have the same problem with My Polycom phones. I have looked over the phone config files and looked at the settings inside the phones, but i have no idea why sip doesn’t work. They will not authenticate. To the point they become blacklisted in fail2ban. . As soon as I switched to pjsip they came right up.

sip trunks are fine though.

Any users struggling to register chan_sip extensions who claim that PJSIP worked on their first try are almost certainly missing the fact that each SIP driver is bound to a different port on the PBX. You must define the SIP port number correctly when setting up the clients. You are reminded of the SIP port number whenever you edit an extension in FreePBX:

1 Like

I don’t think that’s the issue here.

I am using the EPM, which does seem to assign port correctly. I have also gone into the endpoint to make sure it has the correct info, including the port. chan_sip devices refuse to register/authenticate regardless of port. I have even disabled chan_pjsip and rebulit everything and the endpoints refuse to register. SIP trunks are fine though.

I cant stand chan pjsip using same ports as normal sip what is that about why do such a thing i dont get it, my phone wont rgister and i dont know why i ave 401 error :confused: why is there not a way to choose 1 sip over another chan pjsip so i can see if it is 1 of them causing the issue! my password is correct and so is the auth name / ext number! im so stuck!!! no calls are going through from my cisco phone either. anyone help me with this? now im getting 408 request timeout on my mbile softphone registering.

Too much traffic on this to comment.