how to make a call using SIP protocol or WebRTC technology in React-Native? - react-native

Considering the development of an application in React-Native or Flutter that allows the user to click a button and make a call (that goes through service like Twilio) and this redirects it by calling to another person.
I've been looking for examples with SIP or WebRTC integration but hasn't found a lot of guides so far.
is it possible to develop something like that?

Related

Flutter and DialogFlow Chatbot

I am trying to make a chatbot for my Flutter app using DialogFlow. At first I used the API V2, and I get this error :
I searched online, and the only answer I found is to switch to "flutter_dialogflow.dart" package instead of the "dialogflow_v2.dart" package everything seemed to work just fine at the first glance, but when I wrote "Hi how are you doing?" the flowing error appears:
P.S: Everything is activated on DialogFlow
Please help! Thank you
Flutter has many advantages so the Flutter apps implementation will be common. Integrating the Dialogflow on the flutter app will be more beneficial and helps to handle the end-user queries most effectively. There are two approaches to incorporating Dialogflow into your Flutter APP.
Create the middleware code and build your own chat UI
Using the REST API, the middleware code is responsible for transferring the message from the Flutter app to the Dialogflow agent and build UI components to send and receive the message. You will probably be really happy to only see text messages going back and forth when you get started. But finally, you may want to add rich answers, such as buttons, clickable hyperlinks, cards, and other rich answers like that. Dialogflow does not as it turns out, has any defaults on this front. Which is a tedious process
Integrate with the Third-party tools
Since Dialogflow does not support the UI to make the bot response, search the platform that will allow you to add the bot to your mobile application. And I recommend using Kommunicate
The Dialogflow bot can be directly integrated with kommunicate and positioned with Flutter by adding Kommunicate dependency pubspec.yaml and import as well as install the package, More detailed instruction can be found here. You can further customise the chat widget to match your APP colours and theme.
PS: I work for Kommunicate

RingCentral two way communication

I am building a React Native application for calling using RingCentral APIs.First of all I tried using the webphone RTC via web browser: https://github.com/ringcentral/ringcentral-web-phone. It works perfectly fine in web browsers. But the thing I need is to call via react-native application I am building.
I tried calling via RingCentral using 'ring out call' POST API and 'call control- make callout' post api(beta version).But the problem i am facing is when i integrate these apis to react-native applications : To have a two way communication I need to be online in the web phone .Then when i call from react native it goes to the web phone first.And then when I dial 'answer' it redirects to the number i want to call to.Then only I can have a two-way communication.
So, what do I do if I want to directly call via react-native application to the recipient directly?
P.s. If I am not online in the web phone from browser the call automatically goes to the voicemail.
So hard to understand your question from the title and the detailed description.
I guessed that you want to implement a functional phone using react native where you want to use the RingCentral WebRTC SDK to handle incoming and outgoing phone calls.
First of all, please mind the browser compatibility supported by the WebPhone SDK. Secondly, it is not trivial and I cannot support you on the react-native part. However, RingCentral provides an easy way to embed a RingCentral embeddable phone to any webpage and that app is an open source project. You can use the embeddable as such or clone the project and learn from the code or modify it to meet your requirements.
Click on the links above to find further information.

React-Native with Webhooks?

Is it possible to integrate React-Native with Webhooks?
Currently, I have a chatbot using React, Dialogflow and webhooks. I am intending to port over to React-Native. Hence, I like to find out if possible to use webhooks to integrate React-Native with Dialogflow?
When I google, I find tons of materials regarding React with Webhooks but none concerning React-Native with Webhooks.
In case not possible to integrate React-Native with Webhooks, how does one work around it then?
Thanks :)
Webhooks usually mean that a URL is called which triggers some kind of action on your server. In the client world you would use sockets.
So if you wish to communicate from server to client instead of vice versa you should either use sockets or native notifications, at least for iOS.
The app is only alive for a certain amount of time when not being used and then its terminated by OS on Apple products. Your socket will thus be shut down. Apple recommends to use native notifications to wake you app up in such cases.
This works espacially well for chat or voip apps.
There are a bunch of frameworks for handling push notifs here is a good tutorial: https://medium.com/ios-expert-series-or-interview-series/voip-push-notifications-using-ios-pushkit-5bc4a8f4d587

Unlock and wakeup from progressive/installable web app for building calling app

I am at the moment researching about the new features of progressive web apps and they are pretty amazing and allow building web apps which are feeling very native. In particular, I'm considering at the moment to build a purely web based, installable calling app. Most features for something like that exist already:
Audio and video calls are very simple to do with WebRTC.
Using service workers and the push API, it is possible to send push notifications to a web app which is not even opened currently: https://developer.mozilla.org/de/docs/Web/API/Push_API
Web apps are becoming installable and can add themselves to your home screen: https://developer.mozilla.org/en-US/Apps/Progressive/Installable
Nevertheless, for building a serious calling app working on a mobile phone, it is necessary to be able to unlock/wakeup the screen of the phone in case of an incoming call. I unfortunately couldn't find anything out about a possibility for doing that; even not with features which are at the moment still considered as "experimental". Does anybody know if it is possible to do that at the moment, just using web technologies? And if not, if in the near future there are plans in browser technologies to allow something like that?
In my opinion, this is something which should be possible (at least in the future), since this would enable developers to build progressive web apps which are having more features and are even closer to native apps.
Currently there is no API that fit your requirement, the best thing you can do is to send notification continuously when someone call you (which I have seen in many other apps).
The most recently feature a web page can do when the phone is sleeping is to play background music or control the volume (MediaSession). But that is only in experiment stage.
I'm not sure allowing a webpage to "wake up" the phone from sleeping state is a good idea. The web move forward but there are things that should be handled by native apps.

Spotify Web API to control playback on connect devices

Is there any way to use an API to control playback on my registered spotify connect devices? I'm not trying to create or add a new connect devices but control playback to them.
Is there any official or reverse engineering discussion on how to do this?
As far as I can tell, there is no way to do this currently.
That said, it's also unclear if or when this feature will be added. Spotify hasn't updated its api code in months. It also appears that the login functionality is broken on my app too. Spotify doesn't seem to be easy to work with.