Help needed with Call Routing Script

Salvo18

Forum User
Basic Certified
Joined
Oct 5, 2021
Messages
6
Reaction score
0
Hi,
I need assistance with a C# call script for 3CX v20. The script should check if the PBX is currently in holiday mode.

If the PBX is in holiday mode:
The script should play the holiday prompt (if it is set) and then redirect the incoming call to the voicemail of extension 200.

If the PBX is not in holiday mode:
The script should allow the call to continue with the normal routing as configured in the Call Queue, Call Groups, etc.
Can anyone provide a script or guide me in the right direction for this functionality?

Thanks in advance for your help!
 
Hi,
I need assistance with a C# call script for 3CX v20. The script should check if the PBX is currently in holiday mode.
Since 3CX v20, this function is no longer available. A 3CX can no longer be in the holiday status, only departments. So you can only check for each department whether a holiday applies to it.

How this is currently set up with the holiday.cs script is described here:
https://www.3cx.com/blog/call-flow-scripts/holiday-prompt/

Note: the name of the holiday you set up and the name of the announcement file do not have to match, as stated in the old instructions.
 
If the PBX is in holiday mode:
... and then redirect the incoming call to the voicemail of extension 200.
The current original 3CX holiday.cs script will not do this. After the announcement has been played, the call will continue as before. This means that the forwarding to voicemail must be done in the settings of a department, a ring group or a queue, for example, or you must adapt the holiday.cs yourself accordingly.
 
  • Like
Reactions: Salvo18
The current original 3CX holiday.cs script will not do this. After the announcement has been played, the call will continue as before. This means that the forwarding to voicemail must be done in the settings of a department, a ring group or a queue, for example, or you must adapt the holiday.cs yourself accordingly.
hi,
yes that's exactly the point but I can't find any function in c# around that allows me to forward to voicemail... I just need the function and then I'll insert it into the script... but I can't find anything about it
 
but I can't find any function in c# around that allows me to forward to voicemail
In the CFD within the Transfer module, there is a direct option to forward to the mailbox.

Forwarding to the mailbox in other programs or call scripts is done by prefixing the dialing code for the mailbox, which is usually *4, to the number to be called.

Since this dialing code can be changed in 3CX, it is recommended to check it beforehand. This is the 3CX global parameter VMAIL.
 
In the CFD within the Transfer module, there is a direct option to forward to the mailbox.

Forwarding to the mailbox in other programs or call scripts is done by prefixing the dialing code for the mailbox, which is usually *4, to the number to be called.

Since this dialing code can be changed in 3CX, it is recommended to check it beforehand. This is the 3CX global parameter VMAIL.
yes, I had seen the transfer module on CFD with the voicemail option. But unfortunately the cfd is not able to automatically recognize a vacation or even take and play the audio selected in the vacation.
I have to put the user in the condition of independently setting the vacation and audio and then having the call end up in the voicemail of an extension that I write in the script.
I cannot bind the user to having to change the times every time even in the script... Unfortunately my only way is to perform the transfer via C# code and it is the only compilation error that I have... I cannot find any function to call for the transfer...
 
It seems to me that we are increasingly talking past each other, also because the task of your first request seems to have changed.

Once again: if the call comes from outside and the original 3CX holiday.cs is connected correctly, then on a public holiday of the call destination the holiday announcement is played before the call is forwarded.

If the call is then to go to a mailbox on a holiday, then it would make sense to always forward the call destination to a department (with the holiday definition) and set it there: forwarding to abc during normal times, forwarding to mailbox def on holidays.

Otherwise please describe what you cannot implement with the 3CX holiday.cs and where you want to introduce a CFD program or another call script.
 

Latest Posts

Forum statistics

Threads
111,884
Messages
589,542
Members
164,741
Latest member
Carsonix