Hi Дилян,
This is a rather confusing topic in Kamailio.
Yes, t_relay() creates a transaction, provided that the t_relay() call is not unsuccessful "a priori" (e.g. due to invalid transport, DNS failure, lack of suitable sending listener, etc).
To create a transaction atomically generally means that the transaction is both created and utilised as a single operation.
-- Alex
On Jan 20, 2023, at 8:41 AM, Дилян Палаузов dpa-kamailio@bapha.be wrote:
Hello,
the documentation for tm.t_newtran() says „This is the only way a script can add a new transaction in an atomic way.“ Moreover tm.t_send_reply() “creates the transaction if it does not exist (executing internally t_newtran()) and sends a stateful reply (executing internally t_reply())”. This means that only t_newtrans() and t_send_reply() can create transactions in an atomic way.
The documentation of tm.t_relay() does not say whether the function creates a transaction. It also does not say what happens if t_reply() is not called after t_newtrans().
But for tm.t_set_retr() and tm.t_set_retr() is written “If the transaction is already created (e.g called after t_relay() or in an onreply_route) …” This suggests that tm.t_relay() does create atomically or not-atomically a transaction.
- What does it mean to create a transaction in a non-atomic way?
- Does tm.t_relay() create a transaction?
Greetings Dilyan __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: