|
@@ -961,6 +961,37 @@ modparam("registrar", "contact_max_size", 1024)
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
+ <section id="registrar.p.event_callback">
|
|
|
|
+ <title><varname>event_callback</varname> (str)</title>
|
|
|
|
+ <para>
|
|
|
|
+ The name of the function in the KEMI configuration file (embedded
|
|
|
|
+ scripting language such as Lua, Python, ...) to be executed instead
|
|
|
|
+ of event_route[...] blocks.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ The function receives a string parameter with the name of the event.
|
|
|
|
+ The only possible value currently is 'usrloc:contact-expired'.
|
|
|
|
+ </para>
|
|
|
|
+ <para>
|
|
|
|
+ <emphasis>
|
|
|
|
+ Default value is 'empty' (no function is executed for events).
|
|
|
|
+ </emphasis>
|
|
|
|
+ </para>
|
|
|
|
+ <example>
|
|
|
|
+ <title>Set <varname>event_callback</varname> parameter</title>
|
|
|
|
+ <programlisting format="linespecific">
|
|
|
|
+...
|
|
|
|
+modparam("registrar", "event_callback", "ksr_registrar_event")
|
|
|
|
+...
|
|
|
|
+-- event callback function implemented in Lua
|
|
|
|
+function ksr_registrar_event(evname)
|
|
|
|
+ KSR.info( "Expired contact for " .. KSR.pv.getw("$ulc(exp=>aor)") .. "\n");
|
|
|
|
+ return 1;
|
|
|
|
+end
|
|
|
|
+...
|
|
|
|
+ </programlisting>
|
|
|
|
+ </example>
|
|
|
|
+ </section>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
|