[SR-Users] uac_replace_from and uac_auth fails to authenticate.

Kjeld Flarup kjeld.flarup at liberalismen.dk
Sun Jan 19 23:19:26 CET 2020

I have a setup where I have a fallback to a GSM number

I look up the GSM number and provider information in a database and sets 
the headers.

                   $du = "sip:" + $dbr(ra=>[0,0]);
                   $tu = "sip:"+$rU+"@"+$dbr(ra=>[0,0]);
                   $ru = "sip:"+$rU+"@"+$dbr(ra=>[0,0]);

After this the call goes to a failure_route to do uac_auth()

Now my problem is that this works with the providers Asterisk server.
But if the call is send to the providers Kamailio server, authentication 
is rejected.

Removing uac_replace_from makes the call accepted on the Kamailio server

The only possible problem I can see is that the first INVITE without 
authentication, has correct From header.
But the second with the nonce and auth, uses the wrong From header. Thus 
two different From headers in the same SIP dialog.

Unfortunately uac_replace_from is not allowed in failure_route, so I 
could test if this is the problem.

Is the two different From headers a problem, and how could that be fixed.

-------------------- 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 - www.liberalismen.dk

More information about the sr-users mailing list