Hello, 

Please ignore my last question. I found my answer in the documentation : 

"If you set restore_mode to AUTO, the URI will be modified automatically in all subsequent requests and replies in that dialog."

Duarte Rocha <duarterocha91@gmail.com> escreveu no dia quinta, 22/06/2023 à(s) 13:17:
Hello,

I have some questions regarding uac_replace methods.

When I receive the first INVITE from someone I change To and From using uac_replace_to() and uac_replace_from(). I do this only on first INVITES. 

In order to restore them I use the "auto" so the changes are restored automatically in replies or requests sent to the call originator.. 

In the case of subsequent requests from the originator kamailio still changes To and From without me using uac_replace functions. Is this caused by the auto restore? Does it work for both sides and is this is the intended behaviour? 

Cheers