MrHertal / react-native-twilio-phone

Twilio Voice React Native module.
MIT License
154 stars 67 forks source link

Add payload to calls #58

Closed therealemjy closed 3 years ago

therealemjy commented 3 years ago

Hi!

Thank you for making this library! We are planning on using it in production for an app in relation with healthcare and so far this is the best option we've found to integrate Twilio Voice into a React Native app.

The goal of this PR is to update the didDisplayIncomingCall event listener that the library adds to RNCallKeep, so that the payload (sanitized so it doesn't contain the aps property) is also passed to the call we add via RNTwilioPhone. This permits to pass custom parameters to the calls via the instruction TwiML. I saw someone created an issue in order to discuss doing just that: https://github.com/MrHertal/react-native-twilio-phone/issues/56

Since this is using the payload we pass via CallKeep, this solution only concerns iOS. Our app does not support Android yet, but we plan on doing so in the future. When the time comes, I'll investigate on a potential solution for Android too (via Firebase I imagine, but I haven't looked into it at all).

I hope this helps!

MrHertal commented 3 years ago

Hi @therealemjy

Glad this library helps you. Thank you for your PR, I will review it this week.

MrHertal commented 3 years ago

I have released that feature: https://github.com/MrHertal/react-native-twilio-phone/releases/tag/v1.8.0

Thanks again.

therealemjy commented 3 years ago

That's great! I'm glad I could help :)