By searching in the code, I found that the error message I had *no valid dlg uuid (0: - 0:)* is found only in the function tps_storage_update_dialog.
From my log file, I can say that this error message was showing during the handling of the 200 OK (of the RE-INVITE). Hence I suppose that the error message was logged by the call to the function tps_storage_update_dialog inside the function tps_response_received (tps_msg.c:900).
Inside the function tps_response_received , the function *tps_storage_update_branch* is called before the function *tps_storage_update_dialog*. The fact that *tps_storage_update_dialog* got called meant that the call to *tps_storage_update_branch* had succeeded.
In order for the function *tps_storage_update_branch* to succeed, the dialog must have been found from database. I don't understand **why tps_storage_update_branch found the dialog but tps_storage_update_dialog didn't** (they use the same conditions to check for dialog validity).