twilio / twilio-voice-ios

Programmable Voice SDK by Twilio
https://www.twilio.com/voice
38 stars 14 forks source link

Outgoing calls doesn't receive fail to connect notification immediately after callee rejects the call #86

Closed abhinavsingh closed 1 year ago

abhinavsingh commented 3 years ago

Description

If callee rejects the call, outgoing calls doesn't receive didFailToConnect for quite sometime. In more than 1 scenario, we have also seen, calls being retried. One such example happened today, here are the call SIDs:

  1. Caller CAb16ca693f70cec316df028db063ef257
  2. Callee CAfe2f5f0f055b79ee30828ea4ec259a0b

As you can see, caller received a no-answer notification after 15 seconds. In between, we saw another call being retried by Twilio servers.

Steps to Reproduce

  1. Make a call
  2. Reject call from the other end
  3. Call doesn't disconnect immediately, in some cases callee receives the call again after rejecting

Expected Behavior

Call must disconnect from caller end immediately without retries. Retries must be configurable.

Actual Behavior

Call doesn't disconnect immediately. In some cases retries happens automagically.

Reproduces How Often

Always. Call doesn't disconnect immediately.

bobiechen-twilio commented 3 years ago

Although the SDK did receive 480 temp, I did notice some significant delay between different stages of the call signal handshaking (CAb16ca693f70cec316df028db063ef257). The records of CAfe2f5f0f055b79ee30828ea4ec259a0b look slightly different but from what I can tell the caller received a busy response almost immediately when the call was rejected by the callee.

Since from the SDK perspective things are working as expected, I would recommend that you open a Twilio Support ticket so our Voice connectivity experts can provide some assistance, especially the calls seem to be cross-continental which might have caused the delay that you observed.

Cheers, -bobie

abhinavsingh commented 3 years ago

@bobiechen-twilio Thank you. I'll also file a ticket with Support team. However, this issue is reproducible for domestic calls also e.g. calling from an Indian number to another Indian number. If the callee rejects the call, caller doesn't get any notification about it. Infact, in most scenarios, we see Twilio automatically retries the call. Callee rejects again, and thats when caller finally disconnects with BUSY tone.

abhinavsingh commented 3 years ago

What we want to understand is, how can we disable automatic retries?

bobiechen-twilio commented 3 years ago

Thanks for the update @abhinavsingh.

Since the SDK is only connecting to the TwiML app specified in the access token and does not have additional methods in terms of advanced call options, you might want to discuss with our support experts and see how to configure either the TwiML response or other call options under your account in order to achieve the desired behavior.