twilio / voice-quickstart-ios

Twilio Voice Quickstart for iOS with Swift
MIT License
183 stars 97 forks source link

Explain `SIP/2.0 410 Gone` error #521

Closed nalexn closed 1 year ago

nalexn commented 1 year ago

Description

We've recently noticed that a handful of call cancel invites are caused by SIP/2.0 410 Gone errors. From the user's perspective, what happens is they are receiving a call invite and a portion of a second later get a call cancel.

Reading #438 and #237 made me think this is the correct behavior when the caller hangs up immediately after starting the call, however, I want to confirm with you this error means the call is "gone", and that it's not our app not registering the token timely thus making Twilio think the user's device is "gone", or some other error either client or server-side of ours.

Steps to Reproduce

Very intermittent, but happens on a simple incoming call. Some users are badly affected by every incoming call being aborted with "gone".

Reproduces How Often

Did not evaluate

Logs

[INF] [Call] Twilio cancel call invite received.
Reason: Error Domain=com.twilio.voice.error Code=31008 "Call Cancelled"
UserInfo={NSLocalizedDescription=Call Cancelled, NSLocalizedFailureReason=SIP/2.0 410 Gone} {"sid":"...","params":{"session_id":"...","to_phone_number":"..."},"from":"...","to":"..."}

Twilio Call SID(s)

These are for one of the users that's heavily affected: CA91f1acf20421c10fb63d9bd7de6acd3d, CA69d49c3b9512bc76bbcf7daefcc67d92, CA43871ea2c46cee007790f6a085497edb, CA653e1e0a96f45a57e47834ea4cf8f0fc,

Versions

Voice iOS SDK

6.5.0

Xcode

14.2

iOS Version

Multiple, but the sampled user is on iOS 16.3

iOS Device

Multiple, but the sampled user is using iPhone 12

bobiechen-twilio commented 1 year ago

Hi @nalexn

The 410 Gone is a standard SIP response used by the Programmable Voice SDK to notify that the incoming call invite has been canceled with a reason, in this case the call has ended by the other end. It can be safely ignored.

Thanks for reaching out. -bobie