Programmatically start a call with IBM Voice Gateway - twilio

I have connected a IBM Voice Agent (https://console.bluemix.net/docs/services/voice-agent/getting-started.html) with a Watson Assistant and a Twilio number.
I am able to call my Twilio number and follow a conversation with the assistant.
Now however, I don't want the user to call the number, but rather I want to programmatically trigger the call. Call some API to force the assistant to call some number. Ideally passing some context with it...
I know that Voice Agent uses Voice Gateway behind the scenes (https://www.ibm.com/support/knowledgecenter/en/SS4U29/welcome_voicegateway.html).
Update:
I was able to trigger a call by via Twilio. I ask Twilio to act as an intermediate. Twilio will call both my number and the SIP (Voice Agent) and bridge the call. However I am unable to pass any initial parameters to Watson Assistant since I don't control the process...

As mentioned above, IBM Voice Agent with Watson now allows end users to configure a custom header to extract from inbound SIP INVITE messages. Go to the "Advanced" section under "Edit Voice Agent" to configure it.

Related

Triggering text-to-speech Teams outbound call via Microsoft PowerAutomate

I have a dynamically created text which I need to be "translated" into speech (via Azure Cognitive service or a different one, whatever works) and a specific number being called. If someone picks up, they should confirm by pressing # or whatever, if they do not pick up or voicemail is on, the call should end and a different phone number should be called.
I want to build all this via a Microsoft PowerAutomate flow.
Is this possible with PowerAutomate and Teams or do I need external tools such as Twilio?
The out of the box Teams connector does not seem to allow automated outbound calls: https://learn.microsoft.com/en-us/connectors/teams/#actions
I also checked the Twilio connector in PowerAutomate and it only supports sending SMS: https://learn.microsoft.com/en-us/connectors/twilio/#actions

How to check status of a Twilio client before connecting call

I am using Twilio client to call my customer or receive the call from customers.
I want to play a busy voice message to customer if the Twilio client is engaged and talking to any other customer. how can I achieve that.
Twilio developer evangelist here.
You can’t tell the status of a Twilio Client from outside the page it is live on. Instead it is best to manage the availability of your agents via TaskRouter. With TaskRouter incoming calls can be queued until there is an available agent to answer. Those calls can also timeout, be assigned to other queues or be redirected to leave messages as in a voicemail system.
I recommend you look into TaskRouter.

Is it possible to use Copilot sticky sender with a Flow

I would like to use a flow created in Studio with some Copilot features like Scaler and Sticky sender.
I've a flow created already using Studio, as well as few numbers added to a messaging service, Sticky sender and Scaler are enabled on this service.
I would like to use this messaging service with the created flow, so i don't have to worry about balancing the usage of those assigned phone numbers myself.
When I configure a number I can only assign a messaging service (which i prefer) or a work flow, but not both at the same time. Although it would make sense if I can assign the flow to a messaging service.
Looking at Twilio Client for C#, i see that ExecutionResource.CreateAsync takes a from phone number as required parameter, so it doesn't seem like this is a possible options to have a flow linked to a messaging service.
I'm wondering if there is any workarounds, like having a function maybe to pass a phone number from the messaging service to the flow? or any other way?
Malek, you can also set the From to a messaging service using the From.
Executions
from:
"The Twilio phone number to send messages or initiate calls from during the Flow Execution, available as variable {{flow.channel.address}}"
Should have the added sentence: "You can also use a Messaging Service SID."
Twilio developer evangelist here.
What you want to do in this instance is to configure the number with a messaging service, then set the messaging service Inbound request URL to the flow's REST API trigger URL, which should look a bit like:
https://webhooks.twilio.com/v1/Accounts/<account_sid>/Flows/<flow_sid>

undefined:undefined Twilio Studio Flow SMS Forwarding Function Error

I've been attempting to create a two-way conversation using SMS forwarding in Twilio Studio flow. I know there are multiple ways to set up SMS forwarding in Twilio, and I have been successful in doing so using functions on their own, TwiML and Studio Flow SMS on the send message widget. However, I am struggling with creating a flow that extends beyond one message. I've added the function for SMS forwarding into my flow, but every time a response is received it displays as "undefined:undefined" as opposed to "+15555555555:Hello SMS", Am i missing something?
You might want to use the CHAT product from Twilio instead which would manage all of the sessions, conversations and everything else.

Twilio studio connect call to SIP

I'm trying to setup a simple flow using Twilio studio, with the last widget being "Connect call to".
I want to have a caller connected to an agent with a SIP client, registered with the SIP domain in Twilio. The SIP client that's registered to the SIP domain is nothing but a Bria SIP client iOS app that has successfully registered with the SIP domain.
When I type in twilio's SIP domain details as the end point along with the username and password, the flow gets published fine.
When I test the flow by calling the number that triggers the flow, I do get the options as per the flow. I then press certain keys that triggers the "Connect call to" widget in question. At this point, call ends without connecting to the SIP client. I also see this error event, 32009 - The user you tried to dial is not registered with the corresponding SIP Domain.
Am confused. I tried looking into the documentation on Twilio but no luck.
Did you use the below format, making sure to include the us1 subdomain?
USERNAME#SIPDOMAIN.sip.us1.twilio.com

Resources