PhoneMyBot allows chatbots to interact with voice calls and the telephone interface. One way of doing this is via specialized methods in the Conversation API, but if a chatbot is integrated via an Adaptor, it does not use the Conversation API. So, to allow control over call and voice actions when the chatbot is integrated via Adaptor, Interactive Media is implementing a specialized markup language that lets chatbots insert instructions about certain call actions into the text they send.
One crucial feature of PhoneMyBot is to transfer calls to another number. This could be for instance an agent queue in the Contact Center, for when the chatbot cannot resolve the interaction on its own.
PhoneMyBot provides 3 ways to transfer the call: one for bots using the Conversation API, one using a regular expression, and then there is CCML.
The command to transfer a call is the following:
<transfer referto=”{[telephone number]}”, timeoutms={[maximum time to wait for an answer in milliseconds]} />
Where "referto" tells PhoneMyBot where to refer the call (using the REFER SIP method), and "timeoutms" is the time PhoneMyBot waits before abandoning the transfer while waiting for the call to connect.
As an example, the chatbot could send this:
"Please hold on, we are transferring you to a human agent who can help you <transfer referto="4582341515", timeoutms="20000"/>
"
PhoneMyBot speaks the sentence to the user and transfers the call to 4582341515, waiting a maximum of 20 seconds for the new call to connect.
If the transfer fails the original call is lost, since PhoneMyBot only supports unsupervised transfer for the moment.
PhoneMyBot may use an error code from the chatbot API (if supported) or if configured, PhoneMyBot may also send back to the chatbot a sentence that describes the failure and that the chatbot may use as an error indication. See the telephony page for details.
A chatbot sends the <hangup/> command to terminate the call with the user.
For instance, a chatbot may terminate the call with the user sending a message like this:
"It was a pleasure to talk with you, please call again if you need any further assistance <hangup/>
"
PhoneMyBot speaks the sentence and then terminates the call.
The <prompt> tag can be used to gain more control on the voice message played to the user. It supports barge-in control, that is, the ability to tell PhoneMyBot if it should stop speaking when the user starts saying something. If this happens, the message is interrupted when barge-in control is set to true
, but continues to the end when barge-in control is set to false
,
In the following example the message sent from the bot requires the activation of barge-in:
"<prompt bargein="true" > Thank you for calling us, this is the financial advisory service of the XY bank, we'll be pleased to help you for any financial concern. How can I help you? </prompt>
"
The <prompt> tag can also be used with the indication if the sentence can be repeated. To do this, use the syntax "<prompt repeatable = true> [your prompt] </prompt>
".
At this point, if there is a configured sentence by which PhoneMyBot asks the user whether they want the prompt to be repeated, PhoneMyBot appends the sentence to the prompt and manages on its own the answer from the user.
If instead there is a number of sentences in the configuration that the user can say to ask for the prompt to be repeated, PhoneMyBot listens for them.
Both these features can be configured from the Portal, see here for how to configure the repeatability of prompts from your chatbot, and here to see how to tell PhoneMyBot that a certain prompt may be repeated.
PhoneMyBot can often be more precise in speech-to-text operation when the chatbot provides a context helping identifying the expected answer.
The context can be specified with a name, which identifies the need to recognize fields with a specific format and syntax, as a telephone number, a date, a fiscal code, etc. Please be sure to use the name of a context type already supported by PhoneMyBot for the language in use. The list of context names is growing constantly. The latest list is here. If you don't find your specific context in the list, please contact us with the information about the field you need and we'll add it in.
The following is an example of a message from a bot indicating that the context requires the recognition of a date:
"<context name="date" > When will you be available for your first appointment? </context>
"
This tells PhoneMyBot that the user will likely say a date in the next utterance, so PhoneMyBot can optimize the speech-to-text engine to recognize a date (as opposed to a generic sentence), thus increasing the recognition performance.