God morgen Kjeld,
You can use uac_replace_from/_to in a branch route, e.g.:
[...]
$avp(from_uri) = "sip:"+$dbr(ra=>[0,1])+"@EXTERNALIP";
t_on_branch("UPDATE_FROM");
[...]
branch_route(UPDATE_FROM) {
uac_replace_from("$avp(from_uri)");
}
This should solve your issue.
Med venlig hilsen,
Carsten Bock (lidt Vendelbo)
--
Carsten Bock I CTO & Founder
ng-voice GmbH
Trostbrücke 1 I 20457 Hamburg I Germany
T +49 40 524 75 93-40 | M +49 179 2021244 I
www.ng-voice.com
Registry Office at Local Court Hamburg, HRB 120189
Managing Directors: Dr. David Bachmann, Carsten Bock
Am So., 19. Jan. 2020 um 23:20 Uhr schrieb Kjeld Flarup <
kjeld.flarup(a)liberalismen.dk>gt;:
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.
dlg_manage();
$du = "sip:" + $dbr(ra=>[0,0]);
$tu = "sip:"+$rU+"@"+$dbr(ra=>[0,0]);
$ru = "sip:"+$rU+"@"+$dbr(ra=>[0,0]);
uac_replace_from("sip:"+$dbr(ra=>[0,1])+"@EXTERNALIP");
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
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users