What is InCallService(Android) equivalent in iOS - android

In Android, they have this new API called InCallService where you can get call events and for each call object you can do some action. I'm looking for equivalent in iOS. In iOS, I wanted to do the achieve the same thing specifically for outgoing call also. In iOS there is CXCallObserverDelegate protocol but in this case I can only get UUID of the call that's all I can get. I'm not able to do any additional action for the call. I wanted to execute DTMF tone once the call is active but it is not possible. In CallKit there is cxaction called CXPlayDTMFCallAction but this only applies for VOIP application and what I need is to execute the dtmf for gsm calls. Does anybody have any solution for here?

Related

Confused about Android Telecom subsystem order of events on incoming calls

In the following link:
https://developer.android.com/guide/topics/connectivity/telecom/selfManaged
I see the quote
Use the addNewIncomingCall(PhoneAccountHandle, Bundle) method to
inform the telecom subsystem about the new incoming call.
This makes no sense to me. How is my app notifying the Telecom subsystem about incoming calls? Isn't it the other way? It seems like a new call enters the device and the Telecom framework routes it to an app to handle the logic, e.g. my application. How would my app ever know about an incoming call before the Telecom system? What mechanism would notify my application of an incoming call? What service or activity would even call the addNewIncomingCall method?
Now, my intuition says I need to use a receiver to listen for an incoming call by detecting a change in the phone state. However, the following link says that is not the proper way.
https://developer.android.com/guide/topics/connectivity/telecom
That instead you should be using the inCallService and connectionService, which are services I am currently using.
Traditionally, standalone calling apps have relied on listening to the
phone state to try to determine when other calls are taking place.
This is problematic as the phone state does not take into account
other calling apps the user may have installed. Using a self-managed
ConnectionService helps you ensure that your app will interoperate not
only with native telephony calling on the device, but also other
standalone calling apps implementing this API. The Self-Managed
ConnectionService API also manages audio routing and focus for you.
I'm just not sure how they fit into the bigger picture of receiving incoming calls. All the documentation says you don't need to implement the inCallService if you don't want your own custom user interface. But I don't see how the connectionService gets a reference to the Call object otherwise.
Does anybody have a good flow chart or other graphical representation of how the Telecom subsystem functions at a high level? How the callbacks work in the framework?
Ideally I want to use the default dialer interface, dial pads, everything but be notified first of an incoming call and programmatically silently reject the call or pass it through to the default dialer.
Thanks!

Outgoing Call End Classification

I just want to know if when an outgoing call ends, we can differentiate and know if it was due to normal hangup (normal call end), or call end due to disconnection (loss of signal, network congestion, or any reason from the carrier)
There are two main interfaces to call events depending on whether you are using the standard call app provided or are implementing your own user interface to manage calls.
If you are using the standard call service then you limited to whatever callbacks the Android telephony manager propvides:
https://developer.android.com/reference/android/telephony/TelephonyManager.html
This is a fairly limited set of events and I don't think will give you what you are looking for. It will allow you detect that the phone has gone from off hook to idle state, but not why.
If you are implementing the user interface yourself for call control, then you have access to a rusher set of events via the InCallService:
https://developer.android.com/reference/android/telecom/InCallService.html
This provides more information in callbacks but it still does not give a 'disconnect reason' for calls, AFAIK.
Note also that to use the InCallService your app must be registered as the default phone app.

Android Twilio OnHold VOIP

I have my VIOP call in action and the suddenly I get GSM call or something else so I need to put VOIP call on hold.
I found this https://www.twilio.com/blog/2009/09/call-queueing-putting-callers-on-hold-calll-redirect-new-url-new-feature.html
So now I thinks that I need to use twiml to place caller on hold
<Response>
<Say> Thank you for calling, a representative will be with you shortly</Say>
<Play loop="100">mymp3link</Play>
</Response>
And afterwards taking caller off hold with:
POST https://api.twilio.com/2008-08-01/Account/{YourAccountSid}/Calls/{WaitingCallersCallSid}
CurrentUrl=http://www.example.com/dial-representitive
But the main question is if this requests could help with my issue?
And if it can help how can I use my Android client to send this twiml request?? (with twilio library or with common HTTP request??)
P.S. Seems need Twilio evangelist here.
Twilio Documentarian here - will help if I can :)
For the initial use case you are describing (you are on a VoIP call with another party, and then receive a call that requires you to put the call on hold), I will suggest a path of least resistance, and we can iterate from there.
In the TwiML to initiate the call from the Android client, rather than using <Dial> to dial a number, consider creating a two-person <Conference>. Then if your Android client needs to jump off the conference call, they can simply rejoin the same conference call in progress once their non-VoIP call has ended.

Twilio CallSid and connection.parameters questions

Twilio's document is not clear on following questions:
for one audio call, are the CallSids the same in: outgoing side's connection.parameters, incoming side's connection.parameters, the TwML app's initial request, and TwML app's statusEventCallback requests? do I have to use the Rest API to find out the "root" CallSid for the purpose of tracking a single call?
Will I receive the CallSid parameter in statusEventCallback requests?
Is there a way to pass contextual info as parameters from outgoing side to incoming side only throw TCDevice.connect?
How to extend the timeLimit to a one-to-one call? I saw examples to do conference call. Is it the same? will participants of the current call notice anything, or it's very smooth?
thanks!

How to make call conferencing of two calls?

i have tried many things but not getting how to do conferencing in android.
i can receive incoming call and make another outgoing call...but not able to combine those calls as "menu option merge do"...
if i can take object reference of phone or call class(internal class of android) i can use conference method available theres
AFAIK, there is no API for this in the Android SDK, sorry.

Categories

Resources