CFD Script to call external mobile when unregistered

Status
Not open for further replies.

m151-a1

Gold Partner
Advanced Certified
Joined
Oct 23, 2020
Messages
19
Reaction score
1
Hey guys,

I'm looking for an idea on how to achieve the following:

The system is self-hosted in Amazon and the SIP Trunk always reachable. But what when the SBC/Deskphones are off / or the site has an outage? Is it possible to route the calls via Script to an external Mobile? Because the call will always go to the PBX and answers with the Voicemail for this extension i.e. Receptionist. But for specific cases, we need to have those calls diverted to a Mobile Number for Emergency purposes. Can this be scripted? Note: I have a failover SIP Trunk which works but as mentioned above, the SIP trunk is always online as it is self-hosted.
I have seen sample scripts and the variable return PhoneSystem.Root.GetDNByNumber(extensionNumber).IsRegistered; but they don't seem to work or I do not get a result using my own CFD script. I also tried https://www.3cx.com/docs/cfd-creating-outbound-dialer/ but I can't get this to work either. Maybe it changed for V20?

Does anyone has an idea?
 
Simply use the forwarding rule to properly route to mobile after X seconds. No need for CFD for this.
 
Thanks, but that doesn't work as it says Busy or Unregistered in the forwarding rule. I don't want to forward when the user is busy (on a call) - cause that's not an outage as such. Only when unregistered.
 
Thanks, but that doesn't work as it says Busy or Unregistered in the forwarding rule. I don't want to forward when the user is busy (on a call) - cause that's not an outage as such. Only when unregistered.
Enable "accept multiple calls" to avoid the "busy" scenario.
 
None of this matters in your scenario where there is a SIP trunk outage, or your PBX is down (upgrading perhaps), or your internet is down. Don't forget that you can also typically configure your SIP provider to forward calls to a mobile number when they cannot communicate with the 3CX server.
 
  • Like
Reactions: Evolute IT
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,843
Messages
589,326
Members
164,679
Latest member
SamadMYK