|
@@ -10,8 +10,8 @@ Bogdan-Andrei Iancu
|
|
|
|
|
|
Copyright © 2006 voice-system.ro
|
|
|
Revision History
|
|
|
- Revision $Revision$ $Date: 2008-03-19 20:31:30 +0100
|
|
|
- (Mi, 19 Mär 2008) $
|
|
|
+ Revision $Revision$ $Date: 2008-03-19 21:31:30 +0200
|
|
|
+ (Wed, 19 Mar 2008) $
|
|
|
__________________________________________________________
|
|
|
|
|
|
Table of Contents
|
|
@@ -39,27 +39,28 @@ Bogdan-Andrei Iancu
|
|
|
1.5.9. db_url (string)
|
|
|
1.5.10. db_mode (integer)
|
|
|
1.5.11. db_update_period (integer)
|
|
|
- 1.5.12. table_name (string)
|
|
|
- 1.5.13. callid_column (string)
|
|
|
- 1.5.14. from_uri_column (string)
|
|
|
- 1.5.15. from_tag_column (string)
|
|
|
- 1.5.16. to_uri_column (string)
|
|
|
- 1.5.17. to_tag_column (string)
|
|
|
- 1.5.18. caller_cseq_column (string)
|
|
|
- 1.5.19. callee_cseq_column (string)
|
|
|
- 1.5.20. caller_route_column (string)
|
|
|
- 1.5.21. callee_route_column (string)
|
|
|
- 1.5.22. caller_contact_column (string)
|
|
|
- 1.5.23. callee_contact_column (string)
|
|
|
- 1.5.24. caller_sock_column (string)
|
|
|
- 1.5.25. callee_sock_column (string)
|
|
|
- 1.5.26. h_id_column (string)
|
|
|
- 1.5.27. h_entry_column (string)
|
|
|
- 1.5.28. state_column (string)
|
|
|
- 1.5.29. start_time_column (string)
|
|
|
- 1.5.30. timeout_column (string)
|
|
|
- 1.5.31. profiles_with_value (string)
|
|
|
- 1.5.32. profiles_no_value (string)
|
|
|
+ 1.5.12. db_fetch_rows (integer)
|
|
|
+ 1.5.13. table_name (string)
|
|
|
+ 1.5.14. callid_column (string)
|
|
|
+ 1.5.15. from_uri_column (string)
|
|
|
+ 1.5.16. from_tag_column (string)
|
|
|
+ 1.5.17. to_uri_column (string)
|
|
|
+ 1.5.18. to_tag_column (string)
|
|
|
+ 1.5.19. caller_cseq_column (string)
|
|
|
+ 1.5.20. callee_cseq_column (string)
|
|
|
+ 1.5.21. caller_route_column (string)
|
|
|
+ 1.5.22. callee_route_column (string)
|
|
|
+ 1.5.23. caller_contact_column (string)
|
|
|
+ 1.5.24. callee_contact_column (string)
|
|
|
+ 1.5.25. caller_sock_column (string)
|
|
|
+ 1.5.26. callee_sock_column (string)
|
|
|
+ 1.5.27. h_id_column (string)
|
|
|
+ 1.5.28. h_entry_column (string)
|
|
|
+ 1.5.29. state_column (string)
|
|
|
+ 1.5.30. start_time_column (string)
|
|
|
+ 1.5.31. timeout_column (string)
|
|
|
+ 1.5.32. profiles_with_value (string)
|
|
|
+ 1.5.33. profiles_no_value (string)
|
|
|
|
|
|
1.6. Exported Functions
|
|
|
|
|
@@ -111,30 +112,31 @@ Bogdan-Andrei Iancu
|
|
|
1.9. Set db_url parameter
|
|
|
1.10. Set db_mode parameter
|
|
|
1.11. Set db_update_period parameter
|
|
|
- 1.12. Set table_name parameter
|
|
|
- 1.13. Set callid_column parameter
|
|
|
- 1.14. Set from_uri_column parameter
|
|
|
- 1.15. Set from_tag_column parameter
|
|
|
- 1.16. Set to_uri_column parameter
|
|
|
- 1.17. Set to_tag_column parameter
|
|
|
- 1.18. Set caller_cseq_column parameter
|
|
|
- 1.19. Set callee_cseq_column parameter
|
|
|
- 1.20. Set caller_route_column parameter
|
|
|
- 1.21. Set to_route_column parameter
|
|
|
- 1.22. Set caller_contact_column parameter
|
|
|
- 1.23. Set callee_contact_column parameter
|
|
|
- 1.24. Set caller_sock_column parameter
|
|
|
- 1.25. Set callee_sock_column parameter
|
|
|
- 1.26. Set h_id_column parameter
|
|
|
- 1.27. Set h_entry_column parameter
|
|
|
- 1.28. Set state_column parameter
|
|
|
- 1.29. Set start_time_column parameter
|
|
|
- 1.30. Set timeout_column parameter
|
|
|
- 1.31. Set profiles_with_value parameter
|
|
|
- 1.32. Set profiles_no_value parameter
|
|
|
- 1.33. set_dlg_profile usage
|
|
|
- 1.34. is_in_profile usage
|
|
|
- 1.35. get_profile_size usage
|
|
|
+ 1.12. Set db_fetch_rows parameter
|
|
|
+ 1.13. Set table_name parameter
|
|
|
+ 1.14. Set callid_column parameter
|
|
|
+ 1.15. Set from_uri_column parameter
|
|
|
+ 1.16. Set from_tag_column parameter
|
|
|
+ 1.17. Set to_uri_column parameter
|
|
|
+ 1.18. Set to_tag_column parameter
|
|
|
+ 1.19. Set caller_cseq_column parameter
|
|
|
+ 1.20. Set callee_cseq_column parameter
|
|
|
+ 1.21. Set caller_route_column parameter
|
|
|
+ 1.22. Set to_route_column parameter
|
|
|
+ 1.23. Set caller_contact_column parameter
|
|
|
+ 1.24. Set callee_contact_column parameter
|
|
|
+ 1.25. Set caller_sock_column parameter
|
|
|
+ 1.26. Set callee_sock_column parameter
|
|
|
+ 1.27. Set h_id_column parameter
|
|
|
+ 1.28. Set h_entry_column parameter
|
|
|
+ 1.29. Set state_column parameter
|
|
|
+ 1.30. Set start_time_column parameter
|
|
|
+ 1.31. Set timeout_column parameter
|
|
|
+ 1.32. Set profiles_with_value parameter
|
|
|
+ 1.33. Set profiles_no_value parameter
|
|
|
+ 1.34. set_dlg_profile usage
|
|
|
+ 1.35. is_in_profile usage
|
|
|
+ 1.36. get_profile_size usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
@@ -370,251 +372,267 @@ modparam("dialog", "db_mode", 1)
|
|
|
modparam("dialog", "db_update_period", 120)
|
|
|
...
|
|
|
|
|
|
-1.5.12. table_name (string)
|
|
|
+1.5.12. db_fetch_rows (integer)
|
|
|
+
|
|
|
+ The number of the rows to be fetched at once from database when
|
|
|
+ loading the dialog records at startup from the database. This
|
|
|
+ value can be used to tune the load time at startup. For 1MB of
|
|
|
+ private memory (default) it should be below 400. The database
|
|
|
+ driver must support fetch_result() capability. A value of 0
|
|
|
+ means the functionality is disabled.
|
|
|
+
|
|
|
+ Default value is "200".
|
|
|
+
|
|
|
+ Example 1.12. Set db_fetch_rows parameter
|
|
|
+...
|
|
|
+modparam("dialog", "db_fetch_rows", 500)
|
|
|
+...
|
|
|
+
|
|
|
+1.5.13. table_name (string)
|
|
|
|
|
|
If you want to store the information about the dialogs in a
|
|
|
database a table name must be specified.
|
|
|
|
|
|
Default value is "dialog".
|
|
|
|
|
|
- Example 1.12. Set table_name parameter
|
|
|
+ Example 1.13. Set table_name parameter
|
|
|
...
|
|
|
modparam("dialog", "table_name", "my_dialog")
|
|
|
...
|
|
|
|
|
|
-1.5.13. callid_column (string)
|
|
|
+1.5.14. callid_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs' callid.
|
|
|
|
|
|
Default value is "callid".
|
|
|
|
|
|
- Example 1.13. Set callid_column parameter
|
|
|
+ Example 1.14. Set callid_column parameter
|
|
|
...
|
|
|
modparam("dialog", "callid_column", "callid_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.14. from_uri_column (string)
|
|
|
+1.5.15. from_uri_column (string)
|
|
|
|
|
|
The column's name in the database to store the caller's sip
|
|
|
address.
|
|
|
|
|
|
Default value is "from_uri".
|
|
|
|
|
|
- Example 1.14. Set from_uri_column parameter
|
|
|
+ Example 1.15. Set from_uri_column parameter
|
|
|
...
|
|
|
modparam("dialog", "from_uri_column", "from_uri_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.15. from_tag_column (string)
|
|
|
+1.5.16. from_tag_column (string)
|
|
|
|
|
|
The column's name in the database to store the From tag from
|
|
|
the Invite request.
|
|
|
|
|
|
Default value is "from_tag".
|
|
|
|
|
|
- Example 1.15. Set from_tag_column parameter
|
|
|
+ Example 1.16. Set from_tag_column parameter
|
|
|
...
|
|
|
modparam("dialog", "from_tag_column", "from_tag_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.16. to_uri_column (string)
|
|
|
+1.5.17. to_uri_column (string)
|
|
|
|
|
|
The column's name in the database to store the calee's sip
|
|
|
address.
|
|
|
|
|
|
Default value is "to_uri".
|
|
|
|
|
|
- Example 1.16. Set to_uri_column parameter
|
|
|
+ Example 1.17. Set to_uri_column parameter
|
|
|
...
|
|
|
modparam("dialog", "to_uri_column", "to_uri_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.17. to_tag_column (string)
|
|
|
+1.5.18. to_tag_column (string)
|
|
|
|
|
|
The column's name in the database to store the To tag from the
|
|
|
200 OK response to the Invite request, if present.
|
|
|
|
|
|
Default value is "to_tag".
|
|
|
|
|
|
- Example 1.17. Set to_tag_column parameter
|
|
|
+ Example 1.18. Set to_tag_column parameter
|
|
|
...
|
|
|
modparam("dialog", "to_tag_column", "to_tag_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.18. caller_cseq_column (string)
|
|
|
+1.5.19. caller_cseq_column (string)
|
|
|
|
|
|
The column's name in the database to store the cseq from caller
|
|
|
side.
|
|
|
|
|
|
Default value is "caller_cseq".
|
|
|
|
|
|
- Example 1.18. Set caller_cseq_column parameter
|
|
|
+ Example 1.19. Set caller_cseq_column parameter
|
|
|
...
|
|
|
modparam("dialog", "caller_cseq_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.19. callee_cseq_column (string)
|
|
|
+1.5.20. callee_cseq_column (string)
|
|
|
|
|
|
The column's name in the database to store the cseq from callee
|
|
|
side.
|
|
|
|
|
|
Default value is "callee_cseq".
|
|
|
|
|
|
- Example 1.19. Set callee_cseq_column parameter
|
|
|
+ Example 1.20. Set callee_cseq_column parameter
|
|
|
...
|
|
|
modparam("dialog", "callee_cseq_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.20. caller_route_column (string)
|
|
|
+1.5.21. caller_route_column (string)
|
|
|
|
|
|
The column's name in the database to store the route records
|
|
|
from caller side (proxy to caller).
|
|
|
|
|
|
Default value is "caller_route_set".
|
|
|
|
|
|
- Example 1.20. Set caller_route_column parameter
|
|
|
+ Example 1.21. Set caller_route_column parameter
|
|
|
...
|
|
|
modparam("dialog", "caller_route_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.21. callee_route_column (string)
|
|
|
+1.5.22. callee_route_column (string)
|
|
|
|
|
|
The column's name in the database to store the route records
|
|
|
from callee side (proxy to callee).
|
|
|
|
|
|
Default value is "callee_route_set".
|
|
|
|
|
|
- Example 1.21. Set to_route_column parameter
|
|
|
+ Example 1.22. Set to_route_column parameter
|
|
|
...
|
|
|
modparam("dialog", "to_route_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.22. caller_contact_column (string)
|
|
|
+1.5.23. caller_contact_column (string)
|
|
|
|
|
|
The column's name in the database to store the caller's contact
|
|
|
uri.
|
|
|
|
|
|
Default value is "from_contact".
|
|
|
|
|
|
- Example 1.22. Set caller_contact_column parameter
|
|
|
+ Example 1.23. Set caller_contact_column parameter
|
|
|
...
|
|
|
modparam("dialog", "caller_contact_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.23. callee_contact_column (string)
|
|
|
+1.5.24. callee_contact_column (string)
|
|
|
|
|
|
The column's name in the database to store the callee's contact
|
|
|
uri.
|
|
|
|
|
|
Default value is "callee_contact".
|
|
|
|
|
|
- Example 1.23. Set callee_contact_column parameter
|
|
|
+ Example 1.24. Set callee_contact_column parameter
|
|
|
...
|
|
|
modparam("dialog", "callee_contact_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.24. caller_sock_column (string)
|
|
|
+1.5.25. caller_sock_column (string)
|
|
|
|
|
|
The column's name in the database to store the information
|
|
|
about the local interface receiving the traffic from caller.
|
|
|
|
|
|
Default value is "caller_sock".
|
|
|
|
|
|
- Example 1.24. Set caller_sock_column parameter
|
|
|
+ Example 1.25. Set caller_sock_column parameter
|
|
|
...
|
|
|
modparam("dialog", "caller_sock_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.25. callee_sock_column (string)
|
|
|
+1.5.26. callee_sock_column (string)
|
|
|
|
|
|
The column's name in the database to store information about
|
|
|
the local interface receiving the traffic from callee.
|
|
|
|
|
|
Default value is "callee_contact".
|
|
|
|
|
|
- Example 1.25. Set callee_sock_column parameter
|
|
|
+ Example 1.26. Set callee_sock_column parameter
|
|
|
...
|
|
|
modparam("dialog", "callee_sock_column", "column_name")
|
|
|
...
|
|
|
|
|
|
-1.5.26. h_id_column (string)
|
|
|
+1.5.27. h_id_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs' hash id
|
|
|
information.
|
|
|
|
|
|
Default value is "hash_id".
|
|
|
|
|
|
- Example 1.26. Set h_id_column parameter
|
|
|
+ Example 1.27. Set h_id_column parameter
|
|
|
...
|
|
|
modparam("dialog", "h_id_column", "hash_id_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.27. h_entry_column (string)
|
|
|
+1.5.28. h_entry_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs' hash
|
|
|
entry information.
|
|
|
|
|
|
Default value is "hash_entry".
|
|
|
|
|
|
- Example 1.27. Set h_entry_column parameter
|
|
|
+ Example 1.28. Set h_entry_column parameter
|
|
|
...
|
|
|
modparam("dialog", "h_entry_column", "h_entry_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.28. state_column (string)
|
|
|
+1.5.29. state_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs' state
|
|
|
information.
|
|
|
|
|
|
Default value is "state".
|
|
|
|
|
|
- Example 1.28. Set state_column parameter
|
|
|
+ Example 1.29. Set state_column parameter
|
|
|
...
|
|
|
modparam("dialog", "state_column", "state_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.29. start_time_column (string)
|
|
|
+1.5.30. start_time_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs' start
|
|
|
time information.
|
|
|
|
|
|
Default value is "start_time".
|
|
|
|
|
|
- Example 1.29. Set start_time_column parameter
|
|
|
+ Example 1.30. Set start_time_column parameter
|
|
|
...
|
|
|
modparam("dialog", "start_time_column", "start_time_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.30. timeout_column (string)
|
|
|
+1.5.31. timeout_column (string)
|
|
|
|
|
|
The column's name in the database to store the dialogs'
|
|
|
timeout.
|
|
|
|
|
|
Default value is "timeout".
|
|
|
|
|
|
- Example 1.30. Set timeout_column parameter
|
|
|
+ Example 1.31. Set timeout_column parameter
|
|
|
...
|
|
|
modparam("dialog", "timeout_column", "timeout_c_name")
|
|
|
...
|
|
|
|
|
|
-1.5.31. profiles_with_value (string)
|
|
|
+1.5.32. profiles_with_value (string)
|
|
|
|
|
|
List of names for profiles with values.
|
|
|
|
|
|
Default value is "empty".
|
|
|
|
|
|
- Example 1.31. Set profiles_with_value parameter
|
|
|
+ Example 1.32. Set profiles_with_value parameter
|
|
|
...
|
|
|
modparam("dialog", "profiles_with_value", "caller ; my_profile")
|
|
|
...
|
|
|
|
|
|
-1.5.32. profiles_no_value (string)
|
|
|
+1.5.33. profiles_no_value (string)
|
|
|
|
|
|
List of names for profiles without values.
|
|
|
|
|
|
Default value is "empty".
|
|
|
|
|
|
- Example 1.32. Set profiles_no_value parameter
|
|
|
+ Example 1.33. Set profiles_no_value parameter
|
|
|
...
|
|
|
modparam("dialog", "profiles_no_value", "inbound ; outbound")
|
|
|
...
|
|
@@ -637,7 +655,7 @@ modparam("dialog", "profiles_no_value", "inbound ; outbound")
|
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
|
|
|
REPLY_ROUTE and FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.33. set_dlg_profile usage
|
|
|
+ Example 1.34. set_dlg_profile usage
|
|
|
...
|
|
|
set_dlg_profile("inbound_call");
|
|
|
set_dlg_profile("caller","$fu");
|
|
@@ -661,7 +679,7 @@ set_dlg_profile("caller","$fu");
|
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
|
|
|
REPLY_ROUTE and FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.34. is_in_profile usage
|
|
|
+ Example 1.35. is_in_profile usage
|
|
|
...
|
|
|
if (is_in_profile("inbound_call")) {
|
|
|
log("this request belongs to a inbound call\n");
|
|
@@ -692,7 +710,7 @@ if (is_in_profile("caller","XX")) {
|
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
|
|
|
REPLY_ROUTE and FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.35. get_profile_size usage
|
|
|
+ Example 1.36. get_profile_size usage
|
|
|
...
|
|
|
get_profile_size("inbound_call","$avp(size)");
|
|
|
xlog("currently there are $avp(size) inbound calls\n");
|