Hi All,
I started playing with async kamailio feature, in particular using "async_route" function provided by ASYNC module (https://www.kamailio.org/docs/modules/5.1.x/modules/async.html#async.f.async...).
My scenario is the following: - A calls B - B answer the call - inside onreply_route[reply] I catch the 200OK message and I suspend the transaction for X seconds. - after X seconds the transaction is resumed and the call continues as expected
Everything looks good, but I encountered an issue trying to drop reply re-transmission messages.
My desire is to drop all the messages received from B (basically 200OK re-transmissions) meanwhile the transaction is suspended. I tested "t_is_retr_async_reply" function provided by TM module (https://www.kamailio.org/docs/modules/5.1.x/modules/tm.html#tm.f.t_is_retr_a...), but I'm not able to get it worked as expected: - t_is_retr_async_reply() function can be used only inside named 'onreply_route' (no default 'onreply_route' or standard 'reply_route') - drop() function, on the contrary, doesn't allow to drop 200OK messages inside named 'onreply_route' (but only in default 'onreply_route' or standard 'reply_route').
Do you have any suggestion on how I can achieve my task?
Thank you very much for your support. Marco
Hello,
htable can be (almost) always a rescue option -- define one with auto-expire value set to the transaction lifetime, when you know that next responses should be dropped, then add an item in the htable with callid as a key (eventually callid+cseq). When you get a response, check if you have the item in htable and drop it.
Cheers, Daniel
On 12.03.19 16:15, Marco Capetta wrote:
Hi All,
I started playing with async kamailio feature, in particular using "async_route" function provided by ASYNC module (https://www.kamailio.org/docs/modules/5.1.x/modules/async.html#async.f.async...).
My scenario is the following: - A calls B - B answer the call - inside onreply_route[reply] I catch the 200OK message and I suspend the transaction for X seconds. - after X seconds the transaction is resumed and the call continues as expected
Everything looks good, but I encountered an issue trying to drop reply re-transmission messages.
My desire is to drop all the messages received from B (basically 200OK re-transmissions) meanwhile the transaction is suspended. I tested "t_is_retr_async_reply" function provided by TM module (https://www.kamailio.org/docs/modules/5.1.x/modules/tm.html#tm.f.t_is_retr_a...), but I'm not able to get it worked as expected: - t_is_retr_async_reply() function can be used only inside named 'onreply_route' (no default 'onreply_route' or standard 'reply_route') - drop() function, on the contrary, doesn't allow to drop 200OK messages inside named 'onreply_route' (but only in default 'onreply_route' or standard 'reply_route').
Do you have any suggestion on how I can achieve my task?
Thank you very much for your support. Marco
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank Daniel.
Using htable as you suggested I was able to match incoming 200OK with the suspended transactions in main 'reply_route' and drop the unwanted one.
Cheers, Marco
On 3/13/19 4:50 PM, Daniel-Constantin Mierla wrote:
Hello,
htable can be (almost) always a rescue option -- define one with auto-expire value set to the transaction lifetime, when you know that next responses should be dropped, then add an item in the htable with callid as a key (eventually callid+cseq). When you get a response, check if you have the item in htable and drop it.
Cheers, Daniel
On 12.03.19 16:15, Marco Capetta wrote:
Hi All,
I started playing with async kamailio feature, in particular using "async_route" function provided by ASYNC module (https://www.kamailio.org/docs/modules/5.1.x/modules/async.html#async.f.async...).
My scenario is the following: - A calls B - B answer the call - inside onreply_route[reply] I catch the 200OK message and I suspend the transaction for X seconds. - after X seconds the transaction is resumed and the call continues as expected
Everything looks good, but I encountered an issue trying to drop reply re-transmission messages.
My desire is to drop all the messages received from B (basically 200OK re-transmissions) meanwhile the transaction is suspended. I tested "t_is_retr_async_reply" function provided by TM module (https://www.kamailio.org/docs/modules/5.1.x/modules/tm.html#tm.f.t_is_retr_a...), but I'm not able to get it worked as expected: - t_is_retr_async_reply() function can be used only inside named 'onreply_route' (no default 'onreply_route' or standard 'reply_route') - drop() function, on the contrary, doesn't allow to drop 200OK messages inside named 'onreply_route' (but only in default 'onreply_route' or standard 'reply_route').
Do you have any suggestion on how I can achieve my task?
Thank you very much for your support. Marco
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users