res_pjsip_maintenance: Add tests for PJSIP endpoint maintenance mode#128
Open
danieldonoghue wants to merge 1 commit intoasterisk:masterfrom
Open
res_pjsip_maintenance: Add tests for PJSIP endpoint maintenance mode#128danieldonoghue wants to merge 1 commit intoasterisk:masterfrom
danieldonoghue wants to merge 1 commit intoasterisk:masterfrom
Conversation
Author
|
cherry-pick-to: 23 |
Author
|
asterisk-test-pr: 1820 |
Adds tests for the res_pjsip_maintenance module, which provides per- endpoint runtime maintenance mode via AMI and CLI. inbound_rejection: enables maintenance mode on endpoint "alice" via the PJSIPSetMaintenance AMI action, then verifies that a new inbound INVITE is rejected with 503 Service Unavailable before reaching the dialplan. ami_actions: verifies the full AMI control plane - PJSIPSetMaintenance emits a PJSIPMaintenanceStatus event with Status: enabled, which in turn triggers PJSIPShowMaintenance, confirming the list response and PJSIPMaintenanceStatusComplete are correctly produced. outbound_blocking: enables maintenance mode on endpoint "alice" via PJSIPSetMaintenance, then fires an async AMI Originate to PJSIP/alice and verifies that OriginateResponse carries Response: Failure. No registered contact is required; the session_create supplement check in ast_sip_session_create_outgoing() fires before any contact or AOR lookup, so the origination is refused immediately without any SIP traffic being generated. Development was assisted by Claude (Anthropic). All generated code has been reviewed, tested, and is understood by the author.
88c26a4 to
547572b
Compare
|
Workflow Check completed successfully |
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.
Adds tests for the res_pjsip_maintenance module, which provides per- endpoint runtime maintenance mode via AMI and CLI.
inbound_rejection: enables maintenance mode on endpoint "alice" via the PJSIPSetMaintenance AMI action, then verifies that a new inbound INVITE is rejected with 503 Service Unavailable before reaching the dialplan.
ami_actions: verifies the full AMI control plane - PJSIPSetMaintenance emits a PJSIPMaintenanceStatus event with Status: enabled, which in turn triggers PJSIPShowMaintenance, confirming the list response and PJSIPMaintenanceStatusComplete are correctly produced.
outbound_blocking: enables maintenance mode on endpoint "alice" via PJSIPSetMaintenance, then fires an async AMI Originate to PJSIP/alice and verifies that OriginateResponse carries Response: Failure. No registered contact is required; the session_create supplement check in ast_sip_session_create_outgoing() fires before any contact or AOR lookup, so the origination is refused immediately without any SIP traffic being generated.
Development was assisted by Claude (Anthropic). All generated code has been reviewed, tested, and is understood by the author.