What would be the best way to “sync” the BLF states for 2 extensions?
The end-user is using a “standard” PJSIP extension, registered on an IP Phone… and another extension used as a WebRTC extension. If the user is in-call/ringing/busy/… on one extension, the other one should have the same BLF state. (1 user → 1 BLF state other users can see)
This is easier to describe in Asterisk terminology, so I suspect it may require custom dialplan, although I haven’t researched the GUI enough to be certain of that, and my expertise is mainly on on raw Asterisk.
Asterisk would use the term device for what you called extension, and extension for the common phone number that accesses all the devices, see: Extension States
The code that combines device states is here:
so if anyone is ringing, you will get RINGINUSE or RINGING, otherwise the, from lowest to highest, the priority is hold, in use, busy.
What gets sent to the phone for RINGINUSE seems to be configurable.
My experience is with Asterisk, and the references I’ve given tell you how to create a hint for an Asterisk extension corresponding to multiple Asterisk devices.
How you get the phone to reflect that Asterisk extension state depends on the phone, although FreePBX endpoint manager may know about that, but I don’t have the knowledge of endpoint manager or your phones, to answer.
I’d be pretty sure that creating the hint extension will involve custom dialplan, either as a distinct extension, in which case the Asterisk documentation says what is required, or by hijacking and overriding the hints on one of the FreePBX extensions, which I’m not competent to consider.
Follow the example provided by FreePBX. If you check the extensions_additional.conf file for an extension hint, like this example for extension 7004, it looks like this:
The content of extensions_custom.conf will supersede that of extensions_additional.conf context from-internal-custom supersedes that of ext-local, so any future changes that fpbx makes to that one line in extensions_additional.conf will be ignored.
Are you a 100% about this? Because Asterisk is first to load into memory wins. This is why the extensions_override_freepbx.conf context is loaded before extensions_additonal.conf so if I put ext-local in extensions_override_freepbx.conf it will override the ext-local in extensions_additonal.conf.
; WARNING ABOUT: #include extensions_override_freepbx.conf
;
; This include file is put first to allow the auto-generated dialplan in FreePBX
; to be overwritten if necessary. Overriding auto-generated dialplan should be done
; with extreme caution. In almost all cases any custom dialplan SHOULD be put in
; extensions_custom.conf which will not hurt a FreePBX generated dialplan. In some
; very rare and custom situations users may have a need to override what FreePBX
; automatically generates. If so anything in this file will do that. If you come up
; with situations where you need to modify the existing dialplan or macros, put it
; here.
; #include extensions_override_freepbx.conf #include extensions_additional.conf #include extensions_custom.conf
Because I tested this. Add a hint after the main hint is loaded (ie putting it in _custom which loads after) ends up with this: (note this is my own dialplan but the concept is the same)
[2022-10-24 12:57:27.441] WARNING[25223]: pbx.c:7156 add_priority: Unable to register extension ‘2112’ priority -1 in ‘blazestudios-local’, already in use
[2022-10-24 12:57:27.441] WARNING[25223]: pbx_config.c:1891 pbx_load_config: Unable to register extension at line 464 of /etc/asterisk/blazestudios_dialplan.conf
Concept is the same, here are the two hints with the original being loaded first:
You will note that it is the first loaded so using extensions_custom.conf is not where you would override the existing generated FreePBX dialplan. You need to put this is extensions_override_freepbx.conf
Is it possible to also sync answered and missed calls between webrtc & udp extension.
I’m facing similar problem as dotcom. I’ve described it here:
Right now when I answer the call on my hardware phone then the webrtc phone gets missed call notification. I would like to have it as answered elsewhere. Is it possible?