Cnxcc call termination is not working anymore since commit 265dc95aac8eb4b5cee7992dde55ff08c92a7ac5. That commit introduced the call to DLGCB_TERMINATED callbacks for the locally generated BYE, which leads to a deadlock in cnxcc when it tries to end the calls because the credit (money or time) is exhausted. This patch introduces a new structure cnxcc_lock which implements re-entrant locks. As a side question I'm wondering if, since other modules need re-entrant locks, this structure should be defined in lock_ops.h like the other kamailio's locks. You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/398
-- Commit Summary --
* cnxcc: make cnxcc locks re-entrant
-- File Changes --
M modules/cnxcc/cnxcc_check.c (33) M modules/cnxcc/cnxcc_mod.c (182) M modules/cnxcc/cnxcc_mod.h (56) M modules/cnxcc/cnxcc_redis.c (4) M modules/cnxcc/cnxcc_rpc.c (26)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/398.patch https://github.com/kamailio/kamailio/pull/398.diff
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398
Merged #398.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398#event-464790376
Thank you for the path! I've been having no time to fix the issues that has been reported for cnxcc, so this one comes in a perfect time, thanks!
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398#issuecomment-156815872
You're welcome!
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398#issuecomment-156943941
Shouldn't the patch be backported to 4.3, since the issue is present there too?
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398#issuecomment-157066865
I had it in mind to ask in the morning, when I did some backports, but got caught in other projects. Go ahead and do it.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/398#issuecomment-157067145