Hello. Need help setting up the incoming FreeBPX route.
The call diagram is attached.
When calling number 123321, the call goes to my FreePBX and is redirected to a voice-robot. The voice robot either answers the caller’s questions or redirects to the queue of my FreeBPX. This is a standard work situation.
If the voice-robot is disabled, the call should be redirected to a queue.
It is not possible specify multiple destinations for an incoming route. It turns out that if the voice robot trunk is disconnected, the call will not reach the queue.
What I tried to do:
Initially, the operators were located on FreePBX, and the main work took place on another Asterisk server, where it was written in code like:
exten => 123321, GotoIf($[["${DEVICE_STATE(SIP/robot)}" != "UNAVAILABLE"]?robot1,1:queue,1)
exten => robot1,1,Dial(SIP/robot1/${EXTEN},120,mt)
same => n,ExecIf($[${DIALSTATUS}=BUSY]?queue,1)
exten => queue,1,Dial(SIP/queue/1221)
On FreeBPX I tried to do this using Custom Destination, but the call did not go through. I probably did something wrong, because the FreeBPX dialplan is quite tricky.
Also I tried setting a number for the robot in Misc Applications, and adding it and the operator numbers to ring group, but then the robot always becomes unavailable and the call is redirected to the operators in any case.
What other ways are there to organize routes?