Twilio Use Case - twilio

I am considering using Twillio as an extension in an existing application.
My use-case is this:
User clicks button in application
Using Twilio API, the application calls the user.
The user answers their phone
Twilio connects user to some phone number. (fetched from db)
It's a bit strange, but it is exactly my customer's request. Before I spend too much time in the rabbit hole, I thought I would ask the community, can I do this with Twilio APIs?

Twilio developer here!
This is definitely a common use case for Twilio. In fact, it's so common that we wrote up an in-depth tutorial showing you how to build an app like the one you described.
We've got it in PHP, Node, Python, and Ruby - here's the PHP version:
https://www.twilio.com/docs/howto/walkthrough/click-to-call/php/laravel
If you prefer to just reference the code, you can find it on GitHub too: https://github.com/TwilioDevEd/clicktocall-laravel

Yes. That's actually very simple in Twilio:
https://www.twilio.com/docs/api/rest/making-calls

Related

Using Services to create a Speech to Text Function with Vosk?

wanted to get some additional opinions on a project.
I'm attempting to create a system which will gather the dialog from a call commenced by Twilio Studio and transcribe it. I then intend to push the now transcribed dialog to my CRM.
I found a helpful article on speech to text with the use of Vosk; https://www.twilio.com/blog/transcribe-phone-calls-text-real-time-twilio-vosk - however, I think the article assumes that this will be done with the use of an external application. So, my question is; could this be possibly developed with the use of Twilio Services and leveraged within Studio?
If not, I could develop a web app to connect everything together, but would rather everything be housed within Twilio as I'm a novice developer and developing this app externally sounds like a rather over complex solution to this project.
Thanks in advance for your feedback!
Nothing attempted yet, still in the early research stage of this project.
As of now, Twilio does not offer its own Speech-to-Text engine. However, you can use media streams to forward the audio track to any engine out there on the internet.
This blog post uses Google's engine, for example.
The advantage of such a hosted service is that you neither need to worry about the model nor manage the server. If you want to do 100% serverless, then you could run the entire thing on Twilio Serverless.

Portability check with Twilio

I am trying to determine if a number is portable to the Twilio platform.
Other providers have portability/eligibility APIs that I can use for this purpose, but I can't seem to find anything equivalent for Twilio.
Am I missing something? How can I check if a number is portable to Twilio?
Twilio doesn't offer an API or page where users can check this currently (although this is under investigation). The best approach today is opening a support ticket with the porting team to verify portability.

Integrating rasa bot with twilio voice

I am trying to build a telephony voicebot using Rasa,Iā€™m just getting started with Rasa, and wondering whether it is possible to integrate rasa bot with twilio voice ,sms is working fine on Programmable SMS .Can anyone please help me how to do this?
We have used 2 different ways to achieve this. As this is for my company, I do not have the right to publish any source code, but this should help you find the way:
1-via Twilio studio, you can just use a block to call a Twilio function and there use "got" npm module (to be addded in Twilio function management tab) to launch a rest API call to you RASA NLU server (or RASA core if you need more than just NLU) and get back the intent(+other info if you want).
2-if you have the possibility to host a backend server (a "middelman"), then you can follow the tutorial at Twilio and expose 4 routes for call controle. In your backend, you will recuperate the utterance(speech) of the gather() function and you can make an API call to your RASA server with it as argument. The backend should contain the logic to react on the intent detected by RASA.
Example (for both solutions) : detected intent is "talk to a manager", then the Twilio command should be a transfer of the call to number xxx. If the detected intent is "talk to accounting department", then you should transfer to number yyy. (jut an example but you see the point).
Twilio has a good tutorial to start with (and a github repo you can clone) .
You can start by having a look at https://www.twilio.com/docs/voice/tutorials/how-to-respond-to-incoming-phone-calls-node-js (sorry I link everyting to nodeJS without knowing what you use, but some other languages are also available).
For me solution 1 is faster and allowed us to start quickly.
Solution 2 is more professional because :
-it gives you more controle (possibility to integrate with DB server, action server, CRM, ...)
-make security people happy by hosting business data inside your own infra (instead of Twilio studio and/or Twilio function.
For info : Twilio has a SOC compliance report - a banking-level security program / if you really need to (and you are ready to pay for it)
-it makes you free and you can replace Twilio, RASA or both when you want.
Nb : Twilio does not really help you a lot in the tutorials as they have their own fully integrated solution (Twilio Autopilot) to integrate NLU and voice call.

Can Twitter's Streaming API be safely deployed client side?

I'm trying to develop an open source solution which will be deployed on Raspberry Pi's or similar SBCs. The RPi part is only relevant insofar as it means all the code and app resources need to be publicly available.
The solution needs to read Twitter statuses, as close to real time as possible, and with as little interference from third parties as possible. I found Twitter's Streaming API, which is blazingly fast, and would be perfect for my application ā€“ except it requires OAuth. And as far as I can tell, the OAuth mechanism isn't well suited for deployment on users' machines, since it relies on a secret key which belongs to the application owner (the consumer secret).
I couldn't find any easy way around this ā€“ the only solutions I could think of are either handling request signing on a central server, or asking each user to create their own Twitter app account. And I find both solutions terribly distasteful.
Do you see any elegant way out?
It turns out this is indeed not currently feasible cleanly with any of Twitter's public APIs; not now, and not in the foreseeable future. Refreshingly, for once we do have proof for a negative: I also asked this on Twitter's own forum, and I was lucky enough to have my question kindly answered by Andy Piper, Global Lead Developer Advocate at Twitter. There you go.
Your app can open a web browser with Twitter's application authentication webpage loaded. When the user enters their credentials Twitter will return a code which they can copy/paste into your app. It's not particularly elegant. Here is a Python example of the workflow: https://github.com/geduldig/TwitterAPI/blob/master/examples/oauth_test.py

What to consider first when designing a meta-search engine using Erlang, Mnesia and Yaws?

Can someone explain to me what to consider first when designing a meta-search engine using Erlang, Mnesia and the Yaws web server? This engine should have SMS capability but I am still wondering how I am going to incorporate this feature...
The meta search engine, you need REST or Ajax APIs from Google, Yahoo and Bing. Below am providing you with examples which you may use within your back end HTTP capable Library or your front end JavaScript. I personally use mochiweb and yaws Appmods.
For example: Google has an Ajax search API which works like this:
http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=computers
Hitting that URL will give you a JSON Object which contains several search responses. In this case, the search term is "computers"
Yahoo has what it calls Boss APIs. An example of Yahoo Rest search API using Boss is here below:
For an XML result:
http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=xml&start=1&count=3
For a Json result:
http://boss.yahooapis.com/ysearch/web/v1/animals?appid=APPID&format=json&start=1&count=3
Analyse the whole HTTP GET query very well, you notice something they call an APPID. This you will get when you register with them here. I cannot give to you my APPID, you will have to get yours,then paste it in there and you will be good to go. Yahoo has something more powerful called
YQL. In the above query, the search term is: "animals"
Bing as well has got an API for you, but you will need an APPID:
http://api.bing.net/json.aspx?AppId=APPID&Query=love&Sources=Web&Version=2.0&Market=en-us&Web.Count=10
Above, the search term is: "love"
About the Meta Search Engine
You have a web page, people enter search queries in this page. You use your javaScript (JSONP). JSONP could be implemented in any one of your favorite JavaScript Framework you use e.g.
JQUERY,Ext JS,Dojo, Prototype e.t.c
Then you would have to parse the XML or JSON response from the three sources (Google, Yahoo and Bing),and make an appropriate display for your users to navigate the results.
About the SMS part
SMS capability is attained using SMS Gateway. There are several open and close source SMS Gateways. the most powerful of them all is the one built in Erlang/OTP technology called: OSERL, but to test it, you need direct connection with an SMSC in anyone of your local service provider.You need a Port on their SMSC, a user name and a password.There is another one which is better for development reasons called: NowSMS because it has capabilities for USSD, Modem Internet Communication, SMSC service connectivity, HTTP 1.1 and HTTP 1.0, configuration of two-way SMS messaging e.t.c from a Web App to-and -from the SMS Gateway. Go to their site, grab the trial version, follow the documentation and then configure two-way from your web app to the gateway and vice versa. Since NowSMS is not free, you can try: Kannel, it is open source but you will need help from the community to set it up on your Unix or Linux box.
More on incorporating SMS capability in Web Applications can be found:
Here
I also asked once a Question related to development of a powerful search engine using Erlang, Mnesia & YAWS webserver on Stackoverflow. I got plenty of good answers and responses.
Please CLICK ME!
Hope this may help. As I am not sure about SMS thing.

Resources