Module: sems
Branch: master
Commit: 7cc8b8b265c34ac3f8cf31b9ea04e2e642ae2ba2
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=7cc8b8b265c34ac3f8cf31b9ea04e2e642ae2ba2

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Tue Oct  4 16:00:02 2011 +0200

sbc:cc: some documentation on header based cc

---

 doc/Readme.sbc.txt              |   18 ++++++++++++++++--
 doc/Readme.sbc_call_control.txt |   17 ++++++++++++++++-
 2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/doc/Readme.sbc.txt b/doc/Readme.sbc.txt
index 1402c23..fdeef30 100644
--- a/doc/Readme.sbc.txt
+++ b/doc/Readme.sbc.txt
@@ -361,11 +361,12 @@ the B leg is used (session_expires, minimum_timer etc).
 Call control modules
 --------------------
 Call control (CC) modules for the sbc application implement business logic 
which controls
-how the SBC operates. For example, a CCmodule can implement concurrent call 
limits, call
+how the SBC operates. For example, a CC module can implement concurrent call 
limits, call
 limits per user, enforce other policies, or implement routing logic.
 
 Multiple CC modules may be applied for one call. The data that the CC modules 
get from the
-call may be freely configured.
+call may be freely configured. Call control modules may also be applied 
through message parts
+(replacement patterns).
 
 Example: 
   Limiting From-User to 5 parallel calls, and 90 seconds maximum call duration:
@@ -376,6 +377,19 @@ Example:
     call_timer_module=cc_call_timer
     call_timer_timer=90
 
+Example:
+  Applying 90 seconds maximum call duration and other call control from a 
header:
+    call_control=call_timer,$H(P-CallControl)
+    call_timer_module=cc_call_timer
+    call_timer_timer=90
+
+   SIP message:
+    INVITE sip:[email protected] SIP/2.0
+    From: sip:[email protected];tag=1234
+    To: [email protected]
+    P-CallControl: cc_pcalls;uuid=$rU, cc_pcalls;uuid=a_user
+    ...
+
 See also Readme.sbc_call_control.txt.
 
 Call control: Prepaid
diff --git a/doc/Readme.sbc_call_control.txt b/doc/Readme.sbc_call_control.txt
index c5f6236..ac55835 100644
--- a/doc/Readme.sbc_call_control.txt
+++ b/doc/Readme.sbc_call_control.txt
@@ -30,6 +30,21 @@ substitution patterns, e.g.:
 will pass the contents of the Header named "P-UUID" as value "uuid" and the 
contents of "P-Call-Limit"
 as "max_calls".
 
+Alternatively, call control can also be set through message parts by using 
replacement patterns.
+Example:
+   call_control=cc_pcalls,$H(P-Call-Control)
+
+The header 'P-Call-Control' is a comma separated list of call control 
configurations, with key,value pairs
+appended, i.e. of the form module_name;param=val;param=val. 
+Example: 
+  P-Call-Control: cc_prepaid;uuid=joe, cc_pcalls;uuid=joe;max_calls=10
+
+As usual with multi-value headers, several separate headers may be used, so 
the above example is
+equivalent to:
+  P-Call-Control: cc_prepaid;uuid=joe
+  P-Call-Control: cc_pcalls;uuid=joe;max_calls=10
+
+
 Several CC modules are implemented
   o cc_pcalls         - parallel calls limiting
   o cc_call_timer     - call timer (maximum call duration)
@@ -141,7 +156,7 @@ Synopsis:
     call_profile->cc_vars.erase("mycc::myvar");
 
 If several invocations of the same call control module should be independent 
from each other,
-CC variables may be prefixed by the CC namespace
+CC variables should be prefixed by the CC namespace
 (e.g. args[CC_API_PARAMS_CC_NAMESPACE + "::" + var_name).
 
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to