Reputation: 11
I'm integrating Twilio Programable Voice in my Android and iOS application , in my application users will call individually similar to Skype . If someone called user through my application ,another user will accept the call through my application .
How to call particular user as I don't know about that user twilio phone number and how to know which user is calling ...?
Upvotes: 0
Views: 99
Reputation: 361
How to call particular user as I don't know about that user twilio phone number and how to know which user is calling ...?
-> for this I think you might already passing to param in Twilio Voice SDK
params.put("to", contact.getText().toString());
params.put("from", myidentity); //-> for caller identity
so just like to you need to pass from in params when user call another user. and for this you need update backend code so that it can store from value inside it.
reference for changes in backend code is below (need to make change in makeCall function)
How do I set custom parameters for Twilio TVOCallInvite on iOS?
see answer posted by me in this link which describes changes need to be done.
once you update backend logic as suggested you can get caller name on receiver-end by
callInvite.from
I'm iOS developer , so I think I have place correct code from android, but main logic is where you are passing to identity in the same place you can pass custom param and altered backend code as suggested above should definitely work as I have done this and working as expected in iOS so :)
Upvotes: 2