Hi David,
the second example looks correct:
From: "14254350027" <sip:14254350027@1.1.18.171>;tag=13133439191609
the first one not (no brackets, wrong order of display name and uri.
From: sip:14254350027@1.1.18.171"14254350027" <>;tag=13133439191609
Do you see this for all test calls? If yes, consider to open an issue on our github tracker about it.
Cheers,
Henning
--
Henning Westerholt –
https://skalatan.de/blog/
Kamailio services –
https://gilawa.com
From: sr-dev <sr-dev-bounces@lists.kamailio.org>
On Behalf Of David Escartin
Sent: Tuesday, March 3, 2020 6:10 PM
To: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org>
Subject: [sr-dev] uac_replace_from rare behaviour
Hello all
we just noticed an issue using this function
when we call it with 2 params (display and uri) and the SIP INVITE comes with a From uri like
sip:anonymous@anonymous.invalid; tag=13133439191609, without <> delimiters, then doing the uac replace in the ACK we have
2(14923) DEBUG: uac [replace.c:922]: replace_callback(): DOWNSTREAM direction detected - replacing uri with the new uri
2(14923) DEBUG: uac [replace.c:943]: replace_callback(): Replace [
sip:anonymous@anonymous.invalid] with ["14254350027"
sip:14254350027@1.1.18.171]
2(14923) DEBUG: uac [replace.c:980]: replace_callback(): inserting display ["14254350027"]
And this is the From header replaced
From:
sip:14254350027@1.1.18.171"14254350027" <>;tag=13133439191609
But if the call comes with a From header like
<sip:anonymous@anonymous.invalid>; tag=13133439191609
Then this is the From header replaced
2(19741) DEBUG: uac [replace.c:922]: replace_callback(): DOWNSTREAM direction detected - replacing uri with the new uri
2(19741) DEBUG: uac [replace.c:943]: replace_callback(): Replace [
sip:1241342@1.1.18.171:5074] with ["14254350027"
sip:14254350027@1.1.18.171]
2(19741) DEBUG: uac [replace.c:980]: replace_callback(): inserting display ["14254350027"]
From: "14254350027" <sip:14254350027@1.1.18.171>;tag=13133439191609
Were you aware of this kind of behaviour? If possible we will look for a patch for this.
thanks a lot and regards
david