On 16 Jan 2023, at 14:41, Benoit Panizzon
<benoit.panizzon(a)imp.ch> wrote:
Hi Gang
I have this code snipplet:
if (has_credentials("$fd")) {
xlog("L_INFO", "$cfg(route): got $rm with credentials.
Validate them!\n");
if ($aU == $null) {
xlog("L_INFO", "$cfg(route): no auth user, send
challenge\n");
}
auth_challenge("$fd", "0");
exit;
}
}
Please don't ask if this makes sense, it's a constructed snipplet to show the
situation.
If $rm is INVITE, this works fine, no challenge is being sent, $au is populated.
If $rm is ACK (some CPE seem to send the Credentials with each message) then $au is
$null,
auth_challenge is called and fails.
SInce you can’t respond to ACK, you can’t challenge it.
ACK is the only SIP request method that you can’t respond to. I won’t start a discussion
on which transaction it belongs to, because that’s hardcore SIP, but to simplify: “ACK is
a response to the 200 OK in the INVITE transaction”.
/O