Open mevanso01 opened 3 years ago
Is anyone here to review my issue?
Hi @mevanso01 my apologies for the late reply!
This might be possible with some additional plugin. I will add this a feature request. In essence, we already have it built in but just not passing on the custom parameters to React.
See this PR: https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/170/files
If somebody has time to put in the work and expose the custom params to react then your issue will be solved. Until then I mark this as 'in backlog'.
Hi @jdegger thanks for your reply.
I was able to modify the Android source code of this package for my need and it works well. https://github.com/mevanso01/rn-gma-twilio-programmable-voice/commit/11e6b2edd75ad8ccaf026c0d0a87690ca4523605
@mevanso01 thats great! Would you be willing to PR this? Of course that would also need the iOS work done but that would amazing.
Let me know
@jdegger sure, I will. What're the steps to do that?
By the way, is this possible for iOS? TwilioVoice works through iOS CallKit, so I think sending custom parameters are for Android only. https://support.twilio.com/hc/en-us/articles/115011213347-Passing-Custom-Information-via-Requests-to-Twilio
What do you think?
Hi @mevanso01 I think the solution is in your own URL you posted:
callInvite.customParameters
Using:
On "deviceDidReceiveIncoming" event, I expect to get custom parameters from Twilio but I have only 3 parameters: "call_sid", "call_from", "call_to".
This is how the PHP backend sends extra parameters:
And I have a website that receives these parameters correctly.
Is there a way I can get extra parameters in "deviceDidReceiveIncoming"? Or is this something I need to do in "TwilioVoiceModule.java" file?