I am trying to build an API which can Onhold both inbound and outbound calls, what I basically do is, update the CallResource and forward it to a Play command when I want to hold on and connect to the agent if I want to resume the call.
This works good, I am able to hold on/ resume call successfully.
I have seen some questions and answers regarding this, Twilio support suggests to use Conference option for that, isn't there may be a new solution (or other solution) for this.
What I want is actually merge child call recordings, isn't there an option for this?
Thanks.
Twilio developer evangelist here.
There is no way to concatenate call recordings within Twilio, what I would recommend is to download the files and concatenate them with something like ffmpeg. You should be able to script this too.
Related
I am trying to do a simple flow with twiml.
example
when the user press 1
play some text
if press 2
play other some text
the problem is that i can not find the way without using the uri action and exposing a new url to only retrieve a say with the speach.
Is it any other way to do something link that without using urls and new endpoints???
It is much easier to do the above using Twilio Studio, give it a go, it is all Serverless and elastic.
Twilio Studio
I made a simple chatbot using the studio template and it works fine. However, it then loops after the last response. So let's say I give the user 2 choices, Y and N. After they say Y they get a response but if they message the bot again they get the initial message once again to loop the process. How do I stop this? In the docs I only found info on how to stop all incoming messages but this isn't what I want. I just want to end the convo for good as in my application it has a one time use intention. Thanks.
Twilio developer evangelist here.
There's not really a way to stop incoming texts. What you want to do in this case is stop responding to an incoming text after the initial flow through.
The way to do this would be to use Twilio Functions and function widgets to store the numbers that have successfully completed the questions (you could use any database for this, if you want to keep it within Twilio then Twilio Sync can help here). Then you can insert a function widget at the start of the flow that retrieves whether the number messaging has completed the questions and combine with a split widget to decide whether to send the first message or just complete the flow.
Let me know if that helps at all.
I am using twilio for automated outbound call. I am trying to play an audio file and simultaneously gather input from user. And when user gives input stop that audio file and gather action must be called.
What I have done is :
gather = Gather(input='speech dtmf',speechTimeout=2,numDigits=1, action="gatherResponse/{}".format(call_id), method='POST')
response.play("https://any_audio_url.mp3")
response.append(gather)
This code just plays the audio file, gather action is not called.
Twilio developer evangelist here.
I would nest the <Play> within the <Gather> to achieve what you describe. Try your code this way around (note, I'm using gather.play):
gather = Gather(input='speech dtmf',speechTimeout=2,numDigits=1, action="gatherResponse/{}".format(call_id), method='POST')
gather.play("https://any_audio_url.mp3")
response.append(gather)
Check the examples in the documentation for more detail.
Having trouble in creating conference. i need to achieve where when the agent is having conversation with a client the agent can add another person in the room. I research some documentation but it's just transferring the caller to the conference and the conference creator is not in the conference.
Twilio developer evangelist here.
The best thing to look at will be this blog post on warm transfers using Twilio. It is in Python, but the theory is the same.
The basic idea is that you get the first two people into a <Conference> first. Then you can make a new call to the third person you want to bring in and drop them into the same conference which adds them to the call.
Let me know if that helps at all.
I was trying to implement voice call using Twilio API(Using node twilio wrapper) in which it would require to retry x number of times if call not answered. It seems that if i ignore call from Twilio, it keeps trying automatically. So, is there any way i can set the retying limit to particular number of times?
Thanks in advance.
Twilio evangelist here.
As far as I know we do not have any auto-retry behavior built into Twilio, so its odd that you are seeing this behavior. I'd suggest sending an email over to help [at] twilio.com with some example CallSids. Our awesome support team can work directly with you to help figure out whats going on.
Hope that helps.