Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain ;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain ;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomainsip:90001@localhost.localdomain ;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel
On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomainsip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla miconda@gmail.com a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomain sip:90001@localhost.localdomain sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com
A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla miconda@gmail.com a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomain sip:90001@localhost.localdomain sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com
-- Best regards, Ihor (Igor)
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91...
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla miconda@gmail.com a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomain sip:90001@localhost.localdomain sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
Hey Ihor,
I can't seem to be able to reproduce this nor in master nor in 5.8.6.
My config is the default one with the following changes:
``` .... loadmodule "uac.so" modparam("rr", "append_fromtag", 1) ... request_route { $avp(callerID) = "81982934";
xlog("Incoming request: $rm from $fu to $ru (IP:$si:$sp)\n"); xlog("callerID set to: $avp(callerID)\n");
uac_replace_from("sip:" + $avp(callerID) + "@localhost.localdomain"); // $fu = "sip:" + $avp(callerID) + "@localhost.localdomain"
// msg_apply_changes(); xlog("Modified request FROM: $fu\n"); // Not modifed beacuse we didn't use msg_apply_changes();
t_relay("127.0.0.1", "5050"); // Should modify the FROM header when forwarind as verified by sngrep ... } ```
Crafting a message with you exact `From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` produces From: sip:81982934@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` according to sngrep and inspecting the headers.
Relevant logs: ERROR: {1 2 INVITE a84b4c76e66711} <script>: Incoming request: INVITE from sip:90001@localhost.localdomain to sip:bob@example.com (IP:127.0.0.1:42486) ERROR: {1 2 INVITE a84b4c76e66711} <script>: callerID set to: 81982934 ERROR: {1 2 INVITE a84b4c76e66711} <script>: Modified request FROM: sip:90001@localhost.localdomain
Do you perform some other advanced logic or use some modparams that might have modified this behavior?
Thanks, Xenofon
________________________________ From: Ihor Olkhovskyi via sr-users sr-users@lists.kamailio.org Sent: Tuesday, December 16, 2025 10:56 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Ihor Olkhovskyi igorolhovskiy@gmail.com Subject: [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91...
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi <igorolhovskiy@gmail.commailto:igorolhovskiy@gmail.com> a écrit : A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi <igorolhovskiy@gmail.commailto:igorolhovskiy@gmail.com> a écrit : Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com> a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel
On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote: Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomainmailto:sip:90001@localhost.localdomainsip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.orgmailto:sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.comhttp://asipto.com) twitter.com/micondahttp://twitter.com/miconda -- linkedin.com/in/micondahttp://linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.comhttp://asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.comhttp://kamailioworld.com
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
Xenofon,
Thanks for looking into it, for sure I do use other advanced logic, it's just a part of a script that I've found not working for me.
I'll try to make a lab that reproduce this behavior, but it will take some time for sure. Why I pinpointed to this commit, it was about "enclosing URI in <>" what is actually happening in my case, but a bit incorrect.
I'll try to add some logs around commit code to see what exactly is happening there.
Le 16/12/2025 à 13:29, Xenofon Karamanos a écrit :
Hey Ihor,
I can't seem to be able to reproduce this nor in master nor in 5.8.6.
My config is the default one with the following changes:
.... loadmodule "uac.so" modparam("rr", "append_fromtag", 1) ... request_route { $avp(callerID) = "81982934"; xlog("Incoming request: $rm from $fu to $ru (IP:$si:$sp)\n"); xlog("callerID set to: $avp(callerID)\n"); uac_replace_from("sip:" + $avp(callerID) + "@localhost.localdomain"); // $fu = "sip:" + $avp(callerID) + "@localhost.localdomain" // msg_apply_changes(); xlog("Modified request FROM: $fu\n"); // Not modifed beacuse we didn't use msg_apply_changes(); t_relay("127.0.0.1", "5050"); // Should modify the FROM header when forwarind as verified by sngrep ... }Crafting a message with you exact `From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628 mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` produces From: sip:81982934@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` according to |sngrep| and inspecting the headers.
Relevant logs: *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Incoming request: INVITE from sip:90001@localhost.localdomain to sip:bob@example.com (IP:127.0.0.1:42486) *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: callerID set to: 81982934 *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Modified request FROM: sip:90001@localhost.localdomain
Do you perform some other advanced logic or use some modparams that might have modified this behavior?
Thanks, Xenofon
*From:* Ihor Olkhovskyi via sr-users sr-users@lists.kamailio.org *Sent:* Tuesday, December 16, 2025 10:56 *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Cc:* Ihor Olkhovskyi igorolhovskiy@gmail.com *Subject:* [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91... https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd917947ccba
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi <igorolhovskiy@gmail.com mailto:igorolhovskiy@gmail.com> a écrit :
A bit update: uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment). So, somewhere between 5.8.4 and 5.8.5 this regression was introduced. Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi <igorolhovskiy@gmail.com <mailto:igorolhovskiy@gmail.com>> a écrit : Daniel, That's the thing, if I comment out just this string, there is no such behavoir. I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction. I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless, Cheers, Ihor Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> a écrit : I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created. Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote: Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky. Initial From field in a packet is: From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628 <mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628> In the code I'm having a statement $fu = "sip:" + $avp(callerID) + "@localhost.localdomain"; Resulting From field on 5.8.4 looks like From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628 <mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628> Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine. But exact the same config file on 5.8.6 giving this: From: <sip:90001@localhost.localdomain> <mailto:sip:90001@localhost.localdomain>sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628 <mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628> Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5) -- Best regards, Ihor (Igor) __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> To unsubscribe send an email to sr-users-leave@lists.kamailio.org <mailto:sr-users-leave@lists.kamailio.org> Important: keep the mailing list in the recipients, do not reply only to the sender! -- Daniel-Constantin Mierla (@ asipto.com <http://asipto.com>) twitter.com/miconda <http://twitter.com/miconda> -- linkedin.com/in/miconda <http://linkedin.com/in/miconda> Kamailio Consultancy, Training and Development Services -- asipto.com <http://asipto.com> Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com <http://kamailioworld.com> -- Best regards, Ihor (Igor) -- Best regards, Ihor (Igor)-- Best regards, Ihor (Igor)
Dear Xenofon, Daniel,
I was able to replicate issue in an isolated environement
Configs are here; https://github.com/igorolhovskiy/kamailio-dev-dc/tree/kamailio_bug_5.8.5
Idea is you starting up the lab with
docker compose up -d
go inside kamailio container and start sngrep there
docker compose exec kamailio bash
# sngrep
On a separate terminal start sipp with file provided in sipp folder
sipp -r 1 -m 1 -sf uac_1.xml -s 11111 localhost
And on sngrep you see the behavoir I've described.
From: sip:90002@127.0.0.1:5061;tag=743711SIPpTag001 -> From: < sip:90002@127.0.0.1:5061>sip:90002@localhost;tag=743711SIPpTag001
Hope, this helps
Le mar. 16 déc. 2025 à 13:29, Xenofon Karamanos xk@gilawa.com a écrit :
Hey Ihor,
I can't seem to be able to reproduce this nor in master nor in 5.8.6.
My config is the default one with the following changes:
.... loadmodule "uac.so" modparam("rr", "append_fromtag", 1) ... request_route { $avp(callerID) = "81982934"; xlog("Incoming request: $rm from $fu to $ru (IP:$si:$sp)\n"); xlog("callerID set to: $avp(callerID)\n"); uac_replace_from("sip:" + $avp(callerID) + "@localhost.localdomain"); // $fu = "sip:" + $avp(callerID) + "@localhost.localdomain" // msg_apply_changes(); xlog("Modified request FROM: $fu\n"); // Not modifed beacuse we didn't use msg_apply_changes(); t_relay("127.0.0.1", "5050"); // Should modify the FROM header when forwarind as verified by sngrep ... }Crafting a message with you exact `From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` produces From: sip:81982934@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` according to sngrep and inspecting the headers.
Relevant logs: *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Incoming request: INVITE from sip:90001@localhost.localdomain to sip:bob@example.com (IP: 127.0.0.1:42486) *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: callerID set to: 81982934 *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Modified request FROM: sip:90001@localhost.localdomain
Do you perform some other advanced logic or use some modparams that might have modified this behavior?
Thanks, Xenofon
*From:* Ihor Olkhovskyi via sr-users sr-users@lists.kamailio.org *Sent:* Tuesday, December 16, 2025 10:56 *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Cc:* Ihor Olkhovskyi igorolhovskiy@gmail.com *Subject:* [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91...
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla miconda@gmail.com a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomain sip:90001@localhost.localdomain sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
Hey there Ihor,
Yeah i can see now the issue. I can replicate also on my system.
The issue is beacuse you are also modifying Display Name before the URI.
As noted in the docs:
$fn - From display name $fn - reference to display name of 'From' header 🔥IMPORTANT: It is R/W variable (you can assign values to it directly in configuration file, but its value does not change) NOTE: When using this along with $fu to change part of the message, applying them all at once can result in unintended side-effects. To ensure that the changes are applied to the message as intended, it is suggested to use the msg_apply_changes() function from the textopsx module after each change to the message. This function can ensure that the changes are applied correctly and that the message remains valid. See the NOTE part. Internally kamailio uses some lump system that doing multiple changes on the go, can cause unintended side-effects, which you just observed, because of the way it handle each change. By doing a msg_apply_changes(); after the first change like fn=, you can see that the resulting msg will be correct. There is no easy way to fix how the lump system unfortunately works, hence the note of applying the changes one by one. Alternatively, you can use ` uac_replace_from(" new display name", "sip:" + $avp(callerID) + "@localhost.localdomain"); ` as noted by Daniel as well found https://www.kamailio.org/docs/modules/5.2.x/modules/uac.html#uac.f.uac_repla.... If you need anything more, please do not hesitate to ask. BR, Xenofon
________________________________ From: Ihor Olkhovskyi igorolhovskiy@gmail.com Sent: Thursday, December 18, 2025 17:30 To: Xenofon Karamanos xk@gilawa.com Cc: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
Dear Xenofon, Daniel,
I was able to replicate issue in an isolated environement
Configs are here; https://github.com/igorolhovskiy/kamailio-dev-dc/tree/kamailio_bug_5.8.5
Idea is you starting up the lab with
docker compose up -d
go inside kamailio container and start sngrep there
docker compose exec kamailio bash
# sngrep
On a separate terminal start sipp with file provided in sipp folder
sipp -r 1 -m 1 -sf uac_1.xml -s 11111 localhost
And on sngrep you see the behavoir I've described.
From: sip:90002@127.0.0.1:5061;tag=743711SIPpTag001 -> From: <sip:90002@127.0.0.1:5061http://sip:90002@127.0.0.1:5061>sip:90002@localhost;tag=743711SIPpTag001
Hope, this helps
Le mar. 16 déc. 2025 à 13:29, Xenofon Karamanos <xk@gilawa.commailto:xk@gilawa.com> a écrit : Hey Ihor,
I can't seem to be able to reproduce this nor in master nor in 5.8.6.
My config is the default one with the following changes:
``` .... loadmodule "uac.so" modparam("rr", "append_fromtag", 1) ... request_route { $avp(callerID) = "81982934";
xlog("Incoming request: $rm from $fu to $ru (IP:$si:$sp)\n"); xlog("callerID set to: $avp(callerID)\n");
uac_replace_from("sip:" + $avp(callerID) + "@localhost.localdomain"); // $fu = "sip:" + $avp(callerID) + "@localhost.localdomain"
// msg_apply_changes(); xlog("Modified request FROM: $fu\n"); // Not modifed beacuse we didn't use msg_apply_changes();
t_relay("127.0.0.1", "5050"); // Should modify the FROM header when forwarind as verified by sngrep ... } ```
Crafting a message with you exact `From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` produces From: sip:81982934@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` according to sngrep and inspecting the headers.
Relevant logs: ERROR: {1 2 INVITE a84b4c76e66711} <script>: Incoming request: INVITE from sip:90001@localhost.localdomain to sip:bob@example.commailto:sip%3Abob@example.com (IP:127.0.0.1:42486http://127.0.0.1:42486) ERROR: {1 2 INVITE a84b4c76e66711} <script>: callerID set to: 81982934 ERROR: {1 2 INVITE a84b4c76e66711} <script>: Modified request FROM: sip:90001@localhost.localdomain
Do you perform some other advanced logic or use some modparams that might have modified this behavior?
Thanks, Xenofon
________________________________ From: Ihor Olkhovskyi via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Sent: Tuesday, December 16, 2025 10:56 To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Cc: Ihor Olkhovskyi <igorolhovskiy@gmail.commailto:igorolhovskiy@gmail.com> Subject: [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91...
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi <igorolhovskiy@gmail.commailto:igorolhovskiy@gmail.com> a écrit : A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi <igorolhovskiy@gmail.commailto:igorolhovskiy@gmail.com> a écrit : Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla <miconda@gmail.commailto:miconda@gmail.com> a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel
On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote: Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomainmailto:sip:90001@localhost.localdomainsip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628mailto:sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.orgmailto:sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.comhttp://asipto.com) twitter.com/micondahttp://twitter.com/miconda -- linkedin.com/in/micondahttp://linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.comhttp://asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.comhttp://kamailioworld.com
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
Xenofon,
Yup, thanks for this one, my message than might be a warning for others as these side effects started to occur after a minor version change. In my case at least.
Best regards, Ihor (Igor)
Le jeu. 18 déc. 2025, 17:47, Xenofon Karamanos xk@gilawa.com a écrit :
Hey there Ihor,
Yeah i can see now the issue. I can replicate also on my system.
The issue is beacuse you are also modifying Display Name before the URI.
As noted in the docs:
*$fn - From display name* *$fn* - reference to display name of 'From' header 🔥*IMPORTANT*: It is R/W variable (you can assign values to it directly in configuration file, but its value does not change) *NOTE:* *When using this along with $fu to change part of the message, applying them all at once can result in unintended side-effects. To ensure that the changes are applied to the message as intended, it is suggested to use the msg_apply_changes() function from the textopsx module after each change to the message. This function can ensure that the changes are applied correctly and that the message remains valid.* See the NOTE part. Internally kamailio uses some lump system that doing multiple changes on the go, can cause *unintended *side-effects, which you just observed, because of the way it handle each change. By doing a msg_apply_changes(); after the first change like fn=, you can see that the resulting msg will be correct. There is no easy way to fix how the lump system unfortunately works, hence the note of applying the changes one by one. Alternatively, you can use ` uac_replace_from(" new display name", "sip:" + $avp(callerID) + "@localhost.localdomain"); ` as noted by Daniel as well found https://www.kamailio.org/docs/modules/5.2.x/modules/uac.html#uac.f.uac_repla... . If you need anything more, please do not hesitate to ask. BR, Xenofon
*From:* Ihor Olkhovskyi igorolhovskiy@gmail.com *Sent:* Thursday, December 18, 2025 17:30 *To:* Xenofon Karamanos xk@gilawa.com *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
Dear Xenofon, Daniel,
I was able to replicate issue in an isolated environement
Configs are here; https://github.com/igorolhovskiy/kamailio-dev-dc/tree/kamailio_bug_5.8.5
Idea is you starting up the lab with
docker compose up -d
go inside kamailio container and start sngrep there
docker compose exec kamailio bash
# sngrep
On a separate terminal start sipp with file provided in sipp folder
sipp -r 1 -m 1 -sf uac_1.xml -s 11111 localhost
And on sngrep you see the behavoir I've described.
From: sip:90002@127.0.0.1:5061;tag=743711SIPpTag001 -> From: < sip:90002@127.0.0.1:5061>sip:90002@localhost;tag=743711SIPpTag001
Hope, this helps
Le mar. 16 déc. 2025 à 13:29, Xenofon Karamanos xk@gilawa.com a écrit :
Hey Ihor,
I can't seem to be able to reproduce this nor in master nor in 5.8.6.
My config is the default one with the following changes:
.... loadmodule "uac.so" modparam("rr", "append_fromtag", 1) ... request_route { $avp(callerID) = "81982934"; xlog("Incoming request: $rm from $fu to $ru (IP:$si:$sp)\n"); xlog("callerID set to: $avp(callerID)\n"); uac_replace_from("sip:" + $avp(callerID) + "@localhost.localdomain"); // $fu = "sip:" + $avp(callerID) + "@localhost.localdomain" // msg_apply_changes(); xlog("Modified request FROM: $fu\n"); // Not modifed beacuse we didn't use msg_apply_changes(); t_relay("127.0.0.1", "5050"); // Should modify the FROM header when forwarind as verified by sngrep ... }Crafting a message with you exact `From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` produces From: sip:81982934@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628` according to sngrep and inspecting the headers.
Relevant logs: *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Incoming request: INVITE from sip:90001@localhost.localdomain to sip:bob@example.com (IP: 127.0.0.1:42486) *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: callerID set to: 81982934 *ERROR*: {1 2 INVITE a84b4c76e66711} <script>: Modified request FROM: sip:90001@localhost.localdomain
Do you perform some other advanced logic or use some modparams that might have modified this behavior?
Thanks, Xenofon
*From:* Ihor Olkhovskyi via sr-users sr-users@lists.kamailio.org *Sent:* Tuesday, December 16, 2025 10:56 *To:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Cc:* Ihor Olkhovskyi igorolhovskiy@gmail.com *Subject:* [SR-Users] Re: Regresion from 5.8.4 to 5.8.6
And I have a strong impression that this is the commit, that introduced this behavoir
https://github.com/kamailio/kamailio/commit/6367a41f64ed165792ffe71ea310fd91...
Le mar. 16 déc. 2025 à 09:48, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
A bit update:
uac_replace_from() behave the same way as assigning to $fu (measn incorrect), and I confirm it on 5.8.5 and onwards (for the moment).
So, somewhere between 5.8.4 and 5.8.5 this regression was introduced.
Le lun. 15 déc. 2025 à 15:31, Ihor Olkhovskyi igorolhovskiy@gmail.com a écrit :
Daniel,
That's the thing, if I comment out just this string, there is no such behavoir.
I will look at uac_replace_from(), but assigning $fu is quite a basic operation and is ok in a previous version. I've checked, there is no double changes to $f... family of variables and no msg_apply_changes() in between. And yes, $fu is changed before creating a transaction.
I'll dig more in the code to see what can cause this, but my message was maybe just a warning to community, that transition from 5.8.4 to 5.8.6 might be not flawless,
Cheers, Ihor
Le lun. 15 déc. 2025 à 15:17, Daniel-Constantin Mierla miconda@gmail.com a écrit :
I don't recall changes on this during the same release series, normally you should use assignments to $fu in a very careful way, recommended way is with uac_replace_from(). You have to check you config and be sure you do not make changes over From-URI twice or more, or try to use msg_apply_changes() if you do it in request_route before the transaction in created.
Cheers, Daniel On 15.12.25 14:15, Ihor Olkhovskyi via sr-users wrote:
Not sure where the bug is, just noticed when playing on local development Kamailio installation, that simple rewrite of $fu start to act funky.
Initial From field in a packet is:
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
In the code I'm having a statement
$fu = "sip:" + $avp(callerID) + "@localhost.localdomain";
Resulting From field on 5.8.4 looks like
From: sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Note the 2 spaces after From, but it's ok, I guess, no other changes which is fine.
But exact the same config file on 5.8.6 giving this:
From: sip:90001@localhost.localdomain sip:90001@localhost.localdomain sip:90001@localhost.localdomain;tag=83017fca-9fe4-493e-9e66-406034482628
Which is not correct SIP URI. I'm not sure when the issue was introduced, but that's what I've found. If will have a bit more time, will try to investigate deeper, maybe just to warn about possible bugs with the versions greater than 5.8.4 (have not tested 5.8.5)
-- Best regards, Ihor (Igor)
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
-- Daniel-Constantin Mierla (@ asipto.com)twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, May 7-8, 2026 - Berlin, Germany -- kamailioworld.com
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)
-- Best regards, Ihor (Igor)