feat(ops): M7 CP4 — migrate bin/call.sh to an AMI operational command (M-k)#160
Merged
Merged
Conversation
… (M-k) The FreeSWITCH/ESL bin/call.sh is replaced by an AMI-native operational command: - bin/call.sh — AMI-native (Action: Originate / CoreShowChannels / Hangup), reads its AMI secret from a mounted k8s Secret FILE (never argv), refuses to stack a duplicate concurrent call to the same destination, and turns the old unconditional `hupall` foot-gun into an EXPLICIT, DOUBLY-GUARDED operation: --hangup-all AND --force are BOTH required; --hangup-all alone refuses, and a bare --hangup targets only the named destination. - bin/ami_call.py — the low-level AMI transport (list / originate / hangup), reading the secret from --secret-file. Proven against the OFFLINE carrier (tests/cp4-call-command), receiver-side: A --dry-run places NO call (carrier sees no INVITE); B a real call reaches the carrier (one INVITE); C the duplicate-call guard refuses a second concurrent identical call; D --hangup-all WITHOUT --force refuses (rc=3; the live call is untouched); E --hangup-all --force performs the guarded hupall (carrier sees the BYE). Captured REDs (defeat each guard in the script): dry-run then places a call (A FAIL); duplicate guard off -> two INVITEs (C FAIL); --force guard off -> --hangup-all fires unconfirmed (D FAIL).
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.
M7 CP4 (M-k) — migrate bin/call.sh to an AMI operational command
The FreeSWITCH/ESL
bin/call.sh(gateway preflight +originate+ unconditionalhupallover ESL) is replaced by an AMI-native operational command.Action: Originate/CoreShowChannels/Hangup); reads its AMI secret from a mounted k8s Secret file (never argv);refuses a duplicate concurrent call to the same destination; and turns the
old
hupallfoot-gun into an explicit, doubly-guarded operation —--hangup-alland--forceare both required.--hangup-allalonerefuses; a bare
--hangup DESTtargets only that destination.list/originate/hangup), secret read from--secret-file.Receiver-side proof (isolated offline-carrier harness)
tests/cp4-call-command/run.shdrives the command against the offline carrier:Captured REDs (defeat each guard in the script)
A FAIL.C FAIL.--forceguard defeated →--hangup-allfires unconfirmed (rc=0), thelive call is torn down →
D FAIL(the foot-gun).No Rust changes;
cargo test/clippy --workspace --exclude pjsip-shimunaffected(green). Tested only against the offline carrier — never live qa-sip.