From cf75fdfe99d5683675c7b9016a31ff3c5eb93fe0 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Wed, 24 Jun 2015 13:50:18 +0200 Subject: [PATCH] mtree,tmrec,tmx,uac: refresed the readme --- modules/mtree/README | 32 ++++++++++++++++++++------------ modules/tmrec/README | 8 ++++++++ modules/tmx/README | 2 +- modules/uac/README | 33 ++++++++++++++++++++++++++++++--- 4 files changed, 59 insertions(+), 16 deletions(-) diff --git a/modules/mtree/README b/modules/mtree/README index 28dd6d8ee38..2d2dbedf2ab 100644 --- a/modules/mtree/README +++ b/modules/mtree/README @@ -20,9 +20,9 @@ Juha Heinanen - Copyright (c) 2010 Daniel-Constantin Mierla (asipto.com) + Copyright © 2010 Daniel-Constantin Mierla (asipto.com) - Copyright (c) 2011 Juha Heinanen + Copyright © 2011 Juha Heinanen __________________________________________________________________ Table of Contents @@ -130,8 +130,16 @@ Chapter 1. Admin Guide 1. Overview - This module loads data indexed by prefixes from database and returns - associated string or precompiled value. + This module loads (prefix, value) records from database and indexes + them in a named memory tree. Name of the tree is specified for each + record or as module parameter. + + It exports to configuration file functions to match against in-memory + trees and return the values (raw or precompiled) associated with + matched prefixes. + + The maximum size of the prefix is limited internally to 63, database + table definition may enforce lower maximum size. 2. Dependencies @@ -323,7 +331,7 @@ modparam("mtree", "mt_allow_duplicates", 1) 4.1. mt_match(mtree, pv, mode) -4.1. mt_match(mtree, pv, mode) +4.1. mt_match(mtree, pv, mode) Match 'pv' value against 'mtree'. If 'mtree' type is 0 or 2 and value of 'mode' is NOT 2, sets a value of the longest matching prefix to @@ -347,7 +355,7 @@ mt_match("mytree", "$rU", "0"); 5.3. mt_summary 5.4. mt_match -5.1. mt_list +5.1. mt_list List content of a tree. @@ -361,7 +369,7 @@ mt_match("mytree", "$rU", "0"); _mtname_ _empty_line_ -5.2. mt_reload +5.2. mt_reload Reload mtree from database. @@ -376,7 +384,7 @@ mt_match("mytree", "$rU", "0"); _mtname_ _empty_line_ -5.3. mt_summary +5.3. mt_summary List usage summary for all trees. @@ -388,7 +396,7 @@ mt_match("mytree", "$rU", "0"); :mt_summary:_reply_fifo_file_ _empty_line_ -5.4. mt_match +5.4. mt_match Match prefix value against mtree. @@ -412,7 +420,7 @@ mt_match("mytree", "$rU", "0"); 6.2. mtree.reload 6.3. mtree.match -6.1. mtree.summary +6.1. mtree.summary List usage summary for all trees or for the tree whose name is given as parameter. @@ -420,7 +428,7 @@ mt_match("mytree", "$rU", "0"); Parameters: * _mtree_ - (optional) the name of the tree. -6.2. mtree.reload +6.2. mtree.reload Reload mtree from database to memory. @@ -428,7 +436,7 @@ mt_match("mytree", "$rU", "0"); * _mtree_ - name of mtree or empty string meaning all mtrees -6.3. mtree.match +6.3. mtree.match Match prefix value against mtree diff --git a/modules/tmrec/README b/modules/tmrec/README index 84b7a56c320..35c1a97def0 100644 --- a/modules/tmrec/README +++ b/modules/tmrec/README @@ -16,7 +16,15 @@ Alex Balashov +Edited by + +Richard Fuchs + + + Copyright © 2012 asipto.com + + Copyright © 2012 Sipwise GmbH __________________________________________________________________ Table of Contents diff --git a/modules/tmx/README b/modules/tmx/README index bb3254eb5a4..c417390abb8 100644 --- a/modules/tmx/README +++ b/modules/tmx/README @@ -242,7 +242,7 @@ if (t_cancel_callid("123qaz", "5", "22", "200")) { 4.3. t_reply_callid(callid, cseq, code, reason) - Send reply to first INVITE transaction identified by callid and cseq. + Send reply to first transaction identified by callid and cseq. Parameters:. * callid - call-id value. diff --git a/modules/uac/README b/modules/uac/README index 79070c0e1c6..3df66de3630 100644 --- a/modules/uac/README +++ b/modules/uac/README @@ -180,8 +180,11 @@ Chapter 1. Admin Guide Known limitations in this version: * Authentication does not support qop auth-int, just qop auth; - * CSeq is not increased during authentication - the response may be - rejected. + * CSeq is not increased automatically by uac_auth() during + authentication - the follow up request may be rejected. CSeq can be + increased when authenticating INVITE requests - dialog module has + to be used, with CSeq tracking feature enabled (see the readme of + dialog module). * The "uac_replace_*" functions can only be run once on the same SIP request. Try to save needed changes in a pseudovariable and apply them once. @@ -612,7 +615,31 @@ uac_restore_to(); Example 1.23. uac_auth usage ... -uac_auth(); +modparam("uac","auth_username_avp","$avp(auser)") +modparam("uac","auth_password_avp","$avp(apass)") +modparam("uac","auth_realm_avp","$avp(arealm)") + +request_route { + ... + if(is_method("INVITE")) { + t_on_failure("TRUNKAUTH"); + } + ... +} + +failure_route[TRUNKAUTH] { + + if (t_is_canceled()) { + exit; + } + if(t_check_status("401|407")) { + $avp(auser) = "test"; + $avp(apass) = "test"; + uac_auth(); + t_relay(); + exit; + } +} ... 4.8. uac_req_send()