How I Resolved Extra Points - mlarizzate/callcenter GitHub Wiki

what happens with a call when there are more than 10 concurrent calls.

For this point, I used a ThreadPoolExecutor for the Customer Calls Threads. This implementation avoids to know how many pool threads are working with the method getActiveCount(). With this method I only needed to check if there is a free thread. If not free thread found, the call is rejected.

What happens with a call when not There is no free employee.

For this point I Used an IVR (Interactive Voice Response) to put each call in OnHold time. I works like a Bot Agent. If the Dispatcher Class doesn't found an Available Agent, it resolves to look for a free IVR and holds the call. There the Application could reproduce music or whatever the client needs.

Application.properties configurat for OnHold Service:

  • max.holded.times: Max times that a customer could be holded by and OnHoldIVR

  • onhold.ivrs: Each IVR takes a Call Thread, the app avoids to configure the needes quantity of IVRs.

  • onhold.ivr.time: Time that a Customer is waiting on hold. In Seconds.

Note: The application validates that onhold.ivrs cant be greater than max.calls