Twilio CallSid and connection.parameters questions - android

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!

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!

What is InCallService(Android) equivalent in iOS

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?

How to register a callback in server to receive data with Android?

Is there a (more modern) way (besides using sockets) to register a callback method to listen for data?
I'd like to have my app register itself with it's IP and a callback method name. The server would then send data back - much like Whatsapp.
I don't know if I understand your question correctly; besides sockets there are alternatives for pushing messages to Android devices, particularly "Cloud Messaging": https://developers.google.com/cloud-messaging/ .
If you just want to implement TCP or UDP-based communications by implementing your own server, sockets are not "outdated" (what do you mean with "modern"?). You can write your own re-usable Server/Client classes that ease the registering of callbacks for incoming connections/packets.
If you google a bit, you will also find frameworks that offer message-based communications facilities you are searching for, e.g.
http://www.binpress.com/app/chat-messaging-sdk-for-android/2326 .
P.S.: I suggest you reformulate the title of your question, because it seems not to be about callback registering itself!

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.

Android get Session Initiation protocol(SIP) calling states

Can anyone provide me an example for catching outgoing call states for a SIP call?
Here is the link for doing that using TelephonyManager example .
But i want something similar for sip calls.
Thank You.
Perform a packet capture (root access) from your device and look at the SIP messages, understanding of SIP call flow will give you call state from SIP message you are looking at.

Categories

Resources