There are really no healthy applications of Kamailio in which processing of a request should take a long time, due to Kamailio's limited number (necessarily so) of SIP worker threads. So, the temporal delta from initial message receipt to t_relay() should not be high, and once t_relay() is called, a transaction is created anyway, allowing you to dampen retransmissions with t_check_trans() & friends.
If you must use high-delay processing, use of the TM async capabilities is highly recommended. The suspend/continue required to shuttle request processing off to another thread does require explicit transaction creation up-front, true enough. However, most retransmissions can be dampened by preemptively sending a stateless 100 Trying first. -- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. Original Message From: Mickael Marrache Sent: Thursday, April 30, 2015 04:32 To: 'Kamailio (SER) - Users Mailing List' Reply To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] Transaction good practices with t_relay t_newtran and t_release
Hi,
I think one would like to create transaction ASAP to absorb retransmissions. In some scenarios, processing a message can take time and retransmissions are likely to happen, and you don't want the retransmissions to be processed again (which can lead to errors in some scenarios). t_relay is generally called at the end for relaying the message.
Mickael
-----Original Message----- From: sr-users [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Thursday, April 30, 2015 11:26 AM To: Dirk Teurlings - SIGNET B.V. Subject: Re: [SR-Users] Transaction good practices with t_relay t_newtran and t_release
Dirk,
Why do you need to create new transactions yourself with t_newtran()? Nonexotic applications of Kamailio usually don't require this. A transaction is automatically created after t_relay() is called, and its lifecycle is automatically managed - including destruction - based on the replies received to the transaction-forming request, and based on RFC 3261 rules in cases of timeouts.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users