1
votes

I have integrated Twilio voice in an android app for one to one voice calling. I am able to connect with two identities successfully but I am not able to get any handle to pass caller name.

If I examine the content of incoming call notification there a weird number come which is not linked to my id. Also, I want to pass a URL of caller picture. is there any handle to achieve this?

1
What is the code you are using to examine the content of an incoming call notification? And what does your TwiML look like to connect the call between the two parties?philnash
I am calling through twilio android sdk .. following is the code twiMLParams.put("to", userName); activeCall = Voice.call(VoiceActivity.this, context, Constants.TWILIO_ACCESS_TOKEN), twiMLParams, callListener); and examining the incoming notification through CallInvite objectKunal
Are you calling getFrom() on the CallInvite? How are you setting the caller ID for the call?philnash

1 Answers

0
votes

One cannot add the image url and caller name in the incoming calling notification [REFERENCE]. However, you can do something like this

There is not a formal way of getting this information but you can overload the From field with the following: client:{callerName#}{callerNumber#} and then parse it on the receiving side. You can try the same workaround to pass the URL as well client:{callerName#}{callerNumber#}_{url}.

Note: I prefer sending userId as well so that I can fetch the details at other end or from the local database