Module: kamailio
Branch: master
Commit: e48655dd638eed8bbbd8d6087363dbdeb45a451c
URL:
https://github.com/kamailio/kamailio/commit/e48655dd638eed8bbbd8d6087363dbd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-29T10:35:58+02:00
topoh: docs for event_mode param and msg-sending event route
---
Modified: src/modules/topoh/doc/topoh_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/e48655dd638eed8bbbd8d6087363dbd…
Patch:
https://github.com/kamailio/kamailio/commit/e48655dd638eed8bbbd8d6087363dbd…
---
diff --git a/src/modules/topoh/doc/topoh_admin.xml
b/src/modules/topoh/doc/topoh_admin.xml
index 857813585b..ff98338f02 100644
--- a/src/modules/topoh/doc/topoh_admin.xml
+++ b/src/modules/topoh/doc/topoh_admin.xml
@@ -308,6 +308,27 @@ function ksr_topoh_event(evname)
return 1;
end
...
+</programlisting>
+ </example>
+ </section>
+ <section id="topoh.p.event_mode">
+ <title><varname>event_mode</varname> (int)</title>
+ <para>
+ Control what event_route blocks to be executed. It is a bitmask of:
+ 1 - execute event_route[topoh:msg-outgoing]; 2 - execute
+ event_route[topoh:msg-sending].
+ </para>
+ <para>
+ <emphasis>
+ Default value is 3 (execute both event_route blocks).
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>event_mode</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("topoh", "event_mode", 2)
+...
</programlisting>
</example>
</section>
@@ -315,7 +336,7 @@ end
<section>
<title>Event Routes</title>
- <section>
+ <section id="topoh.e.msg_outgoing">
<title>event_route[topoh:msg-outgoing]</title>
<para>
It is executed before doing topology hiding processing for an outgoing
@@ -339,6 +360,30 @@ event_route[topoh:msg-outgoing] {
}
}
...
+</programlisting>
+ </example>
+ </section>
+ <section id="topoh.e.msg_sending">
+ <title>event_route[topoh:msg-sending]</title>
+ <para>
+ It is executed before doing topology hiding processing for a SIP
+ message to be sent out, being executed after event_route[topoh:msg-outgoing].
+ </para>
+ <para>
+ Inside the event route the variables $sndto(ip), $sndto(port) and
+ $sndto(proto) point to the destination. The SIP message is the one
+ to be sent out.
+ </para>
+ <example>
+ <title>Usage of event_route[topoh:msg-sending]</title>
+ <programlisting format="linespecific">
+...
+event_route[topoh:msg-sending] {
+ if(is_request() and $fU=="alice") {
+ drop;
+ }
+}
+...
</programlisting>
</example>
</section>