## Description Some inbound WhatsApp calls stayed stuck in "ringing" forever. When a caller hung up within ~1s of dialing, Meta delivered the terminate webhook before the connect webhook. The terminate arrived with no call record yet and was dropped, then connect created the call in ringing with nothing left to close it. These calls now correctly land as missed (no_answer), and an agent who taps Accept on a call that already ended gets a clean "call ended" instead of a generic error. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - local UI testing ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
13 lines
475 B
Ruby
13 lines
475 B
Ruby
module Voice::CallErrors
|
|
# Meta WhatsApp Cloud Calling error code returned when the contact has not
|
|
# granted call permission yet. See `initiate_call` in
|
|
# Enterprise::Whatsapp::Providers::WhatsappCloudService.
|
|
NO_CALL_PERMISSION_CODE = 138_006
|
|
|
|
class NoCallPermission < StandardError; end
|
|
class CallFailed < StandardError; end
|
|
class NotRinging < StandardError; end
|
|
class AlreadyAccepted < StandardError; end
|
|
class CallAlreadyEnded < StandardError; end
|
|
end
|