Closed abhinavsingh closed 3 years ago
@abhinavsingh Thanks for reaching out and this is a very good question:
By default the answerOnBridge
flag is disabled and as you already observed the caller will receive a connected event once the parent call leg (from client to Twilio) is connected. When the flag is turned on, the Voice backend will only signal the caller that the call has been connected when the callee has accepted the call. The media connection is also established at this time so the audio packet can flow.
The bottom line is that no, this is not a bug. If the behavior with the flag enabled is the desired behavior, the app can use the iOS AVAudioPlayer
to play the ringback tone while the call is ringing on the caller's end. Here is the example code from our quickstart: https://github.com/twilio/voice-quickstart-ios/blob/master/SwiftVoiceQuickstart/ViewController.swift#L405
Cheers, -bobie
@bobiechen-twilio Thank you for clarification and pointing this out. Feels embarrassing that we missed it in the sample code. Thank you!!!
Glad that I (or the sample code) can help. Feel free reach out again if you need further assistance.
We did the integration and then realized there is an edge case :). As in, if user wants to go to speaker immediately, ringtone routing must be done separately. Overall, we feel answerOnBridge
is a Twilio provided switch and SDK must know how to work with this flag. Without putting the onus on the SDK users. I see, the workflow remains the same and should not change for SDK users, hence this handling itself can be baked within the SDK itself (provide ringtone file as a configurable option or use a default). Thank you!!!
Description
We have reached out earlier to Twilio support but we haven't heard back. Apologies for cross posting here but we really want to resolve this. Customers are't comfortable with default
answerOnBridge=false
for outgoing calls.When
answerOnBridge=false
for outgoing, caller immediately sees "connected" WhenanswerOnBridge=true
for outgoing, caller seems "ringing" (as expected) but no ringing toneBecause of no ringing tone when
answerOnBridge=true
, we are forced to useanswerOnBridge=false
, but then that behavior (immediate "connected" even while "ringing") is not natural for us humans.Question
answerOnBridge=true
, is it a bug or expected behavior?answerOnBridge=true
is usedThank you