Hello,
As you will see I have merged my branch back into master.
These changes add a new event route [tm:branch-failure] to the tm module
which is run when any failure response is received on a transaction.
The event_route uses a new route type BRANCH_ROUTE which limits the
functions that can be run in the route.
The functions t_check_status(), t_next_contact_flow(), t_relay() and
unregister() can be used in this route.
A new pv $T_reply_ruid is accessible in this route which can be used to
unregister a single contact entry.
The following example route can be used on a registrar to handle failed
or invalid flows:
event_route[tm:branch-failure] {
xlog("L_INFO", "event_route[tm:branch-failure]\n");
if (t_check_status("430|403")) {
if (!unregister("location", "$tu", "$T_reply_ruid"))
{
xlog("L_WARN", "failed to unregister $tu with
ruid $T_reply_ruid\n");
}
if (!t_next_contact_flow())
{
xlog("L_INFO", "No more flows\n");
}
else
{
xlog("L_INFO", "Next flow\n");
t_relay();
}
}
}
Any bugs, memory leaks etc. let me know!
Hugh
--
Hugh Waite
Principal Design Engineer
Crocodile RCS Ltd.
Module: kamailio
Branch: master
Commit: dd2c297bbafc5314a91bdb51bf0099d9d4f995b2
URL: https://github.com/kamailio/kamailio/commit/dd2c297bbafc5314a91bdb51bf0099d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-23T14:40:39+01:00
acc_radius: added more info about response code for acc_rad_request()
---
Modified: modules/acc_radius/doc/acc_radius_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/dd2c297bbafc5314a91bdb51bf0099d…
Patch: https://github.com/kamailio/kamailio/commit/dd2c297bbafc5314a91bdb51bf0099d…
---
diff --git a/modules/acc_radius/doc/acc_radius_admin.xml b/modules/acc_radius/doc/acc_radius_admin.xml
index 21860b3..969b7db 100644
--- a/modules/acc_radius/doc/acc_radius_admin.xml
+++ b/modules/acc_radius/doc/acc_radius_admin.xml
@@ -226,7 +226,10 @@ modparam("acc_radius", "rad_time_mode", 1)
Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
- <para><emphasis>comment</emphasis> - Comment to be appended.
+ <para><emphasis>comment</emphasis> - Comment to be appended. The
+ first token can be a SIP response code that it is wanted to
+ be interpreted as event type (e.g., using 200 means the
+ transaction is considered successfully responded).
</para>
</listitem>
</itemizedlist>
@@ -239,6 +242,7 @@ modparam("acc_radius", "rad_time_mode", 1)
...
acc_rad_request("Some comment");
...
+# write record as when the transaction was responded with a 200 code
acc_rad_request("200 From Config");
...
</programlisting>