Closed saqibdb closed 1 year ago
Hi @saqibdb
Thanks for reaching out.
As you have observed the behavior, the SDK does emit a connected
event in this case to indicate that the media connection is established and ready for the audio of the
I'll check with the API documentation team and see if we can add a note to the answerOnBridge
flag.
@bobiechen-twilio thanks for the very fast reply. So is there any other way to keep track of receiver's call pickup while using twiml.say()? Any way from call object, i can get the information that media connection is from twiml server to caller, or is it from receiver to caller? Otherwise, i can handle the text to speech parts at the mobile application end as well, so twiml server can just be used for calling rather than calling and text to speech
@saqibdb Please reach out to Twilio Support if you still need Programmable Voice help.
Description
As I understand from the documentation, To track if the call has been answered by the called party, you can enable the answerOnBridge flag in your verb, that way the caller client will only receive the callDidConnect: callback when the call is accepted. I am using the answerOnBridge in my twiml code to see when the reciever picks up the call, so i can show the call timer based on this function in the ios app "callDidConnect()" This is working for the most part, but in the twiml code, i am also using
twiml.say("Hello World");
with a conditional check, the issue is when the twiml.say() text to speech function is executed, then the answerOnBridge fails completely and callDidConnect is called as soon as the twiml.say() speech starts to happen. I made the application in a way so that a text is spoken to caller in a certain scenario, before the call starts to ring. But as soon as text is spoken, the timer that i placed for knowing when the call was picked up by the receiver starts to run because the callDidConnect() gets called. I have checked it with multiple scenarios and so far it is only happening if the twiml.say() is executed before the dial.number(to);Steps to Reproduce
dial.number(to);
dial.number(to);
, usetwiml.say("Hello World");
twiml.say("Hello World");
is executed and you hear the words on caller side,callDidConnect()
gets executed on caller sideCode
Expected Behavior
Even with twiml.say(), answerOnBridge should make sure that callDidConnect is called only when the call is picked up on the other side (receiver side)
Actual Behavior
if twiml.say() is executed then the callDidConnect is called even if the call was not picked from receiver's end while answerOnBridge was enabled
Reproduces How Often
Everytime on this specific scenario
Twilio Call SID(s)
CA9ce70fa679b8e2f7df11746185a1580b Parent Call SID = CA17f83803abaeacbb1f1827abced47cd8
Logs
Versions
twilio-cli version 2.18.0.
Voice iOS SDK
6.2.0
Xcode
12.5
iOS Version
14.4
iOS Device
6s, 11 pro, 12 pro