Solved Force Out of Office Hours Dial Code Reverts at Midnight

Status
Not open for further replies.

aaronl

Platinum Partner
Advanced Certified
Joined
May 20, 2021
Messages
22
Reaction score
4
Hi All,

I have a client, on v20, that only wants to use custom dial codes on their Yealink T54W desk phone, to set the system in and out of office hours. Under Integrations -> Call Scripts I've created them using Store Templates provided. The client is using the dial code around 5 - 6pm every night and it starts working and routing the calls to the "When office is closed route", but any call after midnight routes to the "in office hours route", even before the in office hours dial code is used.

It's a small company, so there is only one Department. When they were on v18 they only used these dial codes so there were no Office Hours setup, which reverts the routing at midnight. I have also tested by setting the office hours to whole day (12:00 AM - 12:00 AM), but this also reverts at midnight.

Is this a bug or am I missing something? Any thoughts or advice on how I can get this working would be great.
 
Hi @aaronl

This is not a bug, its just that this is an example script which you can edit to your liking if you know what you are doing with C# code.
What you can do in your case is the following:
At line 26 of the script, you can see this: x.OverrideExpiresAt = (groupCurrentTime+TimeSpan.FromDays(1)).Date;
You can edit this line by removing the .Date at the end which will make it so that the override is for 1 Day (24 hours) from now.
Also, you can change the number of days that this applies by changing the number in the brackets.

So for example if the line is changed as below, it will set the office hours for 3 days from now:
x.OverrideExpiresAt = (groupCurrentTime+TimeSpan.FromDays(3));
 
Hi @AndreasPo_3CX
Thanks for that information. That was definitely a gap in my knowledge base. I can confirm that this has fixed my problem.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,973
Messages
590,074
Members
164,893
Latest member
jbergeon