Browse Source

- removed the "noisy_ctimer" parameter. For more details about this, refer to the discusion from users mailing list ["noisy_ctimer" parameter in TM module] - http://lists.openser.org/pipermail/users/2008-February/016207.html
Closes bug #1903333


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3909 689a6050-402a-0410-94f2-e92a70836424

Bogdan-Andrei Iancu 17 years ago
parent
commit
02d06480b9

+ 69 - 87
modules_k/tm/README

@@ -47,17 +47,16 @@ Bogdan-Andrei Iancu
               1.3.4. delete_timer (integer)
               1.3.5. T1_timer (integer)
               1.3.6. T2_timer (integer)
-              1.3.7. noisy_ctimer (integer)
-              1.3.8. ruri_matching (integer)
-              1.3.9. via1_matching (integer)
-              1.3.10. unix_tx_timeout (integer)
-              1.3.11. restart_fr_on_each_reply (integer)
-              1.3.12. fr_timer_avp (string)
-              1.3.13. fr_inv_timer_avp (string)
-              1.3.14. tw_append (string)
-              1.3.15. pass_provisional_replies (integer)
-              1.3.16. syn_branch (integer)
-              1.3.17. onreply_avp_mode (integer)
+              1.3.7. ruri_matching (integer)
+              1.3.8. via1_matching (integer)
+              1.3.9. unix_tx_timeout (integer)
+              1.3.10. restart_fr_on_each_reply (integer)
+              1.3.11. fr_timer_avp (string)
+              1.3.12. fr_inv_timer_avp (string)
+              1.3.13. tw_append (string)
+              1.3.14. pass_provisional_replies (integer)
+              1.3.15. syn_branch (integer)
+              1.3.16. onreply_avp_mode (integer)
 
         1.4. Exported Functions
 
@@ -119,32 +118,31 @@ Bogdan-Andrei Iancu
    1.4. Set delete_timer parameter
    1.5. Set T1_timer parameter
    1.6. Set T2_timer parameter
-   1.7. Set noisy_ctimer parameter
-   1.8. Set ruri_matching parameter
-   1.9. Set via1_matching parameter
-   1.10. Set unix_tx_timeout parameter
-   1.11. Set restart_fr_on_each_reply parameter
-   1.12. Set fr_timer_avp parameter
-   1.13. Set fr_inv_timer_avp parameter
-   1.14. Set tw_append parameter
-   1.15. Set pass_provisional_replies parameter
-   1.16. Set syn_branch parameter
-   1.17. Set onreply_avp_mode parameter
-   1.18. t_newtran usage
+   1.7. Set ruri_matching parameter
+   1.8. Set via1_matching parameter
+   1.9. Set unix_tx_timeout parameter
+   1.10. Set restart_fr_on_each_reply parameter
+   1.11. Set fr_timer_avp parameter
+   1.12. Set fr_inv_timer_avp parameter
+   1.13. Set tw_append parameter
+   1.14. Set pass_provisional_replies parameter
+   1.15. Set syn_branch parameter
+   1.16. Set onreply_avp_mode parameter
+   1.17. t_newtran usage
+   1.18. t_relay usage
    1.19. t_relay usage
-   1.20. t_relay usage
-   1.21. t_reply usage
-   1.22. t_replicate usage
-   1.23. t_release usage
-   1.24. t_check_status usage
-   1.25. t_flush_flags usage
-   1.26. t_local_replied usage
-   1.27. t_write_fifo/unix usage
-   1.28. t_check_trans usage
-   1.29. t_was_cancelled usage
-   1.30. t_on_failure usage
-   1.31. t_on_reply usage
-   1.32. t_on_branch usage
+   1.20. t_reply usage
+   1.21. t_replicate usage
+   1.22. t_release usage
+   1.23. t_check_status usage
+   1.24. t_flush_flags usage
+   1.25. t_local_replied usage
+   1.26. t_write_fifo/unix usage
+   1.27. t_check_trans usage
+   1.28. t_was_cancelled usage
+   1.29. t_on_failure usage
+   1.30. t_on_reply usage
+   1.31. t_on_branch usage
 
 Chapter 1. User's Guide
 
@@ -385,23 +383,7 @@ modparam("tm", "T1_timer", 700)
 modparam("tm", "T2_timer", 8000)
 ...
 
-1.3.7. noisy_ctimer (integer)
-
-   If set, on FR timer INVITE transactions will be explicitly
-   canceled if possible, silently dropped otherwise. Preferably,
-   it is turned off to allow very long ringing. This behavior is
-   overridden if a request is forked, or some functionality
-   explicitly turned it off for a transaction (like acc does to
-   avoid unaccounted transactions due to expired timer).
-
-   Default value is 0 (false).
-
-   Example 1.7. Set noisy_ctimer parameter
-...
-modparam("tm", "noisy_ctimer", 1)
-...
-
-1.3.8. ruri_matching (integer)
+1.3.7. ruri_matching (integer)
 
    Should be request-uri matching used as a part of pre-3261
    transaction matching as the standard wants us to do so? Turn
@@ -410,12 +392,12 @@ modparam("tm", "noisy_ctimer", 1)
 
    Default value is 1 (true).
 
-   Example 1.8. Set ruri_matching parameter
+   Example 1.7. Set ruri_matching parameter
 ...
 modparam("tm", "ruri_matching", 0)
 ...
 
-1.3.9. via1_matching (integer)
+1.3.8. via1_matching (integer)
 
    Should be top most VIA matching used as a part of pre-3261
    transaction matching as the standard wants us to do so? Turn
@@ -425,24 +407,24 @@ modparam("tm", "ruri_matching", 0)
 
    Default value is 1 (true).
 
-   Example 1.9. Set via1_matching parameter
+   Example 1.8. Set via1_matching parameter
 ...
 modparam("tm", "via1_matching", 0)
 ...
 
-1.3.10. unix_tx_timeout (integer)
+1.3.9. unix_tx_timeout (integer)
 
    Send timeout to be used by function which use UNIX sockets (as
    t_write_unix).
 
    Default value is 2 seconds.
 
-   Example 1.10. Set unix_tx_timeout parameter
+   Example 1.9. Set unix_tx_timeout parameter
 ...
 modparam("tm", "unix_tx_timeout", 5)
 ...
 
-1.3.11. restart_fr_on_each_reply (integer)
+1.3.10. restart_fr_on_each_reply (integer)
 
    If true (non null value), the final response timer will be
    re-triggered for each received provisional reply. In this case,
@@ -451,12 +433,12 @@ modparam("tm", "unix_tx_timeout", 5)
 
    Default value is 1 (true).
 
-   Example 1.11. Set restart_fr_on_each_reply parameter
+   Example 1.10. Set restart_fr_on_each_reply parameter
 ...
 modparam("tm", "restart_fr_on_each_reply", 0)
 ...
 
-1.3.12. fr_timer_avp (string)
+1.3.11. fr_timer_avp (string)
 
    Full specification (NAME, ID, Alias) of an AVP which contains a
    final response timeout value. If present, ths value will
@@ -467,12 +449,12 @@ modparam("tm", "restart_fr_on_each_reply", 0)
 
    Default value is "NULL" (feature disabled).
 
-   Example 1.12. Set fr_timer_avp parameter
+   Example 1.11. Set fr_timer_avp parameter
 ...
 modparam("tm", "fr_timer_avp", "$avp(i:24)")
 ...
 
-1.3.13. fr_inv_timer_avp (string)
+1.3.12. fr_inv_timer_avp (string)
 
    Full specification (NAME, ID, Alias) of an AVP which contains a
    final INVITE response timeout value. If present, ths value will
@@ -483,12 +465,12 @@ modparam("tm", "fr_timer_avp", "$avp(i:24)")
 
    Default value is "NULL" (feature disabled).
 
-   Example 1.13. Set fr_inv_timer_avp parameter
+   Example 1.12. Set fr_inv_timer_avp parameter
 ...
 modparam("tm", "fr_inv_timer_avp", "$avp(i:25)")
 ...
 
-1.3.14. tw_append (string)
+1.3.13. tw_append (string)
 
    List of additional information to be appended by t_write_fifo
    and t_write_unix functions.
@@ -508,37 +490,37 @@ modparam("tm", "fr_inv_timer_avp", "$avp(i:25)")
    accept name; the body it will be printed all the time at the
    end, disregarding its position in the definition string.
 
-   Example 1.14. Set tw_append parameter
+   Example 1.13. Set tw_append parameter
 ...
 modparam("tm", "tw_append",
    "test: ua=$hdr(User-Agent) ;avp=$avp(i:10);$rb;time=$Ts")
 ...
 
-1.3.15. pass_provisional_replies (integer)
+1.3.14. pass_provisional_replies (integer)
 
    Enable/disable passing of provisional replies to FIFO
    applications.
 
    Default value is 0.
 
-   Example 1.15. Set pass_provisional_replies parameter
+   Example 1.14. Set pass_provisional_replies parameter
 ...
 modparam("tm", "pass_provisional_replies", 1)
 ...
 
-1.3.16. syn_branch (integer)
+1.3.15. syn_branch (integer)
 
    Enable/disable the usage of stateful synonym branch IDs in the
    generated Via headers. They are faster but not reboot-safe.
 
    Default value is 1 (use synonym branches).
 
-   Example 1.16. Set syn_branch parameter
+   Example 1.15. Set syn_branch parameter
 ...
 modparam("tm", "syn_branch", 0)
 ...
 
-1.3.17. onreply_avp_mode (integer)
+1.3.16. onreply_avp_mode (integer)
 
    Describes how the AVPs should be handled in reply route:
      * 0 - the AVPs will be per message only; they will not
@@ -556,7 +538,7 @@ modparam("tm", "syn_branch", 0)
 
    Default value is 0.
 
-   Example 1.17. Set onreply_avp_mode parameter
+   Example 1.16. Set onreply_avp_mode parameter
 ...
 modparam("tm", "onreply_avp_mode", 1)
 ...
@@ -576,7 +558,7 @@ Warning
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 1.18. t_newtran usage
+   Example 1.17. t_newtran usage
 ...
 if (t_newtran()) {
         log("UAS logic");
@@ -622,7 +604,7 @@ if (t_newtran()) {
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
-   Example 1.19. t_relay usage
+   Example 1.18. t_relay usage
 ...
 if (!t_relay()) {
     sl_reply_error();
@@ -641,7 +623,7 @@ if (!t_relay()) {
 
    This functions can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
-   Example 1.20. t_relay usage
+   Example 1.19. t_relay usage
 ...
 t_relay("tcp:192.168.1.10:5060");
 t_relay("mydomain.com:5070","0x1");
@@ -659,7 +641,7 @@ t_relay("udp:mydomain.com");
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
 
-   Example 1.21. t_reply usage
+   Example 1.20. t_reply usage
 ...
 t_reply("404", "Not found");
 ...
@@ -681,7 +663,7 @@ t_reply("404", "Not found");
 
    This functions can be used from REQUEST_ROUTE.
 
-   Example 1.22. t_replicate usage
+   Example 1.21. t_replicate usage
 ...
 t_replicate("sip:1.2.3.4:5060");
 t_replicate("sip:1.2.3.4:5060;transport=tcp");
@@ -695,7 +677,7 @@ t_replicate("sip:1.2.3.4","0x4");
 
    This function can be used from REQUEST_ROUTE.
 
-   Example 1.23. t_release usage
+   Example 1.22. t_release usage
 ...
 t_release();
 ...
@@ -712,7 +694,7 @@ t_release();
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
    FAILURE_ROUTE and BRANCH_ROUTE .
 
-   Example 1.24. t_check_status usage
+   Example 1.23. t_check_status usage
 ...
 if (t_check_status("(487)|(408)")) {
     log("487 or 408 negative reply\n");
@@ -728,7 +710,7 @@ if (t_check_status("(487)|(408)")) {
 
    This function can be used from REQUEST_ROUTE and BRANCH_ROUTE .
 
-   Example 1.25. t_flush_flags usage
+   Example 1.24. t_flush_flags usage
 ...
 t_flush_flags();
 ...
@@ -743,7 +725,7 @@ t_flush_flags();
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
    FAILURE_ROUTE and ONREPLY_ROUTE.
 
-   Example 1.26. t_local_replied usage
+   Example 1.25. t_local_replied usage
 ...
 if (t_local_replied("all")) {
         log ("no reply received\n");
@@ -759,7 +741,7 @@ if (t_local_replied("all")) {
    This functions can be used from REQUEST_ROUTE, FAILURE_ROUTE
    and BRANCH_ROUTE.
 
-   Example 1.27. t_write_fifo/unix usage
+   Example 1.26. t_write_fifo/unix usage
 ...
 modparam("tm","tw_append","append1:Email=avp[i:12];UA=hdr[User-Agent]")
 modparam("tm","tw_append","append2:body=msg[body]")
@@ -786,7 +768,7 @@ t_write_unix("logger/append2","/var/run/logger.sock");
 
    This function can be used from REQUEST_ROUTE and BRANCH_ROUTE.
 
-   Example 1.28. t_check_trans usage
+   Example 1.27. t_check_trans usage
 ...
 if ( is_method("CANCEL") ) {
         if ( t_check_trans() )
@@ -802,7 +784,7 @@ if ( is_method("CANCEL") ) {
 
    This function can be used from ONREPLY_ROUTE, FAILURE_ROUTE.
 
-   Example 1.29. t_was_cancelled usage
+   Example 1.28. t_was_cancelled usage
 ...
 if (t_was_cancelled()) {
     log("transaction was cancelled by UAC\n");
@@ -836,7 +818,7 @@ if (t_was_cancelled()) {
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
    ONREPLY_ROUTE and FAILURE_ROUTE.
 
-   Example 1.30. t_on_failure usage
+   Example 1.29. t_on_failure usage
 ...
 route {
         t_on_failure("1");
@@ -877,7 +859,7 @@ failure_route[1] {
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
    ONREPLY_ROUTE and FAILURE_ROUTE.
 
-   Example 1.31. t_on_reply usage
+   Example 1.30. t_on_reply usage
 ...
 route {
         t_on_reply("1");
@@ -918,7 +900,7 @@ onreply_route[1] {
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
    ONREPLY_ROUTE and FAILURE_ROUTE.
 
-   Example 1.32. t_on_branch usage
+   Example 1.31. t_on_branch usage
 ...
 route {
         t_on_branch("1");

+ 0 - 25
modules_k/tm/doc/tm_admin.xml

@@ -356,31 +356,6 @@ modparam("tm", "T2_timer", 8000)
 		</example>
 	</section>
 
-	<section>
-		<title><varname>noisy_ctimer</varname> (integer)</title>
-		<para>
-		If set, on FR timer INVITE transactions will be explicitly canceled 
-		if possible, silently dropped otherwise. Preferably, it is turned off 
-		to allow very long ringing. This behavior is overridden if a request 
-		is forked, or some functionality explicitly turned it off for a 
-		transaction (like acc does to avoid unaccounted transactions due to 
-		expired timer).
-		</para>
-		<para>
-		<emphasis>
-			Default value is 0 (false).
-		</emphasis>
-		</para>
-		<example>
-		<title>Set <varname>noisy_ctimer</varname> parameter</title>
-		<programlisting format="linespecific">
-...
-modparam("tm", "noisy_ctimer", 1)
-...
-</programlisting>
-		</example>
-	</section>
-
 	<section>
 		<title><varname>ruri_matching</varname> (integer)</title>
 		<para>

+ 0 - 3
modules_k/tm/h_table.h

@@ -176,8 +176,6 @@ struct totag_elem {
 #define T_IS_LOCAL_FLAG         (1<<1)
 /* set to one if you want to disallow silent transaction
    dropping when C timer hits */
-#define T_NOISY_CTIMER_FLAG     (1<<2)
-/* set if a CANCEL was received for the transaction */
 #define T_WAS_CANCELLED_FLAG    (1<<3)
 /* transaction was cancelled hopbyhop */
 #define T_HOPBYHOP_CANCEL_FLAG  (1<<4)
@@ -330,7 +328,6 @@ struct s_table
 
 #define is_invite(_t_)           ((_t_)->flags&T_IS_INVITE_FLAG)
 #define is_local(_t_)            ((_t_)->flags&T_IS_LOCAL_FLAG)
-#define has_noisy_ctimer(_t_)    ((_t_)->flags&T_NOISY_CTIMER_FLAG)
 #define was_cancelled(_t_)       ((_t_)->flags&T_WAS_CANCELLED_FLAG)
 #define is_hopbyhop_cancel(_t_)  ((_t_)->flags&T_HOPBYHOP_CANCEL_FLAG)
 #define no_autoack(_t_)          ((_t_)->flags&T_NO_AUTOACK_FLAG)

+ 0 - 2
modules_k/tm/t_funcs.h

@@ -138,8 +138,6 @@ inline static void _set_fr_retr( struct retr_buf *rb, int retr )
 	if (!fr_avp2timer(&timer)) {
 		LM_DBG("FR_TIMER = %llu\n", timer);
 		set_timer(&rb->fr_timer, FR_TIMER_LIST, &timer);
-		/* Automatically enable noisy_ctimer for the transaction */
-		rb->my_T->flags |= T_NOISY_CTIMER_FLAG;
 	} else {
 		set_timer(&rb->fr_timer, FR_TIMER_LIST, 0);
 	}

+ 4 - 7
modules_k/tm/t_fwd.c

@@ -291,17 +291,14 @@ int add_blind_uac(void)  /*struct cell *t*/
 		LM_ERR("maximum number of branches exceeded\n");
 		return -1;
 	}
-	/* make sure it will be replied */
-	t->flags |= T_NOISY_CTIMER_FLAG;
+
 	t->nr_of_outgoings++;
 	/* start FR timer -- protocol set by default to PROTO_NONE,
-       which means retransmission timer will not be started
-    */
+	   which means retransmission timer will not be started */
 	start_retr(&t->uac[branch].request);
 	/* we are on a timer -- don't need to put on wait on script
-	   clean-up	
-	*/
-	set_kr(REQ_FWDED); 
+	   clean-up */
+	set_kr(REQ_FWDED);
 
 	return 1; /* success */
 }

+ 0 - 1
modules_k/tm/t_reply.c

@@ -1420,7 +1420,6 @@ int reply_received( struct sip_msg  *p_msg )
 				LM_DBG("FR_INV_TIMER = %lld\n", timer);
 				set_timer(&uac->request.fr_timer,
 					FR_INV_TIMER_LIST, &timer);
-				t->flags |= T_NOISY_CTIMER_FLAG;
 			} else {
 				set_timer(& uac->request.fr_timer, FR_INV_TIMER_LIST, 0);
 			}

+ 0 - 31
modules_k/tm/timer.c

@@ -122,7 +122,6 @@ static struct timer detached_timer; /* just to have a value to compare with*/
 #define is_in_timer_list2(_tl) ( (_tl)->timer_list &&  \
 									((_tl)->timer_list!=DETACHED_LIST) )
 
-int noisy_ctimer=0;
 
 
 int timer_group[NR_OF_TIMER_LISTS] =
@@ -316,7 +315,6 @@ inline static void retransmission_handler( struct timer_link *retr_tl )
 
 inline static void final_response_handler( struct timer_link *fr_tl )
 {
-	int silent;
 	struct retr_buf* r_buf;
 	struct cell *t;
 
@@ -363,35 +361,6 @@ inline static void final_response_handler( struct timer_link *fr_tl )
 
 	/* lock reply processing to determine how to proceed reliably */
 	LOCK_REPLIES( t );
-	/* now it can be only a request retransmission buffer;
-	   try if you can simply discard the local transaction 
-	   state without compellingly removing it from the
-	   world */
-	silent=
-		/* not for UACs */
-		!is_local(t)
-		/* invites only */
-		&& is_invite(t)
-		/* parallel forking does not allow silent state discarding */
-		&& t->nr_of_outgoings==1
-		/* on_negativ reply handler not installed -- serial forking 
-		 * could occur otherwise */
-		&& t->on_negative==0
-		/* the same for FAILURE callbacks */
-		&& !has_tran_tmcbs( t, TMCB_ON_FAILURE_RO|TMCB_ON_FAILURE) 
-		/* something received -- we will not be silent on error */
-		&& t->uac[r_buf->branch].last_received>0
-		/* don't go silent if disallowed globally ... */
-		&& noisy_ctimer==0
-		/* ... or for this particular transaction */
-		&& has_noisy_ctimer(t)==0;
-	if (silent) {
-		UNLOCK_REPLIES(t);
-		LM_DBG("transaction silently dropped (%p)\n",t);
-		put_on_wait( t );
-		return;
-	}
-
 	LM_DBG("stop retr. and send CANCEL (%p)\n", t);
 	fake_reply(t, r_buf->branch, 408 );
 

+ 0 - 2
modules_k/tm/tm.c

@@ -194,8 +194,6 @@ static param_export_t params[]={
 		&(timer_id2timeout[RT_T1_TO_1])},
 	{"T2_timer",                  INT_PARAM,
 		&(timer_id2timeout[RT_T2])},
-	{"noisy_ctimer",              INT_PARAM,
-		&noisy_ctimer},
 	{"unix_tx_timeout",           INT_PARAM,
 		&tm_unix_tx_timeout},
 	{"restart_fr_on_each_reply",  INT_PARAM,