sip, engine: the retry of an INVITE refused 422
imsd asks for a session interval of 1800 s in a call's first INVITE. A 422 (Session Interval Too Small) is a server's answer to an interval below its minimum and carries that minimum in a Min-SE (RFC 4028 6); TS 24.229 5.1.2A.1.1 has a UE that supports RFC 4028 retry an INVITE so refused in accordance with RFC 4028 7.4. imsd announces "timer" and took a 422 for any other refusal: on a reporter's phone on AT&T's network each of the five calls of one boot ended "INVITE final 422" (AGENTS.md §13). The call machine now sends the INVITE again in the same call: a new transaction under the Call-ID, with the next sequence number, the 422's Min-SE and a session interval no smaller. AGENTS.md §7.6 has when it does not, and what becomes of an answer to an INVITE it has replaced. Tested: the suites, and the daemon of this commit on the workstation against a stand-in network that answers 422 (the fp6 journal's 2026-12-01-min-se-retry capture, bench/).
This commit is contained in:
parent
3d702ec1f1
commit
0026213073
6 changed files with 459 additions and 39 deletions
|
|
@ -9,7 +9,8 @@
|
|||
// with the Content-Length they read and the unfolding of a folded header
|
||||
// section (Unfolded) —, a request whose datagram ends before its body does
|
||||
// (CutShortRequest), a refused final's Retry-After and summary (RetryAfter,
|
||||
// RefusalSummary), transaction matching (ResponseOf), our binding in a
|
||||
// RefusalSummary), the interval a 422's Min-SE names (MinSe), transaction
|
||||
// matching (ResponseOf), our binding in a
|
||||
// reg-event document (RegInfoContactState), and HeaderUri and Body. These pin
|
||||
// the module's edge-case behavior; see the module header before "fixing" one.
|
||||
import std;
|
||||
|
|
@ -405,6 +406,22 @@ int main() {
|
|||
Check(CutShortRequest("MESSAGE sip:a@example.net SIP/2.0\r\nVia: SIP/2.0/UDP\r\n [2001:db8::2]:6000\r\nContent-Length:\r\n\t9\r\n\r\nhello") == "MESSAGE sip:a@example.net SIP/2.0\r\nVia: SIP/2.0/UDP [2001:db8::2]:6000\r\nContent-Length: 9\r\n\r\n", "a request cut short of a folded Content-Length: its header section unfolded, for the 400");
|
||||
}
|
||||
|
||||
// ---- MinSe (the smallest session interval a 422 names, RFC 4028 5, 6)
|
||||
{
|
||||
auto r422 = [](std::string_view line) {
|
||||
return std::format("SIP/2.0 422 Session Interval Too Small\r\nVia: SIP/2.0/TCP [2001:db8::db43]:45062;branch=z9hG4bKx\r\n{}Content-Length: 0\r\n\r\n", line);
|
||||
};
|
||||
Check(MinSe(r422("Min-SE: 3600\r\n")) == 3600, "Min-SE read");
|
||||
Check(MinSe(r422("min-se: 0090 ;x=1\r\n")) == 90, "Min-SE: any case of the name, spaces, zeros before the number, a parameter after it");
|
||||
Check(MinSe(r422("Min-SE: 999999999\r\n")) == 999999999, "Min-SE of nine digits read");
|
||||
Check(MinSe(r422("Min-SE: 0000000090\r\n")) == 90, "zeros before the number are no digits of it: ten characters, the number 90");
|
||||
Check(MinSe(r422("Min-SE: 0\r\n")) == 0, "Min-SE of zero read as zero");
|
||||
Check(!MinSe(r422("")), "no Min-SE header: none");
|
||||
Check(!MinSe(r422("Min-SE: soon\r\n")) && !MinSe(r422("Min-SE: -90\r\n")) && !MinSe(r422("Min-SE:\r\n")), "Min-SE that begins with no digit: none");
|
||||
Check(!MinSe(r422("Min-SE: 1000000000\r\n")) && !MinSe(r422("Min-SE: 99999999999999999999\r\n")), "Min-SE of more than nine digits: none");
|
||||
Check(!MinSe(r422("Session-Expires: 3600\r\n")), "a Session-Expires is no Min-SE");
|
||||
}
|
||||
|
||||
// ---- RetryAfter / RefusalSummary (what a refused final is logged as)
|
||||
{
|
||||
std::string r503 =
|
||||
|
|
|
|||
Loading…
Reference in a new issue