<div dir="ltr"><div>Thank you for your response.</div><div>The problem is, opensips sends the INVITE to secondary srv (failed over) without Authorization. It makes sense that the dns failover is not managed by opensips but atleast the same INVITE should be failover to the secondary. Why the Authorization is removed when it goes to the secondary. </div><div><br></div><div>Thanks</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, 31 May 2025 at 03:52, Ben Newlin <<a href="mailto:Ben.Newlin@genesys.com">Ben.Newlin@genesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-4494914356532648699">
<div lang="EN-US" style="overflow-wrap: break-word;">
<div class="m_-4494914356532648699WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">The issue here is not really with the uac_auth module, as that module isn’t sending the message only updating it with the correct authentication info.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">This is normal and correct behavior. When you send the message the second time using the same DNS, it will follow the same process as the first, trying A then timing out and failing over to B. Standard DNS
SRV doesn’t include any behavior to try to avoid non-responding nodes.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">Ultimately what you need is to know the actual IP that elicited the 401 so the next INVITE with the authentication can be sent to the same one, using $du or $dd(:$dp). Have you tried to get the remote IP in
onreply_route and store it is an AVP using $si [1] or $socket_in [2]? I don’t think I’ve ever used one of these in a reply route. The documentation doesn’t specify whether it is valid and they will contain the source of the reply, not the request.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">[1] - <a href="https://www.opensips.org/Documentation/Script-CoreVar-3-6#si" target="_blank">
https://www.opensips.org/Documentation/Script-CoreVar-3-6#si</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">[2] - <a href="https://www.opensips.org/Documentation/Script-CoreVar-3-6#socket_in" target="_blank">
https://www.opensips.org/Documentation/Script-CoreVar-3-6#socket_in</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif">Ben Newlin</span><span style="font-size:11pt"><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div id="m_-4494914356532648699mail-editor-reference-message-container">
<div>
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181,196,223) currentcolor currentcolor;padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From:
</span></b><span style="font-size:12pt;color:black">Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> on behalf of nz deals <<a href="mailto:nzdealshelp@gmail.com" target="_blank">nzdealshelp@gmail.com</a>><br>
<b>Date: </b>Thursday, May 29, 2025 at 9:32</span><span style="font-size:12pt;font-family:"Arial",sans-serif;color:black"> </span><span style="font-size:12pt;color:black">AM<br>
<b>To: </b>OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<b>Subject: </b>[OpenSIPS-Users] Issue with proxy failover and uac_auth()<u></u><u></u></span></p>
</div>
<div>
<div>
<div>
<div>
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:medium">
<tbody>
<tr>
<td style="border:1pt solid rgb(182,0,0);background:white;padding:0.75pt">
<p class="MsoNormal"><b><span style="font-size:12pt;font-family:"Calibri",sans-serif;color:rgb(182,0,0)"> EXTERNAL EMAIL - Please use caution with links and attachments <u></u><u></u></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-family:Helvetica"><u></u> <u></u></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-family:Helvetica">
<hr size="0" width="100%" align="center">
</span></div>
</div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Hi All,</span><span style="font-size:12pt"><u></u><u></u></span></p>
<p><span style="font-size:10pt;font-family:"Courier New"">I'm using OpenSIPS 3.4 and managing carrier trunks via the registrant table. In the table, I'm using a proxy value like sips:mysip.xx.x</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:"Courier New"">When the primary carrier A sbc SRV record becomes unreachable, OpenSIPS correctly times out INVITE and attempts to fail over to the secondary A record (via SRV).</span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:"Courier New"">The secondary endpoint responds with a 401 Unauthorized and includes a WWW-Authenticate header. At this point, I assume that opensips should not try on the primary carrier A SRV record otherwise it
will also timeout. but it is trying to send another INVITE with Authorization to the primary. this timeout because primary A SRV record is not responding. opensips sends another INVITE to secondary and this time its without Authorization. </span><u></u><u></u></p>
<p><span style="font-size:10pt;font-family:"Courier New"">Is there any way to fix this or work around it? Has anyone faced a similar problem when using
<code>uac_auth()</code> in combination with failover and the same proxy domain? </span>
<u></u><u></u></p>
<p><span style="font-size:10pt;font-family:"Courier New"">Any advice or suggestions would be greatly appreciated.
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Courier New"">Thank you</span><span style="font-size:12pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Courier New"">Regards,</span><span style="font-size:12pt"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;font-family:"Courier New"">Jason</span><span style="font-size:12pt"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote></div>