<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks for the suggestions.</p>
<p>Much to my surprise just setting $fu did the trick.</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">-------------------- Med Liberalistiske Hilsner ----------------------
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
Den ikke akademiske hjemmeside for liberalismen - <a class="moz-txt-link-abbreviated" href="http://www.liberalismen.dk">www.liberalismen.dk</a>
</pre>
<div class="moz-cite-prefix">On 1/20/20 4:27 AM, Joel Serrano wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMtXxQ=ScrdjTPROC80tFRWdyr8YHb+admQ6=FZgadCpgn6qYQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div>
<div dir="auto">Have you tried setting $fU/$fd directly in
failure_route before uac_auth()?</div>
</div>
<div dir="auto"><br>
</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sun, Jan 19, 2020 at
14:35 Kjeld Flarup <<a
href="mailto:kjeld.flarup@liberalismen.dk"
moz-do-not-send="true">kjeld.flarup@liberalismen.dk</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for
confirming.<br>
<br>
As there seems to be no way to correct the From header in <br>
failure_dialog, then the From header has to be modified
before I receive <br>
the call then. Which could be done by cascading with a
Cascading <br>
Kamailio instance.<br>
<br>
<br>
-------------------- Med Liberalistiske Hilsner
----------------------<br>
Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end
min tegnebog<br>
<a
href="https://www.google.com/maps/search/Sofienlundvej+6B,+7560+Hjerm?entry=gmail&source=g"
moz-do-not-send="true">Sofienlundvej 6B, 7560 Hjerm</a>,
Tlf: 40 29 41 49<br>
Den ikke akademiske hjemmeside for liberalismen - <a
href="http://www.liberalismen.dk" rel="noreferrer"
target="_blank" moz-do-not-send="true">www.liberalismen.dk</a><br>
<br>
On 1/19/20 11:22 PM, Alex Balashov wrote:<br>
> In non-REGISTER requests, the From URI is the identity
being asserted,<br>
> and supported by the authentication credentials.<br>
><br>
> If you have control over the upstream Kamailio server,
you can tinker<br>
> with authentication options which enforce equivalence
between the<br>
> authentication username/realm and the From URI
user/domain --<br>
> specifically, by turning off this enforcement.<br>
><br>
> If you don't, then a modified From value will indeed be
a problem<br>
> insofar as it may deviate from the authentication
credentials.<br>
><br>
> -- Alex<br>
><br>
> On Sun, Jan 19, 2020 at 11:19:26PM +0100, Kjeld Flarup
wrote:<br>
><br>
>> I have a setup where I have a fallback to a GSM
number<br>
>><br>
>> I look up the GSM number and provider information
in a database and sets the<br>
>> headers.<br>
>><br>
>> dlg_manage();<br>
>> $du = "sip:" +
$dbr(ra=>[0,0]);<br>
>> $tu =
"sip:"+$rU+"@"+$dbr(ra=>[0,0]);<br>
>> $ru =
"sip:"+$rU+"@"+$dbr(ra=>[0,0]);<br>
>>
uac_replace_from("sip:"+$dbr(ra=>[0,1])+"@EXTERNALIP");<br>
>><br>
>> After this the call goes to a failure_route to do
uac_auth()<br>
>><br>
>> Now my problem is that this works with the
providers Asterisk server.<br>
>> But if the call is send to the providers Kamailio
server, authentication is<br>
>> rejected.<br>
>><br>
>> Removing uac_replace_from makes the call accepted
on the Kamailio server<br>
>><br>
>> The only possible problem I can see is that the
first INVITE without<br>
>> authentication, has correct From header.<br>
>> But the second with the nonce and auth, uses the
wrong From header. Thus two<br>
>> different From headers in the same SIP dialog.<br>
>><br>
>> Unfortunately uac_replace_from is not allowed in
failure_route, so I could<br>
>> test if this is the problem.<br>
>><br>
>> Is the two different From headers a problem, and
how could that be fixed.<br>
>><br>
>><br>
>> -- <br>
>> -------------------- Med Liberalistiske Hilsner
----------------------<br>
>> Civilingeniør, Kjeld Flarup - Mit sind er mere
åbent end min tegnebog<br>
>> Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49<br>
>> Den ikke akademiske hjemmeside for liberalismen
- <a href="http://www.liberalismen.dk" rel="noreferrer"
target="_blank" moz-do-not-send="true">www.liberalismen.dk</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
>> <a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
</body>
</html>