docs(agi): document FastAGI hangup signaling#68
Conversation
|
Scoped review pass completed for this docs-only resolution of #5. Review coverage:
Validation remains green:
|
Review Panel — Round 1Base: Warning1.
if "no" == self._environment.get("AGISIGHUP", "no") and "HANGUP\n" == line:
line = self._read_line(should_strip=False)When Suggested rewrite: explain that when 2. Timing description conflates two distinct cases —
This describes only the post-exit race. When 3. Missing pystrix exception cross-references — The section explains Asterisk-side variables but does not tell the developer what pystrix raises. Info
|
92c4bdb to
0929fcb
Compare
|
Addressed the Round 1 review panel feedback in What changed:
Validation after the update:
|
Review Panel — Round 2Base: Warning — still open
The updated text reads: "Set
Suggested fix: Remove the Resolved
|
|
Correction — Round 2 Round 2 synthesis flagged the docs' Root cause of the error The panel conflated two things that share the name
The panel reasoned about (1) and applied that reasoning to (2). They are independent. Asterisk 11 // Line 3547–3548 — gate computed at call start
sighup_str = pbx_builtin_getvar_helper(chan, "AGISIGHUP");
send_sighup = !ast_false(sighup_str);
Both write sites are gated on that flag:
Line 3680 is the exact write that races the closed socket and causes the broken pipe in The Asterisk 11 documentation block (line 824) confirms this:
On This controls whether Asterisk breaks out of the command loop early on hangup (around line 3573). It does not gate the Conclusion The |
Summary
HANGUPnotifications over the AGI command socket.ast_carefulwrite/Broken pipeafter a handler returns during hangup-sensitive applications such asDial.AGISIGHUP=noandAGIEXITONHANGUP=yes.Root Cause
Asterisk 11's AGI runner sends a final FastAGI
HANGUPnotification when the channel hangs up andAGISIGHUPis enabled. If the FastAGI handler has already returned, the server-side socket is closed and Asterisk's final write can surface asast_carefulwrite: write() returned error: Broken pipe. This is controlled by Asterisk dialplan variables before entering FastAGI rather than by pystrix runtime code.Closes #5.
Validation
python -m pytest -q-> 72 passedruff check .-> All checks passedruff format --check .-> 26 files already formattedpython -m sphinx -b html doc /private/tmp/pystrix-doc-build-issue-5-> build succeeded