I made some more testing and found that calling dlg_manage() before uac_replace() and setting restore_dlg param with value “1” solves my issue and doesn’t add params to Record-Route. 

 

In the event of a restart to Kamailio i would like to keep the state of the call and not lose the values on the dialog vars where original To and From headers are stored. In order to do that i thought of saving the original values on a data structure and assigning its value to the lost dialog vars. In order  to that i need to be able to access those dialog variables. Is that possible? What is their name?

 

Cheers