Module: sip-router
Branch: master
Commit: 989960e3a76e3a993880824aac855f98a3fe1a5a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=989960e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Sep 23 21:48:46 2011 +0200
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
---
modules_k/acc/acc_logic.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules_k/acc/acc_logic.c b/modules_k/acc/acc_logic.c
index d6e6d53..e5033ea 100644
--- a/modules_k/acc/acc_logic.c
+++ b/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) {