Table of Contents
List of Examples
hash_size usageexpire usagetimer_interval usagetimer_procs usagesr_msg_push() usagesr_msg_pull() usagesr_msg_async_pull() usagesr_msg_rm() usagesr_msg_check() usageTable of Contents
Number of slots in the hash table. It should be power of 2.
Default value: 256.
Number of seconds until the stored message content expires.
Default value: 180.
Number of seconds to run the timer routine.
Default value: 10.
Push the message content to hash table and associate it with `msgid`. The Call-Id and msgid are needed to pull the message. The rmode is reserved for repo mode, use 0.
This function can be used from ANY_ROUTE.
Example 1.5. sr_msg_push() usage
...
request_route {
...
$var(msgid) = $sruid;
if(sr_msg_push("$var(msgid)", "0")) {
...
}
...
}
...
Pull the message content and execute the route block 'rname'. If rmode is set to "1", the item of the message is removed from siprepo storage, use "0" to keep it.
This function can be used from ANY_ROUTE.
Example 1.6. sr_msg_pull() usage
...
request_route {
...
if(sr_msg_pull("$var(callid)", "$var(msgid)", "REPOPULL", "1")) {
}
...
}
...
Pull the message content and execute the route block 'rname' via async group 'gname'. If rmode is set to "1", the item of the message is removed from siprepo storage, use "0" to keep it.
This function can be used from ANY_ROUTE.
Example 1.7. sr_msg_async_pull() usage
...
request_route {
...
if(sr_msg_async_pull("$var(callid)", "$var(msgid)", "WG01", "REPOPULL", "1")) {
}
...
}
...