GIven a route[] that might be called either directly from the request route (transaction does not exist) or asynchronously (transaction exists), a way is needed to rationally choose between sl_send_reply and t_reply.
At the moment, I am using an intermediate async route and setting $var(async) = 1 and then testing that when a reply needs to be sent. It seems there could be a more elegant solution.
One thought I had is a new tm function that will choose between t_reply and sl_send_reply depending on whether a transaction has been created.
Any other ideas? Or am I missing an obvious solution?
On 05/07/2013 04:25 PM, Matthew Williams wrote:
GIven a route[] that might be called either directly from the request route (transaction does not exist) or asynchronously (transaction exists), a way is needed to rationally choose between sl_send_reply and t_reply.
At the moment, I am using an intermediate async route and setting $var(async) = 1 and then testing that when a reply needs to be sent. It seems there could be a more elegant solution.
One thought I had is a new tm function that will choose between t_reply and sl_send_reply depending on whether a transaction has been created.
Any other ideas? Or am I missing an obvious solution?
I think what you're missing is send_reply():
http://kamailio.org/docs/modules/4.0.x/modules/sl.html#idp326112
-- Alex
On Tue, May 7, 2013 at 5:23 PM, Alex Balashov abalashov@evaristesys.comwrote:
On 05/07/2013 04:25 PM, Matthew Williams wrote:
GIven a route[] that might be called either directly from the request route (transaction does not exist) or asynchronously (transaction exists), a way is needed to rationally choose between sl_send_reply and t_reply.
At the moment, I am using an intermediate async route and setting $var(async) = 1 and then testing that when a reply needs to be sent. It seems there could be a more elegant solution.
One thought I had is a new tm function that will choose between t_reply and sl_send_reply depending on whether a transaction has been created.
Any other ideas? Or am I missing an obvious solution?
I think what you're missing is send_reply():
http://kamailio.org/docs/**modules/4.0.x/modules/sl.html#**idp326112http://kamailio.org/docs/modules/4.0.x/modules/sl.html#idp326112
-- Alex
Thank you, Alex, that's exactly what I was missing.