|
@@ -59,16 +59,16 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
- This module provides asynchornous operations for handling SIP requests
|
|
|
|
- in configuration file.
|
|
|
|
|
|
+ This module provides asynchronous operations for handling SIP requests
|
|
|
|
+ in the configuration file.
|
|
|
|
|
|
- It uses t_suspend() and t_continue() from TM module.
|
|
|
|
|
|
+ Async uses t_suspend() and t_continue() from the TM and TMX modules.
|
|
|
|
|
|
- Note that after invoking the an asyncronous operation, the processing
|
|
|
|
- will continue later, in another application process. Therefore, do not
|
|
|
|
- rely on variables stored in private memory, used shared memory if you
|
|
|
|
- want to get values after the processing is resumend (e.g., $avp(...),
|
|
|
|
- $xavp(...), $shv(...), htable $sht(...)).
|
|
|
|
|
|
+ Note that after invoking the an asynchronous operation, the processing
|
|
|
|
+ will continue later in another application process. Therefore variables
|
|
|
|
+ stored in private memory should not be used, try to use shared memory
|
|
|
|
+ if you want to get values after the processing is resumed (e.g.,
|
|
|
|
+ $avp(...), $xavp(...), $shv(...), htable $sht(...)).
|
|
|
|
|
|
2. Dependencies
|
|
2. Dependencies
|
|
|
|
|
|
@@ -79,6 +79,7 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
The following modules must be loaded before this module:
|
|
The following modules must be loaded before this module:
|
|
* tm - transaction management.
|
|
* tm - transaction management.
|
|
|
|
+ tmx - transaction management extensions.
|
|
|
|
|
|
2.2. External Libraries or Applications
|
|
2.2. External Libraries or Applications
|
|
|
|
|
|
@@ -92,7 +93,7 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
3.1. workers (int)
|
|
3.1. workers (int)
|
|
|
|
|
|
- Number of worker processes to be started to handle the asynchornous
|
|
|
|
|
|
+ Number of worker processes to be started to handle the asynchronous
|
|
tasks.
|
|
tasks.
|
|
|
|
|
|
Default value is 1.
|
|
Default value is 1.
|
|
@@ -109,22 +110,22 @@ modparam("async", "workers", 2)
|
|
|
|
|
|
4.1. async_route(routename, seconds)
|
|
4.1. async_route(routename, seconds)
|
|
|
|
|
|
- Simulate a sleep of 'seconds' and then continue the processing of SIP
|
|
|
|
- request with the route[routename]. In case of internal errors, the
|
|
|
|
|
|
+ Simulate a sleep of 'seconds' and then continue the processing of the
|
|
|
|
+ SIP request with the route[routename]. In case of internal errors, the
|
|
function returns false, otherwise the function exits the execution of
|
|
function returns false, otherwise the function exits the execution of
|
|
- config at that moment (return 0 behaviour).
|
|
|
|
|
|
+ the script at that moment (return 0 behaviour).
|
|
|
|
|
|
The routename parameter can be a static string or a dynamic string
|
|
The routename parameter can be a static string or a dynamic string
|
|
value with config variables.
|
|
value with config variables.
|
|
|
|
|
|
- The sleep parameter represent the number of seconds to suppend the
|
|
|
|
- processing of SIP request. Maximum value is 100. The parameter can be a
|
|
|
|
- static integer or a varaible holding an integer.
|
|
|
|
|
|
+ The sleep parameter represent the number of seconds to suspend the
|
|
|
|
+ processing of a SIP request. Maximum value is 100. The parameter can be
|
|
|
|
+ a static integer or a variable holding an integer.
|
|
|
|
|
|
- Since the SIP request handling is resumed in another process,
|
|
|
|
- practically the config file execution state is lost. Therefore beware
|
|
|
|
- that the execution of config after resume will end once the
|
|
|
|
- route[routename] is finished.
|
|
|
|
|
|
+ Since the SIP request handling is resumed in another process, the
|
|
|
|
+ config file execution state is practically lost. Therefore beware that
|
|
|
|
+ the execution of config after resume will end once the route[routename]
|
|
|
|
+ is finished.
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
@@ -142,17 +143,11 @@ route[RESUME] {
|
|
|
|
|
|
Simulate a sleep of 'seconds' and then continue the processing of SIP
|
|
Simulate a sleep of 'seconds' and then continue the processing of SIP
|
|
request with the next action. In case of internal errors, the function
|
|
request with the next action. In case of internal errors, the function
|
|
- returns false, otherwise the function exits the execution of config at
|
|
|
|
- that moment (return 0 behaviour).
|
|
|
|
|
|
+ returns false.
|
|
|
|
|
|
- The sleep parameter represent the number of seconds to suppend the
|
|
|
|
|
|
+ The sleep parameter represent the number of seconds to suspend the
|
|
processing of SIP request. Maximum value is 100. The parameter can be a
|
|
processing of SIP request. Maximum value is 100. The parameter can be a
|
|
- static integer or a varaible holding an integer.
|
|
|
|
-
|
|
|
|
- Since the SIP request handling is resumed in another process,
|
|
|
|
- practically the config file execution state is lost. Therefore beware
|
|
|
|
- that the execution of config after resume will end once the route block
|
|
|
|
- where async_sleep() is called is finished.
|
|
|
|
|
|
+ static integer or a variable holding an integer.
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|