Freepbx 15 CLI Chan_sip conversion script

I still have to make the plunge to pjsip. I have a freepbx 14 and a freepbx 15 box running in production. One is primary one is secondary. The question would be, how long is this conversion script in freepbx 15 going to stay around:

When chan_sip is fully depreciated I imagine my chan_sip truck connection will be depreciated as well?

I’ll be honest when I first set up freepbx I did not have good luck with pjsip and extensions (that was early 2018, maybe even late 2017) and I could not get it working correctly, but had chan_sip working first try (this was before I heard any news of depreciation in asterisk). If I posted a sanitized config of my current chan_sip trunk connection, I am wondering if someone would be willing to direct me on what the “conversion” for my current chan_sip trunk settings for that trunk would look like on pjsip? That way I can start thinking about the jump. I will do all this in a test environment of course.

We can only speculate, but you likely were not using the right ports. I’ve been using pjsip longer than that with no issues.

I’m not denying it works great, just expressing my experience. I was able to get chan_sip working from day 5, and it’s working for 700 phones across 30 sites for about 3 years now. There was a few days needed to make sure all the correct ports were Used and open on the edge device to the truck pilot provider. As well a little time to knock down Fortigates VoIP ALG implementation, since it was messing with sip/rtp and freepBx. But yeah the first 4 days spent with trying both at the time, led me to more success with chan_sip. Can you elaborate on the “right” ports since its 5060 or 5061 that could be used and all the players such as rtp ports 10000-20000, etc and all the other ports I don’t have memorized but utilize for my working chan_sip implementation.

To me the sip protocol is the sip protocol. If I convert my extensions to pjsip it should all just work since the same fundamental ports that my Chan sip is using and working with should be what pjsip uses outside of if I decide pjsip should reside on 5060 or 5061. Is there some sort of extended port set on pjsip that lies outside of the port set for chan_sip I don’t know about…maybe I’m looking at this wrong, but from a protocol perspective that makes no sense to me since it’s still sip but with a different driver.

I honestly want to know if I’m possibly missing something, please teach me, and redirect me to the port set that would exist outside of what the chan_sip implementation uses, because quite possibly, I’m missing something and that would be great for me to know, for when I go forward. Many people have expressed that if I have a working chan_sip implementation, and convert to pjsip, that myself and others should be good to go, since it’s all sip and the ports that sip uses. But yes, please let me know if I’m missing something. When I get a free moment I will edit this post and list all ports, and general config settings that are allowing my chan_sip to fully work…which in theory should be similar to pjsip from a port perspective. That way someone can point out what I’m missing possibly.

chan_sip and chan_pjsip are different channel drivers for SIP. They listen on different port numbers unless you go into SIP settings in FreePBX and manually change them. That is likely your issue.

No concrete plans for a life cycle for this feature, but it’s reasonable to expect for it to be supported on any system that supports both drivers. We need everyone to move completely to pjsip, so if there are tools we can provide to make that easier, we will do it.

2 Likes

@adell4444 I know they run on different ports :wink: 5060 vs 5061, that’s pretty clear, however, when I made those changes at the time, it didn’t work. My trunk provider specifically was insistent on using 5060, so I disabled CHAN_SIP and ONLY used the pjsip driver, and changed the port for it to 5060 at the time, but still no dice, from a trunk or Extension perspective. Yes all the RTP 10000-20000 ports and the usual suspect ports were open outside of standard SIP port change for PJSIP, so in my mind it should have worked, even from an extension perspective at that point. VOIP ALG, and my Trunk providers ports were also open. I would change it back to chan_sip and it would immedatly work with my chan sip extensions, Mind you that was 3 years ago. So outside of the standard 5060 vs. 5061, and the ports I mentioned, aree there any other ones? And yes at the time I did have PJSIP ententions set extra.

I will be testing this again soon.

If it’s been 3 years since you tried, you really are going to have to try again and see what issues you have now. chan_pjsip is the way forward so you just have to test and see what issues arise.

Even if the script goes away, you can just write a shell script to make a CSV file for use with the bulk import tool.
i.e.

  • export SIP extensions to CSV
  • use script to make new CSV suitable for pjsip extensions
  • delete old SIP extensions
  • bulk import pjsip CSV file

Yes, that is a good idea. And Yes, @adell4444 I will try again very soon. I have to, to move forward. I’m on the bleeding edge of updates on FreePBX 15 currently, but I need to make this PJSIP conversion happens. Wish me luck. Thanks. @neilsen, very good point, I will make sure to keep that in my hat, and remember this post. Thanks for all the input.

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