Procházet zdrojové kódy

acc: enable TM failure callback for missed calls when acc_prepare_flag is set

- allow recording missed calls even the flag for it is set first time in
  TM-specific routes
- reported by Ozren Lapcevic
Daniel-Constantin Mierla před 14 roky
rodič
revize
989960e3a7
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      modules_k/acc/acc_logic.c

+ 4 - 1
modules_k/acc/acc_logic.c

@@ -245,7 +245,8 @@ void acc_onreq( struct cell* t, int type, struct tmcb_params *ps )
 			/* get incoming replies ready for processing */
 			TMCB_RESPONSE_IN |
 			/* report on missed calls */
-			((is_invite && is_mc_on(ps->req))?TMCB_ON_FAILURE:0) ;
+			((is_invite && (is_mc_on(ps->req)
+					|| is_acc_prepare_on(ps->req)))?TMCB_ON_FAILURE:0);
 		if (tmb.register_tmcb( 0, t, tmcb_types, tmcb_func, 0, 0 )<=0) {
 			LM_ERR("cannot register additional callbacks\n");
 			return;
@@ -493,6 +494,8 @@ int acc_api_exec(struct sip_msg *rq, acc_engine_t *eng,
 
 static void tmcb_func( struct cell* t, int type, struct tmcb_params *ps )
 {
+	LM_DBG("acc callback called for t(%p) event type %d, reply code %d\n",
+			t, type, ps->code);
 	if (type&TMCB_RESPONSE_OUT) {
 		acc_onreply( t, ps->req, ps->rpl, ps->code);
 	} else if (type&TMCB_E2EACK_IN) {