Crude proof of concept for a campon replacement

I’m periodically reminded that there are people in the world that miss Campon in FreePBX/Asterisk, where a local device state can be monitored and initiate a call back once the device is free. Here is a rather kludgy way of doing it with pure dialplan:

It’s proof of concept only right now, but sharing here for anyone who’s interested in working toward a workable solution.

3 Likes

This is looking pretty good. The one thing I’m curious about is when Bob calls Alice and gets a busy signal you are relying on the phone to return that, right? Because what if Alice has her phone set to DND locally? Bob will get a busy, dial into this CampOn and it will see Alice as NOT_INUSE and dial Alice again but now you’re in a loop. Alice is returning a BUSY but CampOn doesn’t think Alice is.

CampOn works great when the phones fully interact with the PBX system (ie things aren’t set locally like DND) and when the extension can return a BUSY state internally without trying to call the phone. With SIP, part of the reason it never worked properly is because phones didn’t fully interact with the PBX and had local settings that the PBX couldn’t track.

To have this really work properly the phones would have to make sure no local services like DND are being used and things like DND are set at the PBX level. Then the extensions would need Device State Busy At set to at least a 2 to that when there are two active calls the device state changes to BUSY.

I would also include Call Forwarding and Alternate Destinations as well as those would be executed before Voicemail. Ex: Alice returns a busy from her phone, she has Alternate Busy Destination set to Force FollowMe.

This is a good start though.

At present, dialplan logic relies entirely on the local extension hint. The call setup is delayed until the callee extension hint shows as ‘NOT_INUSE’. This corresponds to the use case where the callee is on the phone, and the caller wishes to automatically set up a call when they become free. A callee device setting that returns 3XX/4XX but otherwise does not affect the device hint will not work with this dialplan.

It hadn’t occurred to me to capture the ${DIALSTATUS} of the previous attempt and work that into the logic somehow. AFAIK, the previously dialed number and it’s DIALSTATUS are not stored automatically in AstDB, so the dialplan to preserve that adds a bit of complexity.

Perhaps we can combine it with Asterisk Call Completion? See the child page where they provide an example

https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5243096

You mean the thing that requires specific settings on the channel driver and only has the support in chan_sip? That one?

Edit: Just an FYI. CCSS was added in 1.8 but I don’t think it has been touched since 11 (and that is being generous). It never even had DAHDi channel support added from what I can tell.

CampOn was deprecated in FreePBX 13 and I’m guessing for good reasons. Lack of actual support for it and no real need for it. While I know there was a single request for it this year, I’m not sure this project needs a CampOn/CCSS solution anymore. There are just too many other ways to deal with that in 2022.

…Ahem… I didn’t realize that I wasn’t acting nice here.

I initially did not read through all the documentation on it, only now I went though it and saw it mentioned in Call Completion Info and Tips - Asterisk Project - Asterisk Project Wiki
I had assumed that it can work with both drivers. Apparently it cannot.

You were acting nice. That was a shock tactic.

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