So I have a call queue flow in our app, on incoming call the caller is put in queue based on the verb and then I call to a group of users who needs to get this call using the Twilio REST api for creating calls.Once a user answers the call the Twiml that is returned from the url attribute on the call request returns and he is connected to the first one in queue.
Because of the CPS limit I need to make sure the order in which I'm making the calls is optimal because the ones who I call last will have delay.The first thing I realized I can do is to just shuffle the array of the users im calling to so statistically the chance of someone who already is on a call to get the call will be lower and this will reduce the chance of the account to feel that delay.
the second thing I want to do is to give priority to the ones who are not in a call, is there a best practice of achieving this? is the Twilio task router can help me with that?
tried to read task router documentation but not sure how this can help me, felt like using it will make the implementation much more complicated.