<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Yes, as YASIN  said, you could look register module. In the following i paste a simple example of definition:</div><div><function>  <br></div><div>  int route_no;<br><br>    if(hi1_eventrb){<br>        route_no = route_get(&main_rt, hi1_eventrb);<br>        if (route_no == -1){<br>            LM_ERR("Failed to hi1 route block number of \"%s\", route_get() function is failed\n", hi1_eventrb);<br>            return -1;<br>        }<br>        if (main_rt.rlist[route_no]==0){<br>            LM_WARN("The hi1 route block \"%s\" is empty, doesn't exist\n",hi1_eventrb);<br>            return -1;<br>        }<br>        LM_DBG("hi1_eventrb is set successfully to %s route block\n", hi1_eventrb);<br>        hi1_eventrb_no = route_no;<br>    }<br>    return 1<br></div><div>=====================================</div><div>And here sipmle example of calling event_route in your code:</div><div>int ret;<br>    struct run_act_ctx ra_ctx;<br>    struct sip_msg *msg;        <br><br><br>    init_run_actions_ctx(&ra_ctx);<br><br>    if (run_actions(&ra_ctx, main_rt.rlist[hi1_eventrb_no], msg) < 0) {<br>        ret = -1;<br>                LM_DBG("Error while trying run script in route block\n");<br>        return ret;<br>    }<br>    return 1;</div><div><br></div><div><br></div><div>With Regards.Mojtaba<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 18, 2019 at 11:07 PM YASIN CANER <<a href="mailto:caner_yaso@hotmail.com">caner_yaso@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div dir="auto">
Hello
<div><br>
</div>
<div>You can look registrar module that has usrloc:contact-expire</div>
<div><br>
</div>
<div>Good luck</div>
<div><br>
</div>
<div>Yasin Caner<br>
<div><br>
Mojtaba <<a href="mailto:mespio@gmail.com" target="_blank">mespio@gmail.com</a>> şunları yazdı (18 Oca 2019 22:34):<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="auto">I'm gone away right now. I'll send for you as soon as</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, 18 Jan 2019, 22:34 Ivan Ribakov, <<a href="mailto:i.ribakov@zaleos.net" target="_blank">i.ribakov@zaleos.net</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">Thanks for the suggestion. I thought about that, but TM module is not one of the smallest. If there is a smaller, simpler model that uses events that someone could recommend I could look into it.
 But in any case, I was looking for something more documented to learn about all capabilities of the events, not just the ones that might be used by some module.
<div>
<div><br>
<blockquote type="cite">
<div>On 18 Jan 2019, at 17:43, Mojtaba <<a href="mailto:mespio@gmail.com" rel="noreferrer" target="_blank">mespio@gmail.com</a>> wrote:</div>
<br class="gmail-m_2523164719710346754m_8063165276181859104Apple-interchange-newline">
<div>
<div dir="auto">Hello Ivan,
<div dir="auto">Actually i haven't seen documentation but there is a good reference for it, the impelemention of modules. You could look around them to find out. It is very strightforwards.</div>
<div dir="auto"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Fri, 18 Jan 2019, 18:57 Ivan Ribakov, <<a href="mailto:i.ribakov@zaleos.net" rel="noreferrer" target="_blank">i.ribakov@zaleos.net</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">Is there any documentation for module developers that lays out API for registering and triggering events from a custom Kamailio module (similar to
<a href="https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes" rel="noreferrer noreferrer" target="_blank">
https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.event_routes</a>)?
<div><br>
</div>
<div>I have been referring to <a href="https://www.kamailio.org/docs/kamailio-devel-guide/" rel="noreferrer noreferrer" target="_blank">https://www.kamailio.org/docs/kamailio-devel-guide/</a> up until now but it doesn’t seem to cover event_routes.</div>
<div><br>
</div>
<div>Thanks in advance,</div>
<div>Ivan</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Kamailio (SER) - Users Mailing List</span><br>
<span><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a></span><br>
<span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br>
</div>
</blockquote>
</div>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">--Mojtaba Esfandiari.S</div>