twilio-labs / plugin-queued-callbacks-and-voicemail

MIT License
11 stars 14 forks source link

callback to different number fails. #38

Open vjaganathan-twilio opened 3 years ago

vjaganathan-twilio commented 3 years ago

Test procedure: Tool: Monkey Phone-tester

  1. Call to your Flex Phone Number
  2. Go to voicemail, select for Callback option from the main menu choose Option #2 for entering number manually (as per https://github.com/twilio-labs/plugin-queued-callbacks-and-voicemail/blob/main/serverless/functions/inqueue-callback.protected.js#L100)
  3. Enter alternate number code file : inqueue-callback.protected.js. Line: 100 message += 'Press 2 to be called at different number';

Result: In the Task attributes the call-back number is not a valid E-164 format ("+" sign in prefix is missing) So, when the agent tries to place a call it gives "Dialed number is invalid. Please check the number and try again."

Screenshot 2021-09-13 at 11 02 14

vernig commented 3 years ago

Thanks @vjaganathan-twilio for raising this. We saw that in testing, but the solution is not straightforward. The callback procedure doesn't do any validation of the input. Also, users rarely input their numbers in E.164 format (e.g. usually they don't even provide country code).

This to say that the solution is not straightforward and there are a lot of assumptions that needs to be made (e.g. if the country code is not provided, which country code is used: the one of the caller or the one of the called number?).

Let me see if we can at least improve the Flex plugin frontend to alert the agent about it, and give them the opportunity to change the number before dialling.

vjaganathan-twilio commented 3 years ago

@vernig Thanks for your quick response yes I understand, there will be few assumptions to be considered or we can validate the phone number, (for example (Irish number --->country code + 9 digits)). I do understand it vary country by country, but it would be very nice if it is new feature. Moreover, that would be great if the agent can edit the number before call.