Hi,
I have the following weird problem. A Kamailio (5.4.x) with some asynchronous permission
logic suspends outgoing INVITEs and resumes them after the answer of the permission
system. Everything works as expected when the call is answered. However, when the called
party rejects the call (with a 486 for example), the call doesn't get torn down
immediately (it is rejected with a 408 eventually) because Kamailio logs the following:
Nov 23 14:51:02 host /usr/sbin/kamailio[1569]: DEBUG: app_python [apy_kemi.c:106]:
sr_kemi_config_engine_python(): execution of route type 4 with name [ksr_onreply_manage]
returned 1
Nov 23 14:51:02 host /usr/sbin/kamailio[1569]: DEBUG: tm [t_reply.c:1363]:
t_should_relay_response(): ->>>>>>>>> T_code=183, new_code=486
Nov 23 14:51:02 host /usr/sbin/kamailio[1569]: DEBUG: tm [t_reply.c:1448]:
t_should_relay_response(): store - other branches still active
Nov 23 14:51:02 host /usr/sbin/kamailio[1569]: DEBUG: tm [t_reply.c:1926]: relay_reply():
reply status=3 branch=2, save=1, relay=-1 icode=0 msg status=486
I don't do any forking, the call is just forwarded.
I put the following line immediately after t_suspend() and in the beginning of the route
specified in t_continue():
KSR.info("We're at branch index %d" %
KSR.pv.get("$T(branch_index)"))
This produces the following output:
Nov 23 16:30:13 host /usr/sbin/kamailio[2745]: INFO: <core> [core/kemi.c:104]:
sr_kemi_core_info(): We're at branch index 0
Nov 23 16:30:13 host /usr/sbin/kamailio[2725]: INFO: <core> [core/kemi.c:104]:
sr_kemi_core_info(): We're at branch index 2
So apparently, the suspend and continue introduce new branches. (Other option: I'm
doing something completely different creating those branches, but I don't have any
append_branch() or similar in my code.)
I assume, I just missed a configuration parameter. Can I get Kamailio somehow to behave as
if there was just one branch and forward the negative reply?
Thanks,
Sebastian