BLF to indicate if ANY extension is in use?

(John G) #1

Is there any way to do a BLF to indicate whether or not ANY extension (or, maybe better said, channel?) is in use?

Basically, I want to know if anyone is actively using their extension to either talk to another extension or outside line. Can I get a hint for that somehow so that I can do a BLF to indicate that the system is in use for any call currently?

(Reinhard Stindl) #2

It depends on your phones. Digium/Sangoma D- and S-series support it. Cisco phones need some adaptations.

Oh I misunderstood your question. You want to know, if the system ist in use!

(John G) #3

Sorry, I should have clarified. I figured it was more of an issue with configuring the right hint for any phone as opposed to phone-specific. I am using Yealink phones.

(Reinhard Stindl) #4

I dont know if this is possible. You want the Asterisk-info/Channels stuff on a blf-button on your phone? e.g. red=active calls

(John G) #5

Yes. Basically, I’d want one of these two things:

  1. A BLF to indicate if ANY extension is in use. Basically, if you go to the Asterisk Info page in the GUI, it gives a Channel Count to tell if anything is in use. If these are all 0, I’d want green. If anything is 1, then red.

or, if I can’t have that, then I’d be ok with:

  1. A BLF to indicate if any trunk is in use – so I could tell if there was an inbound or outbound call in progress.

I use Twilio’s Elastic SIP for my trunks.

(Lorne Gaetz) #6

You can define a hint to monitor multiple devices, but that will need to be constantly updated whenever you create new extensions. Unless you need instantaneous notifications, I think the best way to do this is to create a script that monitors channels and sets a hint as needed, then cron the script.

(John G) #7

Got ya.

Can I monitor trunks easily? I just have two trunks – could I make a hunt to monitor those and use that for the BLF?

(Reinhard Stindl) #8

How many extensions does your phone system have? How many blf-buttons does your phone have? It would be much easier, if you create a blf-button for every extension…if possible.

(John G) #9

That won’t work. The real issue is that I am attempting to monitor multiple FreePBX systems and just want to know if anyone is using an extension on that system.

Right now, I have one phone that I have as an extension on each of those systems. There are 8 FreePBX installations total. Each has their own normal extensions and trunks – they are completely separate systems. But, on my “monitoring phone”, I have 8 accounts – each with one extension on each system. I then have multiple “sidecar” extensions – which list a bunch of the BLFs for the extensions on each system. So, I’m kinda doing what you are talking about now. The problem is – it has gotten a bit crazy. I have 3 sidecars each with 20 BLFs – and I’m running out of spots. :slight_smile:

My thought was that if I could do a BLF that tells me if any extension is in use, then I could compact this all down to a single sidecar that just tells me if anyone is currently using any extension on one of those systems. (Or, if I can’t get that, then just tell me if anyone is on an outside call if any trunk is in use.)

(John G) #10

I tested this with an edit to extensions_override_freepbx.conf and it appears to be working – but I agree it is a pain to have to update every time I add extensions.

What if I just wanted to monitor outside calls (in or out) – basically, if a trunk was in use? Is there something I can do to monitor the trucks by defining a hint for them? Are they something that you can do a hint for? I tried just doing PJSIP/Trunk-Name since that is how they show up in the Channel list, but that did not appear to work for creating a hint.

EDIT: I take that back! PJSIP/Trunk-Name actually appears to work. I need to do more testing to make sure, but it appears to be valid.

(John G) #11

So, I confirmed that this appears to work to monitor PJSIP trunks by name. I edited “extensions_override_freepbx.conf” like the following:

exten=> 998,hint,PJSIP/Twilio-US1&PJSIP/Twilio-US2

I have 998 as a virtual extension. Twilio-US1 and Twilio-US2 are my two trunks. I can then set a BLF to monitor x998 and it does as I want in that it tells me if either of those trunks is in use at all.

Granted, this doesn’t tell me if two extensions are talking just to each other – or if someone is accessing their voicemail – but I can live with that. I mainly just wanted to know if an outside call was in-progress or not and this seems to do it.

(Itzik) #12

I believe the recommended place to add these custom stuff is in extensions_custom.conf
In the override file you’d put stuff that needs to override the FreePBX dialplan.