Add call.accept() to the Relay Call API - #93
Open
jakubkarolczyk wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
call.accept()to the RelayCallAPI — send a SIP provisional response (180 Ringing, or 183 Session Progress viaearly_media=True) on an inbound call without answering it. The call stays unanswered and unbilled.Why
Related to signalwire/cloud-product#20389. When a Relay app deliberately does not
answer()an inbound call (e.g. it runs authorization checks and only answers once a destination picks up), SignalWire sends the upstream carrier no provisional response; the carrier hits its post-dial-delay limit, cancels, and re-attempts.accept()lets the app send a 180/183 to satisfy the carrier's PDD timer without committing to an answer.Server method: signalwire/mod_infrastructure#1846.
Changes
relay/call.py—accept(early_media=False, **kwargs), mirroringanswer(dispatchescalling.acceptwithearly_media).tests/unit/relay/test_call.py—test_accept(asserts thecalling.acceptwire call +early_media).relay/docs/call-methods.md—acceptunder Lifecycle.CHANGELOG.md—[Unreleased]entry.