Module: kamailio
Branch: 5.5
Commit: d8ff1845c34a7f9d8e6911ae3d2055b122eb3b79
URL:
https://github.com/kamailio/kamailio/commit/d8ff1845c34a7f9d8e6911ae3d2055b…
Author: Alan Evans <alan(a)kageds.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-08-19T21:33:47+02:00
kazoo : fix routing of reply events
success events should be routed to onreply_route[]
failure events should be routed to failure_route[]
(cherry picked from commit fb2eee3e175040fef5e76cbed11430976f62df32)
---
Modified: src/modules/kazoo/kz_amqp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d8ff1845c34a7f9d8e6911ae3d2055b…
Patch:
https://github.com/kamailio/kamailio/commit/d8ff1845c34a7f9d8e6911ae3d2055b…
---
diff --git a/src/modules/kazoo/kz_amqp.c b/src/modules/kazoo/kz_amqp.c
index 8076315dfd..5685f5a845 100644
--- a/src/modules/kazoo/kz_amqp.c
+++ b/src/modules/kazoo/kz_amqp.c
@@ -2498,24 +2498,24 @@ void kz_amqp_fire_connection_event(char *event, char* host, char*
zone)
void kz_amqp_cb_ok(kz_amqp_cmd_ptr cmd)
{
- int n = route_lookup(&main_rt, cmd->cb_route);
+ int n = route_lookup(&onreply_rt, cmd->cb_route);
if(n==-1) {
/* route block not found in the configuration file */
return;
}
- struct action *a = main_rt.rlist[n];
+ struct action *a = onreply_rt.rlist[n];
tmb.t_continue(cmd->t_hash, cmd->t_label, a);
ksr_msg_env_reset();
}
void kz_amqp_cb_error(kz_amqp_cmd_ptr cmd)
{
- int n = route_lookup(&main_rt, cmd->err_route);
+ int n = route_lookup(&failure_rt, cmd->err_route);
if(n==-1) {
/* route block not found in the configuration file */
return;
}
- struct action *a = main_rt.rlist[n];
+ struct action *a = failure_rt.rlist[n];
tmb.t_continue(cmd->t_hash, cmd->t_label, a);
ksr_msg_env_reset();
}