From notifications@github.com Wed Oct 10 22:54:05 2018 From: Julien Chavanton To: sr-dev@lists.kamailio.org Subject: [sr-dev] [kamailio/kamailio] acc: generating duplicates on missed / failed calls (#1673) Date: Wed, 10 Oct 2018 13:53:57 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1965773721==" --===============1965773721== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable ### Description I am looking at how to properly handle a problem with duplicate ACC=20 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 c= ause. 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][0x7f76= 8b6dc840][0x7f76d096dee8] // reply route execution 0(4603) ERROR: [core/sip_msg_clone.c:504]: sip_msg_shm_clone(): sip_m= sg_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] rplms= g[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/flags.c:59]: isflagset(): isflagset[0x7f768b6de7= 38] 0(4603) ERROR: acc_json [acc_json_mod.c:189]: acc_json_send_request(): misse= d call flag [7] for this transaction [on] // failure route execution, we are working with the cloned message 0(4603) NOTICE: