hoxfon / react-native-twilio-programmable-voice

React Native wrapper for Twilio Programmable Voice SDK
MIT License
181 stars 152 forks source link

Call timer #184

Open SergeM55 opened 3 years ago

SergeM55 commented 3 years ago

First of all: thank you very-very-very much for your work.

I need to start timer, when call is answered. Trying to listen events: From console: callStateRinging data {call_sid: "CA79da86a73d9d7ae501f729066ce4b"} connectionDidConnect data {call_state: "CONNECTED", call_sid: "CA79da86a73d9d7ae501f729066ce4b"}

"callStateRinging" event returns only call_sid. connectionDidConnect returns "connected" always. Docs says that we can get "call_state: 'CONNECTED' | 'ACCEPTED' | 'CONNECTING' | 'RINGING' | 'DISCONNECTED' | 'CANCELLED'". So, how can i get it ('accepted' call_state)? Thanks)

fabriziomoscon commented 3 years ago

If my memory serves me well I asked this very same question to Twilio a couple of years ago. Try search here: https://github.com/twilio/voice-quickstart-android/issues?q= Maybe, it will be possible with SDK v5. If you find the way please let me know and I can think about the implementation.

jdegger commented 3 years ago

Hi @Serge-purr To add to @fabriziomoscon's answer, in essence this means that the current lib does not support this behavior. Workarounds would be connecting to Twilio to get the call state when you receive an event. Not ideal, but until the new SDKs are integrated with this lib you will only be able to get connected

vuvt commented 1 year ago

@SergeM55 Did you resolved this issue?