Re: Kamailio & Asterisk SIP Registration Forwarding - Asterisk replies 401 Unauthorized
ipspeedport--- via sr-users <[email protected]> Fri, 17 Apr 2026 12:19:34 -0000
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <[email protected]> |
What you’re seeing is actually normal in a Kamailio + Asterisk setup. Asterisk is still acting as a registrar, so when Kamailio forwards the REGISTER, Asterisk challenges it with a 401 Unauthorized. That’s just part of the SIP authentication flow. Kamailio (or the client through Kamailio) then handles the auth, and the registration completes successfully which is why your phones can still register and make calls. So the 401 isn’t really an “error”, it’s just a challenge step. You’ll almost always see that unless you change the design so Asterisk fully trusts Kamailio and skips auth. If you’re planning to scale, you can avoid extra load by letting Kamailio handle authentication only and configuring Asterisk as a trusted peer (for example using insecure=invite,port or IP-based trust). That way Asterisk won’t keep challenging every REGISTER. In short, nothing is broken it’s just how SIP works in this setup. If you want to optimize, move auth fully to Kamailio and reduce unnecessary challenges on Asterisk. By the way, if you’re also dealing with router-side SIP quirks (common with home setups), this guide can help: https://speedport-ips.de/ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!