|
@@ -4,7 +4,7 @@ Juha Heinanen
|
|
|
|
|
|
TutPro Inc.
|
|
|
|
|
|
- Copyright © 2008-2009 Juha Heinanen
|
|
|
+ Copyright © 2008-2009 Juha Heinanen
|
|
|
__________________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -28,7 +28,6 @@ Juha Heinanen
|
|
|
|
|
|
4.1. http_query(url, result)
|
|
|
4.2. xcap_auth_status(watcher_uri, presentity_uri)
|
|
|
- 4.3. is_int(pvar)
|
|
|
|
|
|
5. MI Commands
|
|
|
|
|
@@ -47,11 +46,10 @@ Juha Heinanen
|
|
|
1.4. Set xcap_table parameter
|
|
|
1.5. http_query() usage
|
|
|
1.6. xcap_auth_status() usage
|
|
|
- 1.7. is_int() usage
|
|
|
- 1.8. forward_list usage
|
|
|
- 1.9. forward_switch usage
|
|
|
- 1.10. forward_filter usage
|
|
|
- 1.11. forward_proxy usage
|
|
|
+ 1.7. forward_list usage
|
|
|
+ 1.8. forward_switch usage
|
|
|
+ 1.9. forward_filter usage
|
|
|
+ 1.10. forward_proxy usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -74,7 +72,6 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
4.1. http_query(url, result)
|
|
|
4.2. xcap_auth_status(watcher_uri, presentity_uri)
|
|
|
- 4.3. is_int(pvar)
|
|
|
|
|
|
5. MI Commands
|
|
|
|
|
@@ -101,7 +98,7 @@ Chapter 1. Admin Guide
|
|
|
deactivated.
|
|
|
|
|
|
Function xcap_auth_status can be used to check from presence server
|
|
|
- database, if watcher is authorized to subscribe event “presence� of
|
|
|
+ database, if watcher is authorized to subscribe event "presence" of
|
|
|
presentity.
|
|
|
|
|
|
2. Dependencies
|
|
@@ -142,7 +139,7 @@ modparam("utils", "http_query_timeout", 2)
|
|
|
|
|
|
Defines if the forwarding callback should be installed.
|
|
|
|
|
|
- Default value is “0�.
|
|
|
+ Default value is "0".
|
|
|
|
|
|
Example 1.2. Set forward_active parameter
|
|
|
...
|
|
@@ -165,7 +162,7 @@ modparam("utils", "pres_db_url", "mysql://foo:secret@localhost/pres")
|
|
|
|
|
|
Defines name of xcap table in presence server database.
|
|
|
|
|
|
- Default value is “xcap�.
|
|
|
+ Default value is "xcap".
|
|
|
|
|
|
Example 1.4. Set xcap_table parameter
|
|
|
...
|
|
@@ -176,15 +173,14 @@ modparam("utils", "xcap_table", "pres_xcap")
|
|
|
|
|
|
4.1. http_query(url, result)
|
|
|
4.2. xcap_auth_status(watcher_uri, presentity_uri)
|
|
|
- 4.3. is_int(pvar)
|
|
|
|
|
|
-4.1. http_query(url, result)
|
|
|
+4.1. http_query(url, result)
|
|
|
|
|
|
- Sends HTTP GET request according to URL given in “url� parameter, which
|
|
|
+ Sends HTTP GET request according to URL given in "url" parameter, which
|
|
|
is a string that may contain pseudo variables.
|
|
|
|
|
|
If HTTP server returns a class 2xx or 3xx reply, first line of reply's
|
|
|
- body (if any) is stored in “result� parameter, which must be a writable
|
|
|
+ body (if any) is stored in "result" parameter, which must be a writable
|
|
|
pseudo variable.
|
|
|
|
|
|
Function returns reply code of HTTP reply or -1 if something went
|
|
@@ -203,10 +199,10 @@ switch ($retcode) {
|
|
|
}
|
|
|
...
|
|
|
|
|
|
-4.2. xcap_auth_status(watcher_uri, presentity_uri)
|
|
|
+4.2. xcap_auth_status(watcher_uri, presentity_uri)
|
|
|
|
|
|
Function checks from presence server database if watcher is authorized
|
|
|
- to subscribe event “presence� of presentity. Sphere checking is not
|
|
|
+ to subscribe event "presence" of presentity. Sphere checking is not
|
|
|
included.
|
|
|
|
|
|
Both watcher_uri and presentity_uri are pseudo variables. Function
|
|
@@ -229,20 +225,6 @@ if (method=="MESSAGE") {
|
|
|
}
|
|
|
...
|
|
|
|
|
|
-4.3. is_int(pvar)
|
|
|
-
|
|
|
- Function checks if pvar argument contains integer value and returns 1
|
|
|
- if it does and -1 otherwise.
|
|
|
-
|
|
|
- Function can be used from all kinds of routes.
|
|
|
-
|
|
|
- Example 1.7. is_int() usage
|
|
|
-...
|
|
|
-if (is_int("$var(foo)")) {
|
|
|
- xlog("L_INFO", "variable foo contains integer value\n");
|
|
|
-}
|
|
|
-...
|
|
|
-
|
|
|
5. MI Commands
|
|
|
|
|
|
5.1. forward_list
|
|
@@ -256,7 +238,7 @@ if (is_int("$var(foo)")) {
|
|
|
|
|
|
No parameters.
|
|
|
|
|
|
- Example 1.8. forward_list usage
|
|
|
+ Example 1.7. forward_list usage
|
|
|
...
|
|
|
kamctl fifo forward_list
|
|
|
id switch filter proxy
|
|
@@ -269,7 +251,7 @@ id switch filter proxy
|
|
|
The syntax of this configuration string is described in 1.6.
|
|
|
(switch_setting_list).
|
|
|
|
|
|
- Example 1.9. forward_switch usage
|
|
|
+ Example 1.8. forward_switch usage
|
|
|
...
|
|
|
kamctl fifo sp_forward_switch 0=on
|
|
|
...
|
|
@@ -288,7 +270,7 @@ kamctl fifo sp_forward_switch 0=on
|
|
|
The syntax of this configuration string is described in 1.6.
|
|
|
(filter_setting_list).
|
|
|
|
|
|
- Example 1.10. forward_filter usage
|
|
|
+ Example 1.9. forward_filter usage
|
|
|
...
|
|
|
kamctl fifo sp_forward_filter 0=REGISTER:INVITE
|
|
|
...
|
|
@@ -301,7 +283,7 @@ kamctl fifo sp_forward_filter 0=REGISTER:INVITE
|
|
|
switch). The syntax of this configuration string is described in 1.6.
|
|
|
(proxy_setting_list).
|
|
|
|
|
|
- Example 1.11. forward_proxy usage
|
|
|
+ Example 1.10. forward_proxy usage
|
|
|
...
|
|
|
kamctl fifo sp_forward_proxy 0=host-c.domain-c:5060
|
|
|
...
|