### Description

I am looking at how to properly handle a problem with duplicate ACC 

This is when `TMCB_ON_FAILURE` and `TMCB_RESPONSE_OUT` are both called, they 
are not using the same version of the message.
`TMCB_ON_FAILURE` is using the cloned version
`TMCB_RESPONSE_OUT` is using the original version

They are not sharing the message flags and 2 ACC events are generated.

Since this is very sensitive, I want to make sure I can trace the real root 
cause.
Not sure if this is a regression ...

#### Reproduction

Any failed call

#### Debugging Data


```
 0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for 
t(0x7f768b6dac08) event type 2, reply code 404 reqmsg[0x7f768b6dc840] 
rplmsg[0x7f76d096dee8]
 0(4603) ERROR: acc [acc_logic.c:697]: tmcb_func(): 
[TMCB_RESPONSE_IN][0x7f768b6dc840][0x7f76d096dee8]

// reply route execution

 0(4603) ERROR: <core> [core/sip_msg_clone.c:504]: sip_msg_shm_clone(): 
sip_msg_shm_clone[0x7f768b6dc840]>>[0x7f768b6de738]
 0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for 
t(0x7f768b6dac08) event type 128, reply code 404 reqmsg[0x7f768b6de738] 
rplmsg[0x7f76d096dee8]
 0(4603) ERROR: acc [acc_logic.c:694]: tmcb_func(): [TMCB_ON_FAILURE] run 
on_missed [0x7f768b6de738][0x7f76d096dee8] // working with the cloned message
 0(4603) ERROR: <core> [core/flags.c:59]: isflagset(): isflagset[0x7f768b6de738]
 0(4603) ERROR: acc_json [acc_json_mod.c:189]: acc_json_send_request(): missed 
call flag [7] for this transaction [on]

// failure route execution, we are working with the cloned message
 0(4603) NOTICE: <script>: [FAILURE]
 0(4603) ERROR: <core> [core/flags.c:46]: setflag(): setflag[0x7f768b6de738]
// failure

 0(4603) NOTICE: acc [acc_logic.c:686]: tmcb_func(): acc callback called for 
t(0x7f768b6dac08) event type 512, reply code 404 reqmsg[0x7f768b6dc840] 
rplmsg[0x7f76d096dee8]
 0(4603) ERROR: acc [acc_logic.c:689]: tmcb_func(): 
[TMCB_RESPONSE_OUT][0x7f768b6dc840][0x7f76d096dee8] // working with the 
original message
 0(4603) ERROR: <core> [core/flags.c:59]: isflagset(): isflagset[0x7f768b6dc840]
 0(4603) ERROR: acc_json [acc_json_mod.c:189]: acc_json_send_request(): missed 
call flag [7] for this transaction [on]
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1673
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to