<p></p>
<p><b>@tao-communications</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2324#discussion_r428156739">src/modules/kazoo/kazoo.c</a>:</p>
<pre style='color:#555'>> -    rt = route_get(&event_rt, "kazoo:mod-init");
-       if(rt>=0 && event_rt.rlist[rt]!=NULL) {
-               LM_DBG("executing event_route[kazoo:mod-init] (%d)\n", rt);
-               if(faked_msg_init()<0)
-                       return -1;
-               fmsg = faked_msg_next();
-               rtb = get_route_type();
-               set_route_type(REQUEST_ROUTE);
-               init_run_actions_ctx(&ctx);
-               run_top_route(event_rt.rlist[rt], fmsg, &ctx);
-               if(ctx.run_flags&DROP_R_F)
-               {
-                       LM_ERR("exit due to 'drop' in event route\n");
-                       return -1;
+       if (kazoo_route_no>=0) {
+               rt = route_get(&event_rt, "kazoo:mod-init");
+        if(rt>=0 && event_rt.rlist[rt]!=NULL) {
+                       LM_DBG("executing event_route[kazoo:mod-init] (%d)\n", rt);
+                       if(faked_msg_init()<0)
+                               return -1;
+                       fmsg = faked_msg_next();
+                       rtb = get_route_type();
+                       set_route_type(REQUEST_ROUTE);
+                       init_run_actions_ctx(&ctx);
+                       run_top_route(event_rt.rlist[rt], fmsg, &ctx);
+                       if(ctx.run_flags&DROP_R_F)
+                       {
+                               LM_ERR("exit due to 'drop' in event route\n");
+                               return -1;
+                       }
+                       set_route_type(rtb);
+               }
+       } 
+  else {
+               keng = sr_kemi_eng_get();
+               if(keng!=NULL) {
+                       sip_msg_t *msg;
+                       str evrtname = str_init("kazoo:mod-init");
+                       rtb = get_route_type();
+                       msg = faked_msg_next();
+                       if(sr_kemi_route(keng, msg, EVENT_ROUTE, &kazoo_event_callback, &evrtname)<0) {
+                               LM_ERR("error running event route kemi callback\n");
+                 }
+                 set_route_type(rtb);
+               } 
+    else {
+                       LM_ERR("no event route or kemi callback found for execution\n");
</pre>
<pre><code>Now depending on using cfg or kemi:
 - fire_init_event() calls fire_init_event_cfg() or fire_init_event_kemi()
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2324#discussion_r428156739">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJM7BXKNFOXYXSYGU3RSQB4RANCNFSM4M6AZYHA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNHI2WYSFHQJOMCSCLRSQB4RA5CNFSM4M6AZYHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODDCGGKQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2324#discussion_r428156739",
"url": "https://github.com/kamailio/kamailio/pull/2324#discussion_r428156739",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>