Re: [EXT] Possible bug introduced in 5.8.5

Ihor Olkhovskyi via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <CAJTkRNuVjijQEu8sPyovxoELk3cgRSE6VtD_2fw1jauDzX1UCQ@mail.gmail.com>
Andreas,

I can confirm, that with header with brackets. when using
uac_replace_from("", <URI>), like to clean username
Kamailio is adding extra space between From; and <URI>
which is already fishy for me.
I would suspect, that there is a problem with "empty string" and at some
point it's transformed to " " (1-space string)

I guess (again), there is somehing fishy with handling brackets already,
but it revealed with the commit mentionned.

To reproduce, I've added 2nd SIPP file with brackets to a repo.
https://github.com/igorolhovskiy/kamailio-dev-dc/tree/kamailio_bug_5.8.5

Le jeu. 5 févr. 2026 à 10:37, Andreas Heil via sr-users <
[email protected]> a écrit :

> I tested that:
> I put a „xlog“ before every use of uac_replace_to and every
> uac_replace_from.
> Both got called only once per call.
>
> I rechecked and summarized the problem:
> 5.6.6
>     INVITE w/ brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..." (e.g.
> "To:[SPACE][SPACE]<sip...")
>         no problem here
>     INVITE w/o brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..."
>         no problem here
>     INVITE w/ brackets + remove_hf/append_hf
>         kamailio inserts a space between "To:" and "<sip..."
>         no problem here
>     INVITE w/o brackets + remove_hf/append_hf
>         kamailio inserts a space before "From:" (e.g.
> "[SPACE]From:[SPACE][SPACE]<sip...")
>         The "To:" header looks good
> 5.8.4
>     INVITE w/ brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..." (e.g.
> "To:[SPACE][SPACE]<sip...")
>         no problem here
>     INVITE w/o brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..."
>         no problem here
>     INVITE w/ brackets + remove_hf/append_hf
>         kamailio inserts a space between "To:" and "<sip..."
>         no problem here
>     INVITE w/o brackets + remove_hf/append_hf
>         kamailio inserts a space before "From:" (e.g.
> "[SPACE]From:[SPACE][SPACE]<sip...")
>         The "To:" header looks good
> 5.8.5
>     INVITE w/ brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..." (e.g.
> "To:[SPACE][SPACE]<sip...")
>         no problem here
>     INVITE w/o brackets + uac_replace_to
>         kamailio inserts a space between "To:" and "<sip..."
>         it also appends the new value after the old (e.g.
> "To:[SPACE][SPACE]<OLDVALUE>NEWVALUE"
>     INVITE w/ brackets + remove_hf/append_hf
>         kamailio inserts a space before "From:" (e.g.
> "[SPACE]From:[SPACE][SPACE]<sip...")
>         The "To:" header looks good
>     INVITE w/o brackets + remove_hf/append_hf
>         kamailio inserts a space and the old value of "To" before the
> "From" (e.g. "[SPACE]<sipOldToHeader>From:[SPACE][SPACE]<sip...>")
>         The "To:" header looks good
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>


-- 
Best regards,
Ihor (Igor)

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.