|
|
@@ -78,16 +78,17 @@ Daniel-Constantin Mierla
|
|
|
3.49. xavp_contact (string)
|
|
|
3.50. event_callback (str)
|
|
|
3.51. event_callback_lres_sent (str)
|
|
|
- 3.52. relay_100 (str)
|
|
|
- 3.53. rich_redirect (int)
|
|
|
- 3.54. exec_time_check (int)
|
|
|
- 3.55. reply_relay_mode (int)
|
|
|
- 3.56. enable_uac_fr (int)
|
|
|
- 3.57. failover_reply_codes (string)
|
|
|
- 3.58. reply_408_code (int)
|
|
|
- 3.59. reply_408_reason (str)
|
|
|
- 3.60. delayed_reply (int)
|
|
|
- 3.61. evlreq_mode (int)
|
|
|
+ 3.52. evcb_local_ack_sent (str)
|
|
|
+ 3.53. relay_100 (str)
|
|
|
+ 3.54. rich_redirect (int)
|
|
|
+ 3.55. exec_time_check (int)
|
|
|
+ 3.56. reply_relay_mode (int)
|
|
|
+ 3.57. enable_uac_fr (int)
|
|
|
+ 3.58. failover_reply_codes (string)
|
|
|
+ 3.59. reply_408_code (int)
|
|
|
+ 3.60. reply_408_reason (str)
|
|
|
+ 3.61. delayed_reply (int)
|
|
|
+ 3.62. evlreq_mode (int)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
|
@@ -257,75 +258,76 @@ Daniel-Constantin Mierla
|
|
|
1.50. Set xavp_contact parameter
|
|
|
1.51. Set event_callback parameter
|
|
|
1.52. Set event_callback_lres_sent parameter
|
|
|
- 1.53. Set relay_100 parameter
|
|
|
- 1.54. rich_redirect example
|
|
|
- 1.55. Set exec_time_check parameter
|
|
|
- 1.56. Set reply_relay_mode parameter
|
|
|
- 1.57. enable_uac_fr example
|
|
|
- 1.58. Set the “failover_reply_codes” parameter
|
|
|
- 1.59. reply_408_code example
|
|
|
- 1.60. reply_408_reason example
|
|
|
- 1.61. delayed_reply example
|
|
|
- 1.62. evlreq_mode example
|
|
|
- 1.63. t_relay usage
|
|
|
- 1.64. t_relay_to_udp usage
|
|
|
- 1.65. t_on_failure usage
|
|
|
- 1.66. t_on_branch_failure usage
|
|
|
- 1.67. t_on_reply usage
|
|
|
- 1.68. t_on_branch usage
|
|
|
- 1.69. t_newtran usage
|
|
|
- 1.70. t_reply usage
|
|
|
- 1.71. t_reply_error usage
|
|
|
- 1.72. t_send_reply usage
|
|
|
- 1.73. t_lookup_request usage
|
|
|
- 1.74. t_retransmit_reply usage
|
|
|
- 1.75. t_release usage
|
|
|
- 1.76. t_forward_nonack usage
|
|
|
- 1.77. t_set_fr usage
|
|
|
- 1.78. t_reset_fr usage
|
|
|
- 1.79. t_set_max_lifetime usage
|
|
|
- 1.80. t_reset_max_lifetime usage
|
|
|
- 1.81. t_set_retr usage
|
|
|
- 1.82. t_reset_retr usage
|
|
|
- 1.83. t_set_auto_inv_100 usage
|
|
|
- 1.84. t_branch_timeout usage
|
|
|
- 1.85. t_branch_replied usage
|
|
|
- 1.86. t_any_timeout usage
|
|
|
- 1.87. t_any_replied usage
|
|
|
- 1.88. t_grep_status usage
|
|
|
- 1.89. t_is_canceled usage
|
|
|
- 1.90. t_is_expired usage
|
|
|
- 1.91. t_relay_cancel usage
|
|
|
- 1.92. t_lookup_cancel usage
|
|
|
- 1.93. t_drop_replies() usage
|
|
|
- 1.94. t_save_lumps() usage
|
|
|
- 1.95. t_load_contacts usage
|
|
|
- 1.96. t_next_contacts usage
|
|
|
- 1.97. t_next_contact_flow usage
|
|
|
- 1.98. t_check_status usage
|
|
|
- 1.99. t_check_trans usage
|
|
|
- 1.100. t_set_disable_6xx usage
|
|
|
- 1.101. t_set_disable_failover usage
|
|
|
- 1.102. t_set_disable_internal_reply usage
|
|
|
- 1.103. t_replicate usage
|
|
|
- 1.104. t_relay_to usage
|
|
|
- 1.105. t_relay_to_proxy usage
|
|
|
- 1.106. t_set_no_e2e_cancel_reason usage
|
|
|
- 1.107. t_replicate usage
|
|
|
- 1.108. t_use_uac_headers usage
|
|
|
- 1.109. t_is_retr_async_reply usage
|
|
|
- 1.110. t_uac_send usage
|
|
|
- 1.111. t_get_status_code usage
|
|
|
- 1.112. t_clean usage
|
|
|
- 1.113. t_exists usage
|
|
|
- 1.114. t_cell_append_branches usage
|
|
|
- 1.115. Using “tm.t_uac_attrs”
|
|
|
- 1.116. Using “tm.retransmit_reply”
|
|
|
- 1.117. Using “tm.retransmit_reply_callid”
|
|
|
- 1.118. event_route[tm:branch-failure:id] usage
|
|
|
- 1.119. event_route[tm:local-request] usage
|
|
|
- 1.120. event_route[tm:local-response] usage
|
|
|
- 1.121. event_route[tm:local-ack-sent] usage
|
|
|
+ 1.53. Set evcb_local_ack_sent parameter
|
|
|
+ 1.54. Set relay_100 parameter
|
|
|
+ 1.55. rich_redirect example
|
|
|
+ 1.56. Set exec_time_check parameter
|
|
|
+ 1.57. Set reply_relay_mode parameter
|
|
|
+ 1.58. enable_uac_fr example
|
|
|
+ 1.59. Set the “failover_reply_codes” parameter
|
|
|
+ 1.60. reply_408_code example
|
|
|
+ 1.61. reply_408_reason example
|
|
|
+ 1.62. delayed_reply example
|
|
|
+ 1.63. evlreq_mode example
|
|
|
+ 1.64. t_relay usage
|
|
|
+ 1.65. t_relay_to_udp usage
|
|
|
+ 1.66. t_on_failure usage
|
|
|
+ 1.67. t_on_branch_failure usage
|
|
|
+ 1.68. t_on_reply usage
|
|
|
+ 1.69. t_on_branch usage
|
|
|
+ 1.70. t_newtran usage
|
|
|
+ 1.71. t_reply usage
|
|
|
+ 1.72. t_reply_error usage
|
|
|
+ 1.73. t_send_reply usage
|
|
|
+ 1.74. t_lookup_request usage
|
|
|
+ 1.75. t_retransmit_reply usage
|
|
|
+ 1.76. t_release usage
|
|
|
+ 1.77. t_forward_nonack usage
|
|
|
+ 1.78. t_set_fr usage
|
|
|
+ 1.79. t_reset_fr usage
|
|
|
+ 1.80. t_set_max_lifetime usage
|
|
|
+ 1.81. t_reset_max_lifetime usage
|
|
|
+ 1.82. t_set_retr usage
|
|
|
+ 1.83. t_reset_retr usage
|
|
|
+ 1.84. t_set_auto_inv_100 usage
|
|
|
+ 1.85. t_branch_timeout usage
|
|
|
+ 1.86. t_branch_replied usage
|
|
|
+ 1.87. t_any_timeout usage
|
|
|
+ 1.88. t_any_replied usage
|
|
|
+ 1.89. t_grep_status usage
|
|
|
+ 1.90. t_is_canceled usage
|
|
|
+ 1.91. t_is_expired usage
|
|
|
+ 1.92. t_relay_cancel usage
|
|
|
+ 1.93. t_lookup_cancel usage
|
|
|
+ 1.94. t_drop_replies() usage
|
|
|
+ 1.95. t_save_lumps() usage
|
|
|
+ 1.96. t_load_contacts usage
|
|
|
+ 1.97. t_next_contacts usage
|
|
|
+ 1.98. t_next_contact_flow usage
|
|
|
+ 1.99. t_check_status usage
|
|
|
+ 1.100. t_check_trans usage
|
|
|
+ 1.101. t_set_disable_6xx usage
|
|
|
+ 1.102. t_set_disable_failover usage
|
|
|
+ 1.103. t_set_disable_internal_reply usage
|
|
|
+ 1.104. t_replicate usage
|
|
|
+ 1.105. t_relay_to usage
|
|
|
+ 1.106. t_relay_to_proxy usage
|
|
|
+ 1.107. t_set_no_e2e_cancel_reason usage
|
|
|
+ 1.108. t_replicate usage
|
|
|
+ 1.109. t_use_uac_headers usage
|
|
|
+ 1.110. t_is_retr_async_reply usage
|
|
|
+ 1.111. t_uac_send usage
|
|
|
+ 1.112. t_get_status_code usage
|
|
|
+ 1.113. t_clean usage
|
|
|
+ 1.114. t_exists usage
|
|
|
+ 1.115. t_cell_append_branches usage
|
|
|
+ 1.116. Using “tm.t_uac_attrs”
|
|
|
+ 1.117. Using “tm.retransmit_reply”
|
|
|
+ 1.118. Using “tm.retransmit_reply_callid”
|
|
|
+ 1.119. event_route[tm:branch-failure:id] usage
|
|
|
+ 1.120. event_route[tm:local-request] usage
|
|
|
+ 1.121. event_route[tm:local-response] usage
|
|
|
+ 1.122. event_route[tm:local-ack-sent] usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
|
|
|
|
@@ -386,16 +388,17 @@ Chapter 1. Admin Guide
|
|
|
3.49. xavp_contact (string)
|
|
|
3.50. event_callback (str)
|
|
|
3.51. event_callback_lres_sent (str)
|
|
|
- 3.52. relay_100 (str)
|
|
|
- 3.53. rich_redirect (int)
|
|
|
- 3.54. exec_time_check (int)
|
|
|
- 3.55. reply_relay_mode (int)
|
|
|
- 3.56. enable_uac_fr (int)
|
|
|
- 3.57. failover_reply_codes (string)
|
|
|
- 3.58. reply_408_code (int)
|
|
|
- 3.59. reply_408_reason (str)
|
|
|
- 3.60. delayed_reply (int)
|
|
|
- 3.61. evlreq_mode (int)
|
|
|
+ 3.52. evcb_local_ack_sent (str)
|
|
|
+ 3.53. relay_100 (str)
|
|
|
+ 3.54. rich_redirect (int)
|
|
|
+ 3.55. exec_time_check (int)
|
|
|
+ 3.56. reply_relay_mode (int)
|
|
|
+ 3.57. enable_uac_fr (int)
|
|
|
+ 3.58. failover_reply_codes (string)
|
|
|
+ 3.59. reply_408_code (int)
|
|
|
+ 3.60. reply_408_reason (str)
|
|
|
+ 3.61. delayed_reply (int)
|
|
|
+ 3.62. evlreq_mode (int)
|
|
|
|
|
|
4. Functions
|
|
|
|
|
|
@@ -789,16 +792,17 @@ failure_route["serial"]
|
|
|
3.49. xavp_contact (string)
|
|
|
3.50. event_callback (str)
|
|
|
3.51. event_callback_lres_sent (str)
|
|
|
- 3.52. relay_100 (str)
|
|
|
- 3.53. rich_redirect (int)
|
|
|
- 3.54. exec_time_check (int)
|
|
|
- 3.55. reply_relay_mode (int)
|
|
|
- 3.56. enable_uac_fr (int)
|
|
|
- 3.57. failover_reply_codes (string)
|
|
|
- 3.58. reply_408_code (int)
|
|
|
- 3.59. reply_408_reason (str)
|
|
|
- 3.60. delayed_reply (int)
|
|
|
- 3.61. evlreq_mode (int)
|
|
|
+ 3.52. evcb_local_ack_sent (str)
|
|
|
+ 3.53. relay_100 (str)
|
|
|
+ 3.54. rich_redirect (int)
|
|
|
+ 3.55. exec_time_check (int)
|
|
|
+ 3.56. reply_relay_mode (int)
|
|
|
+ 3.57. enable_uac_fr (int)
|
|
|
+ 3.58. failover_reply_codes (string)
|
|
|
+ 3.59. reply_408_code (int)
|
|
|
+ 3.60. reply_408_reason (str)
|
|
|
+ 3.61. delayed_reply (int)
|
|
|
+ 3.62. evlreq_mode (int)
|
|
|
|
|
|
3.1. fr_timer (integer)
|
|
|
|
|
|
@@ -1820,7 +1824,27 @@ function ksr_tm_event_response_sent(evname)
|
|
|
end
|
|
|
...
|
|
|
|
|
|
-3.52. relay_100 (str)
|
|
|
+3.52. evcb_local_ack_sent (str)
|
|
|
+
|
|
|
+ The name of the function in the kemi configuration file (embedded
|
|
|
+ scripting language such as Lua, Python, ...) to be executed instead of
|
|
|
+ event_route[tm:local-ack-sent] block. The function receives a string
|
|
|
+ parameter with the name of the event, respectively "tm:local-ack-sent".
|
|
|
+
|
|
|
+ Default value is 'empty' (no function is executed for events).
|
|
|
+
|
|
|
+ Example 1.53. Set evcb_local_ack_sent parameter
|
|
|
+...
|
|
|
+modparam("tm", "evcb_local_ack_sent", "ksr_tm_event_local_ack_sent")
|
|
|
+...
|
|
|
+-- event callback function implemented in Lua
|
|
|
+function ksr_tm_event_local_ack_sent(evname)
|
|
|
+ KSR.info("===== tm module triggered event: " .. evname .. "\n");
|
|
|
+ return 1;
|
|
|
+end
|
|
|
+...
|
|
|
+
|
|
|
+3.53. relay_100 (str)
|
|
|
|
|
|
This parameter controls whether or not a SIP 100 response is proxied.
|
|
|
Note that this is not valid behavior when operating in stateful mode
|
|
|
@@ -1832,12 +1856,12 @@ end
|
|
|
|
|
|
Default value is 0 (disabled).
|
|
|
|
|
|
- Example 1.53. Set relay_100 parameter
|
|
|
+ Example 1.54. Set relay_100 parameter
|
|
|
...
|
|
|
modparam("tm", "relay_100", 1)
|
|
|
...
|
|
|
|
|
|
-3.53. rich_redirect (int)
|
|
|
+3.54. rich_redirect (int)
|
|
|
|
|
|
When sending a 3xx class reply, include additional branch info to the
|
|
|
contacts such as path vector and branch flags.
|
|
|
@@ -1847,12 +1871,12 @@ modparam("tm", "relay_100", 1)
|
|
|
|
|
|
Values may be combined (added).
|
|
|
|
|
|
- Example 1.54. rich_redirect example
|
|
|
+ Example 1.55. rich_redirect example
|
|
|
...
|
|
|
modparam("tm", "rich_redirect", 3)
|
|
|
....
|
|
|
|
|
|
-3.54. exec_time_check (int)
|
|
|
+3.55. exec_time_check (int)
|
|
|
|
|
|
Duration in milliseconds for executing transaction failure callbacks
|
|
|
and failure_route block after which to do a safety check if transaction
|
|
|
@@ -1862,12 +1886,12 @@ modparam("tm", "rich_redirect", 3)
|
|
|
|
|
|
Default value is 5000 (5 seconds).
|
|
|
|
|
|
- Example 1.55. Set exec_time_check parameter
|
|
|
+ Example 1.56. Set exec_time_check parameter
|
|
|
...
|
|
|
modparam("tm", "exec_time_check", 0)
|
|
|
...
|
|
|
|
|
|
-3.55. reply_relay_mode (int)
|
|
|
+3.56. reply_relay_mode (int)
|
|
|
|
|
|
If set to 1, a received 200 OK response that was suspended is no longer
|
|
|
forwarded in the transactional context if another final response was
|
|
|
@@ -1881,23 +1905,23 @@ modparam("tm", "exec_time_check", 0)
|
|
|
|
|
|
Default value is 1.
|
|
|
|
|
|
- Example 1.56. Set reply_relay_mode parameter
|
|
|
+ Example 1.57. Set reply_relay_mode parameter
|
|
|
...
|
|
|
modparam("tm", "reply_relay_mode", 0)
|
|
|
...
|
|
|
|
|
|
-3.56. enable_uac_fr (int)
|
|
|
+3.57. enable_uac_fr (int)
|
|
|
|
|
|
Enable failure route trigger, for uac. This will copy the tm uac into
|
|
|
uas. Thus, failure route can be triggered even for uac messages. The
|
|
|
default is 0 (disabled).
|
|
|
|
|
|
- Example 1.57. enable_uac_fr example
|
|
|
+ Example 1.58. enable_uac_fr example
|
|
|
...
|
|
|
modparam("tm", "enable_uac_fr", 1)
|
|
|
....
|
|
|
|
|
|
-3.57. failover_reply_codes (string)
|
|
|
+3.58. failover_reply_codes (string)
|
|
|
|
|
|
This parameter defines the response codes (only codes >= 300 and class
|
|
|
>= 3), which enable dns failover to continue to try next ips when
|
|
|
@@ -1910,32 +1934,32 @@ modparam("tm", "enable_uac_fr", 1)
|
|
|
|
|
|
Default value is “”
|
|
|
|
|
|
- Example 1.58. Set the “failover_reply_codes” parameter
|
|
|
+ Example 1.59. Set the “failover_reply_codes” parameter
|
|
|
...
|
|
|
modparam("tm", "failover_reply_codes", "code=403;code=488;class=5")
|
|
|
...
|
|
|
|
|
|
-3.58. reply_408_code (int)
|
|
|
+3.59. reply_408_code (int)
|
|
|
|
|
|
Status code for internally generated timeout responses.
|
|
|
Default value is “408”.
|
|
|
|
|
|
- Example 1.59. reply_408_code example
|
|
|
+ Example 1.60. reply_408_code example
|
|
|
...
|
|
|
modparam("tm", "reply_408_code", 410)
|
|
|
....
|
|
|
|
|
|
-3.59. reply_408_reason (str)
|
|
|
+3.60. reply_408_reason (str)
|
|
|
|
|
|
Reason phrase for internally generated timeout responses.
|
|
|
Default value is “Request Timeout”.
|
|
|
|
|
|
- Example 1.60. reply_408_reason example
|
|
|
+ Example 1.61. reply_408_reason example
|
|
|
...
|
|
|
modparam("tm", "reply_408_reason", "Gone")
|
|
|
....
|
|
|
|
|
|
-3.60. delayed_reply (int)
|
|
|
+3.61. delayed_reply (int)
|
|
|
|
|
|
If set to 1, the reply generation in case of request
|
|
|
processing/forwarding error is delayed till the config script execution
|
|
|
@@ -1943,19 +1967,19 @@ modparam("tm", "reply_408_reason", "Gone")
|
|
|
to 0, the transaction is replied and killed immediately.
|
|
|
Default value is “1”.
|
|
|
|
|
|
- Example 1.61. delayed_reply example
|
|
|
+ Example 1.62. delayed_reply example
|
|
|
...
|
|
|
modparam("tm", "delayed_reply", 0)
|
|
|
....
|
|
|
|
|
|
-3.61. evlreq_mode (int)
|
|
|
+3.62. evlreq_mode (int)
|
|
|
|
|
|
If bit 1 is set (value 1), the event_route[tm:local-request] is also
|
|
|
executed for hop-by-hop CANCEL requests (for received INVITEs, not only
|
|
|
for local generated ones).
|
|
|
Default value is “0”.
|
|
|
|
|
|
- Example 1.62. evlreq_mode example
|
|
|
+ Example 1.63. evlreq_mode example
|
|
|
...
|
|
|
modparam("tm", "evlreq_mode", 1)
|
|
|
....
|
|
|
@@ -2043,7 +2067,7 @@ modparam("tm", "evlreq_mode", 1)
|
|
|
Returns a negative value on failure -- you may still want to send a
|
|
|
negative reply upstream statelessly not to leave upstream UAC in lurch.
|
|
|
|
|
|
- Example 1.63. t_relay usage
|
|
|
+ Example 1.64. t_relay usage
|
|
|
...
|
|
|
if (!t_relay())
|
|
|
{
|
|
|
@@ -2070,7 +2094,7 @@ if (!t_relay())
|
|
|
derived from the message uri (using sip specific DNS lookups), but with
|
|
|
the protocol corresponding to the function name.
|
|
|
|
|
|
- Example 1.64. t_relay_to_udp usage
|
|
|
+ Example 1.65. t_relay_to_udp usage
|
|
|
...
|
|
|
if (src_ip==10.0.0.0/8)
|
|
|
t_relay_to_udp("1.2.3.4", "5060"); # sent to 1.2.3.4:5060 over udp
|
|
|
@@ -2110,7 +2134,7 @@ else
|
|
|
Meaning of the parameters is as follows:
|
|
|
* failure_route - Failure route block to be called.
|
|
|
|
|
|
- Example 1.65. t_on_failure usage
|
|
|
+ Example 1.66. t_on_failure usage
|
|
|
...
|
|
|
route {
|
|
|
t_on_failure("1");
|
|
|
@@ -2146,7 +2170,7 @@ failure_route[1] {
|
|
|
* branch_failure_route - Name of the branch_failure route block to be
|
|
|
called (it is prefixed internally with 'tm:branch-failure:').
|
|
|
|
|
|
- Example 1.66. t_on_branch_failure usage
|
|
|
+ Example 1.67. t_on_branch_failure usage
|
|
|
...
|
|
|
route {
|
|
|
t_on_branch_failure("myroute");
|
|
|
@@ -2169,7 +2193,7 @@ event_route[tm:branch-failure:myroute] {
|
|
|
Meaning of the parameters is as follows:
|
|
|
* onreply_route - Onreply route block to be called.
|
|
|
|
|
|
- Example 1.67. t_on_reply usage
|
|
|
+ Example 1.68. t_on_reply usage
|
|
|
...
|
|
|
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
|
|
|
...
|
|
|
@@ -2201,7 +2225,7 @@ es');
|
|
|
Meaning of the parameters is as follows:
|
|
|
* branch_route - branch route block to be called.
|
|
|
|
|
|
- Example 1.68. t_on_branch usage
|
|
|
+ Example 1.69. t_on_branch usage
|
|
|
...
|
|
|
route {
|
|
|
t_on_branch("1");
|
|
|
@@ -2225,7 +2249,7 @@ branch_route[1] {
|
|
|
structure. Use the tmx module function t_flush_flags() to synchronize
|
|
|
the modified message flags to the already created transaction.
|
|
|
|
|
|
- Example 1.69. t_newtran usage
|
|
|
+ Example 1.70. t_newtran usage
|
|
|
...
|
|
|
if (t_newtran()) {
|
|
|
xlog("the transaction has been created\n");
|
|
|
@@ -2260,7 +2284,7 @@ if (t_newtran()) {
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
|
|
|
ONREPLY_ROUTE.
|
|
|
|
|
|
- Example 1.70. t_reply usage
|
|
|
+ Example 1.71. t_reply usage
|
|
|
...
|
|
|
t_reply("404", "Not found");
|
|
|
...
|
|
|
@@ -2273,7 +2297,7 @@ t_reply("404", "Not found");
|
|
|
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
|
|
|
ONREPLY_ROUTE.
|
|
|
|
|
|
- Example 1.71. t_reply_error usage
|
|
|
+ Example 1.72. t_reply_error usage
|
|
|
...
|
|
|
t_reply_error();
|
|
|
...
|
|
|
@@ -2291,7 +2315,7 @@ t_reply_error();
|
|
|
* code - Reply code number.
|
|
|
* reason - Reason string.
|
|
|
|
|
|
- Example 1.72. t_send_reply usage
|
|
|
+ Example 1.73. t_send_reply usage
|
|
|
...
|
|
|
t_send_reply("404", "Not found");
|
|
|
...
|
|
|
@@ -2304,7 +2328,7 @@ t_send_reply("404", "Not found");
|
|
|
none was found. However this is safely (atomically) done using
|
|
|
t_newtran.
|
|
|
|
|
|
- Example 1.73. t_lookup_request usage
|
|
|
+ Example 1.74. t_lookup_request usage
|
|
|
...
|
|
|
if (t_lookup_request()) {
|
|
|
...
|
|
|
@@ -2315,7 +2339,7 @@ if (t_lookup_request()) {
|
|
|
|
|
|
Retransmits a reply sent previously by UAS transaction.
|
|
|
|
|
|
- Example 1.74. t_retransmit_reply usage
|
|
|
+ Example 1.75. t_retransmit_reply usage
|
|
|
...
|
|
|
t_retransmit_reply();
|
|
|
...
|
|
|
@@ -2325,7 +2349,7 @@ t_retransmit_reply();
|
|
|
Remove transaction from memory (it will be first put on a wait timer to
|
|
|
absorb delayed messages).
|
|
|
|
|
|
- Example 1.75. t_release usage
|
|
|
+ Example 1.76. t_release usage
|
|
|
...
|
|
|
t_release();
|
|
|
...
|
|
|
@@ -2339,7 +2363,7 @@ t_release();
|
|
|
* ip - IP address where the message should be sent.
|
|
|
* port - Port number.
|
|
|
|
|
|
- Example 1.76. t_forward_nonack usage
|
|
|
+ Example 1.77. t_forward_nonack usage
|
|
|
...
|
|
|
t_forward_nonack("1.2.3.4", "5060");
|
|
|
...
|
|
|
@@ -2378,7 +2402,7 @@ t_forward_nonack("1.2.3.4", "5060");
|
|
|
|
|
|
See also: fr_timer, fr_inv_timer, t_reset_fr().
|
|
|
|
|
|
- Example 1.77. t_set_fr usage
|
|
|
+ Example 1.78. t_set_fr usage
|
|
|
...
|
|
|
route {
|
|
|
t_set_fr(10000); # set only fr invite timeout to 10s
|
|
|
@@ -2405,7 +2429,7 @@ branch_route[1] {
|
|
|
|
|
|
See also: fr_timer, fr_inv_timer, t_set_fr.
|
|
|
|
|
|
- Example 1.78. t_reset_fr usage
|
|
|
+ Example 1.79. t_reset_fr usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -2431,7 +2455,7 @@ route {
|
|
|
|
|
|
See also: max_inv_lifetime, max_noninv_lifetime, t_reset_max_lifetime.
|
|
|
|
|
|
- Example 1.79. t_set_max_lifetime usage
|
|
|
+ Example 1.80. t_set_max_lifetime usage
|
|
|
...
|
|
|
route {
|
|
|
if (src_ip=1.2.3.4)
|
|
|
@@ -2453,7 +2477,7 @@ route {
|
|
|
|
|
|
See also: max_inv_lifetime, max_noninv_lifetime, t_set_max_lifetime.
|
|
|
|
|
|
- Example 1.80. t_reset_max_lifetime usage
|
|
|
+ Example 1.81. t_reset_max_lifetime usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -2488,7 +2512,7 @@ route {
|
|
|
|
|
|
See also: retr_timer1, retr_timer2, t_reset_retr().
|
|
|
|
|
|
- Example 1.81. t_set_retr usage
|
|
|
+ Example 1.82. t_set_retr usage
|
|
|
...
|
|
|
route {
|
|
|
t_set_retr(250, 0); # set only T1 to 250 ms
|
|
|
@@ -2515,7 +2539,7 @@ branch_route[1] {
|
|
|
|
|
|
See also: retr_timer1, retr_timer2, t_set_retr.
|
|
|
|
|
|
- Example 1.82. t_reset_retr usage
|
|
|
+ Example 1.83. t_reset_retr usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -2531,7 +2555,7 @@ route {
|
|
|
|
|
|
See also: auto_inv_100.
|
|
|
|
|
|
- Example 1.83. t_set_auto_inv_100 usage
|
|
|
+ Example 1.84. t_set_auto_inv_100 usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -2546,7 +2570,7 @@ route {
|
|
|
timeout. It can be used from FAILURE_ROUTE and BRANCH_FAILURE_ROUTE
|
|
|
event route.
|
|
|
|
|
|
- Example 1.84. t_branch_timeout usage
|
|
|
+ Example 1.85. t_branch_timeout usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (t_branch_timeout()){
|
|
|
@@ -2562,7 +2586,7 @@ failure_route[0]{
|
|
|
taken into account). It can be used from failure_route and
|
|
|
branch-failure event route.
|
|
|
|
|
|
- Example 1.85. t_branch_replied usage
|
|
|
+ Example 1.86. t_branch_replied usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (t_branch_timeout()){
|
|
|
@@ -2579,7 +2603,7 @@ failure_route[0]{
|
|
|
Returns true if at least one of the current transactions branches did
|
|
|
timeout.
|
|
|
|
|
|
- Example 1.86. t_any_timeout usage
|
|
|
+ Example 1.87. t_any_timeout usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (!t_branch_timeout()){
|
|
|
@@ -2596,7 +2620,7 @@ failure_route[0]{
|
|
|
receive some reply in the past. If called from a failure or onreply
|
|
|
route, the "current" reply is not taken into account.
|
|
|
|
|
|
- Example 1.87. t_any_replied usage
|
|
|
+ Example 1.88. t_any_replied usage
|
|
|
...
|
|
|
onreply_route[0]{
|
|
|
if (!t_any_replied()){
|
|
|
@@ -2610,7 +2634,7 @@ onreply_route[0]{
|
|
|
Returns true if "code" is the final reply received (or locally
|
|
|
generated) in at least one of the current transactions branches.
|
|
|
|
|
|
- Example 1.88. t_grep_status usage
|
|
|
+ Example 1.89. t_grep_status usage
|
|
|
...
|
|
|
onreply_route[0]{
|
|
|
if (t_grep_status("486")){
|
|
|
@@ -2623,7 +2647,7 @@ onreply_route[0]{
|
|
|
|
|
|
Returns true if the current transaction was canceled.
|
|
|
|
|
|
- Example 1.89. t_is_canceled usage
|
|
|
+ Example 1.90. t_is_canceled usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (t_is_canceled()){
|
|
|
@@ -2637,7 +2661,7 @@ failure_route[0]{
|
|
|
Returns true if the current transaction has already expired, i.e. the
|
|
|
max_inv_lifetime/max_noninv_lifetime interval has already elapsed.
|
|
|
|
|
|
- Example 1.90. t_is_expired usage
|
|
|
+ Example 1.91. t_is_expired usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (t_is_expired()){
|
|
|
@@ -2658,7 +2682,7 @@ failure_route[0]{
|
|
|
CANCELs were successfully sent to the pending branches, true if the
|
|
|
INVITE was not found, and false in case of any error.
|
|
|
|
|
|
- Example 1.91. t_relay_cancel usage
|
|
|
+ Example 1.92. t_relay_cancel usage
|
|
|
if (method == CANCEL) {
|
|
|
if (!t_relay_cancel()) { # implicit drop if relaying was successful,
|
|
|
# nothing to do
|
|
|
@@ -2685,7 +2709,7 @@ if (method == CANCEL) {
|
|
|
overwritten with the flags of the INVITE. isflagset() can be used to
|
|
|
check the flags of the previously forwarded INVITE in this case.
|
|
|
|
|
|
- Example 1.92. t_lookup_cancel usage
|
|
|
+ Example 1.93. t_lookup_cancel usage
|
|
|
if (method == CANCEL) {
|
|
|
if (t_lookup_cancel()) {
|
|
|
log("INVITE transaction exists");
|
|
|
@@ -2715,7 +2739,7 @@ if (method == CANCEL) {
|
|
|
Dropping replies works only if a new branch is added to the
|
|
|
transaction, or it is explicitly replied in the script!
|
|
|
|
|
|
- Example 1.93. t_drop_replies() usage
|
|
|
+ Example 1.94. t_drop_replies() usage
|
|
|
...
|
|
|
failure_route[0]{
|
|
|
if (t_check_status("5[0-9][0-9]")){
|
|
|
@@ -2746,7 +2770,7 @@ failure_route[0]{
|
|
|
The transaction must be created by t_newtran() before calling
|
|
|
t_save_lumps().
|
|
|
|
|
|
- Example 1.94. t_save_lumps() usage
|
|
|
+ Example 1.95. t_save_lumps() usage
|
|
|
route {
|
|
|
...
|
|
|
t_newtran();
|
|
|
@@ -2820,7 +2844,7 @@ failure_route[1] {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.95. t_load_contacts usage
|
|
|
+ Example 1.96. t_load_contacts usage
|
|
|
...
|
|
|
if (!t_load_contacts()) {
|
|
|
sl_send_reply("500", "Server Internal Error - Cannot load contacts");
|
|
|
@@ -2861,7 +2885,7 @@ if (!t_load_contacts()) {
|
|
|
contact_flows_avp are not anymore set. Based on that test, you can then
|
|
|
use t_set_fr() function to set timers according to your needs.
|
|
|
|
|
|
- Example 1.96. t_next_contacts usage
|
|
|
+ Example 1.97. t_next_contacts usage
|
|
|
...
|
|
|
# First call after t_load_contacts() when transaction does not exist yet
|
|
|
# and contacts should be available
|
|
|
@@ -2899,7 +2923,7 @@ if (!t_next_contacts()) {
|
|
|
syslog). This function can be used from a BRANCH_FAILURE_ROUTE event
|
|
|
route.
|
|
|
|
|
|
- Example 1.97. t_next_contact_flow usage
|
|
|
+ Example 1.98. t_next_contact_flow usage
|
|
|
...
|
|
|
event_route[tm:branch-failure:outbound]
|
|
|
{
|
|
|
@@ -2922,7 +2946,7 @@ event_route[tm:branch-failure:outbound]
|
|
|
|
|
|
This function can be used from ANY_ROUTE .
|
|
|
|
|
|
- Example 1.98. t_check_status usage
|
|
|
+ Example 1.99. t_check_status usage
|
|
|
...
|
|
|
if (t_check_status("(487)|(408)")) {
|
|
|
log("487 or 408 negative reply\n");
|
|
|
@@ -2976,7 +3000,7 @@ Note
|
|
|
|
|
|
See also: t_lookup_request(), t_lookup_cancel().
|
|
|
|
|
|
- Example 1.99. t_check_trans usage
|
|
|
+ Example 1.100. t_check_trans usage
|
|
|
if ( method == "CANCEL" && !t_check_trans())
|
|
|
sl_reply("403", "cancel out of the blue forbidden");
|
|
|
# note: in this example t_check_trans() can be replaced by t_lookup_cancel()
|
|
|
@@ -2991,7 +3015,7 @@ if ( method == "CANCEL" && !t_check_trans())
|
|
|
|
|
|
See also: disable_6xx_block.
|
|
|
|
|
|
- Example 1.100. t_set_disable_6xx usage
|
|
|
+ Example 1.101. t_set_disable_6xx usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -3006,7 +3030,7 @@ route {
|
|
|
|
|
|
See also: use_dns_failover.
|
|
|
|
|
|
- Example 1.101. t_set_disable_failover usage
|
|
|
+ Example 1.102. t_set_disable_failover usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -3019,7 +3043,7 @@ route {
|
|
|
|
|
|
Turn off/on sending internally a SIP reply in case of relay errors.
|
|
|
|
|
|
- Example 1.102. t_set_disable_internal_reply usage
|
|
|
+ Example 1.103. t_set_disable_internal_reply usage
|
|
|
...
|
|
|
t_set_disable_internal_reply(1); # turn off sending internal reply on error
|
|
|
if(!t_relay()) {
|
|
|
@@ -3052,7 +3076,7 @@ if(!t_relay()) {
|
|
|
* hostport - address in "host:port" format. It can be given via an
|
|
|
AVP.
|
|
|
|
|
|
- Example 1.103. t_replicate usage
|
|
|
+ Example 1.104. t_replicate usage
|
|
|
...
|
|
|
# sent to 1.2.3.4:5060 over tcp
|
|
|
t_replicate("sip:1.2.3.4:5060;transport=tcp");
|
|
|
@@ -3086,7 +3110,7 @@ t_replicate_to_udp("1.2.3.4", "5060");
|
|
|
+ 0x02 - do not generate reply on internal error.
|
|
|
+ 0x04 - disable dns failover.
|
|
|
|
|
|
- Example 1.104. t_relay_to usage
|
|
|
+ Example 1.105. t_relay_to usage
|
|
|
...
|
|
|
# sent to 1.2.3.4:5060 over tcp
|
|
|
t_relay_to("tcp:1.2.3.4:5060");
|
|
|
@@ -3110,7 +3134,7 @@ t_relay_to("0x01");
|
|
|
|
|
|
The function can be used in REQUEST_ROUTE and FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.105. t_relay_to_proxy usage
|
|
|
+ Example 1.106. t_relay_to_proxy usage
|
|
|
...
|
|
|
t_relay_to_proxy("udp:$var(addr):5060");
|
|
|
...
|
|
|
@@ -3129,7 +3153,7 @@ t_relay_to_proxy("udp:$var(addr):5060");
|
|
|
|
|
|
See also: e2e_cancel_reason.
|
|
|
|
|
|
- Example 1.106. t_set_no_e2e_cancel_reason usage
|
|
|
+ Example 1.107. t_set_no_e2e_cancel_reason usage
|
|
|
...
|
|
|
route {
|
|
|
...
|
|
|
@@ -3152,7 +3176,7 @@ opying
|
|
|
* onreply_route - the function returns true if an onreply route is
|
|
|
set to be executed.
|
|
|
|
|
|
- Example 1.107. t_replicate usage
|
|
|
+ Example 1.108. t_replicate usage
|
|
|
...
|
|
|
if(!t_is_set("failure_route"))
|
|
|
LM_DBG("no failure route will be executed for current transaction\n");
|
|
|
@@ -3166,7 +3190,7 @@ if(!t_is_set("failure_route"))
|
|
|
|
|
|
It returns true.
|
|
|
|
|
|
- Example 1.108. t_use_uac_headers usage
|
|
|
+ Example 1.109. t_use_uac_headers usage
|
|
|
...
|
|
|
t_use_uac_headers();
|
|
|
...
|
|
|
@@ -3185,7 +3209,7 @@ t_use_uac_headers();
|
|
|
returns true if the transaction is currently reply suspended or false
|
|
|
if not.
|
|
|
|
|
|
- Example 1.109. t_is_retr_async_reply usage
|
|
|
+ Example 1.110. t_is_retr_async_reply usage
|
|
|
...
|
|
|
if (t_is_retr_async_reply()) {
|
|
|
xlog("L_DBG", "Dropping retransmitted reply which is still currently sus
|
|
|
@@ -3210,7 +3234,7 @@ pended\n");
|
|
|
Content-Type header must exist.
|
|
|
* body - SIP message body (can be empty).
|
|
|
|
|
|
- Example 1.110. t_uac_send usage
|
|
|
+ Example 1.111. t_uac_send usage
|
|
|
...
|
|
|
t_uac_send("OPTIONS", "sip:[email protected]", "", "",
|
|
|
"From: [email protected];tag=2w3e\r\nTo: [email protected]", "");
|
|
|
@@ -3221,7 +3245,7 @@ t_uac_send("OPTIONS", "sip:[email protected]", "", "",
|
|
|
Return the status code for transaction - the most relevant SIP reply
|
|
|
status code, or -1 in case of error or no status code was set.
|
|
|
|
|
|
- Example 1.111. t_get_status_code usage
|
|
|
+ Example 1.112. t_get_status_code usage
|
|
|
...
|
|
|
$var(ts) = t_get_status_code();
|
|
|
if($var(ts) == 500) { ... }
|
|
|
@@ -3232,7 +3256,7 @@ if($var(ts) == 500) { ... }
|
|
|
Cleans active but very old transactions. Returns true (1). Can be
|
|
|
called from any route.
|
|
|
|
|
|
- Example 1.112. t_clean usage
|
|
|
+ Example 1.113. t_clean usage
|
|
|
...
|
|
|
t_clean();
|
|
|
...
|
|
|
@@ -3242,7 +3266,7 @@ t_clean();
|
|
|
Return true if a transaction for the current message exists, without
|
|
|
setting the global references.
|
|
|
|
|
|
- Example 1.113. t_exists usage
|
|
|
+ Example 1.114. t_exists usage
|
|
|
...
|
|
|
reply_route {
|
|
|
if (!t_exists()) {
|
|
|
@@ -3256,7 +3280,7 @@ reply_route {
|
|
|
Append destination set branches to the transaction identified by
|
|
|
(tindex, tlabel). The parameters can also be variables.
|
|
|
|
|
|
- Example 1.114. t_cell_append_branches usage
|
|
|
+ Example 1.115. t_cell_append_branches usage
|
|
|
...
|
|
|
append_branch("sip:1.2.3.4:5060");
|
|
|
t_cell_append_branches("1234", "$var(tlabel)");
|
|
|
@@ -3385,7 +3409,7 @@ reply_route {
|
|
|
* fr_inv_timeout - the fr_inv_timeout value for the local
|
|
|
transaction.
|
|
|
|
|
|
- Example 1.115. Using “tm.t_uac_attrs”
|
|
|
+ Example 1.116. Using “tm.t_uac_attrs”
|
|
|
...
|
|
|
kamcli rpc tm.t_uac_attrs 'reply=wait;cbflags=noack;rpflags=1' 'INVITE' ...
|
|
|
...
|
|
|
@@ -3441,7 +3465,7 @@ kamcli rpc tm.t_uac_attrs 'reply=wait;cbflags=noack;rpflags=1' 'INVITE' ...
|
|
|
Parameters:
|
|
|
* trans_id - transaction identifier (has the hash_entry:label format)
|
|
|
|
|
|
- Example 1.116. Using “tm.retransmit_reply”
|
|
|
+ Example 1.117. Using “tm.retransmit_reply”
|
|
|
...
|
|
|
kamcli rpc tm.retransmit_reply 1234:5678
|
|
|
...
|
|
|
@@ -3454,7 +3478,7 @@ kamcli rpc tm.retransmit_reply 1234:5678
|
|
|
* callid - SIP Call-ID header
|
|
|
* cseq - SIP CSeq header
|
|
|
|
|
|
- Example 1.117. Using “tm.retransmit_reply_callid”
|
|
|
+ Example 1.118. Using “tm.retransmit_reply_callid”
|
|
|
...
|
|
|
kamcli rpc tm.retransmit_reply_callid "abc-xyz" "10 INVITE"
|
|
|
...
|
|
|
@@ -3490,7 +3514,7 @@ kamcli rpc tm.retransmit_reply_callid "abc-xyz" "10 INVITE"
|
|
|
enabled with the t_on_branch_failure function. This event_route uses
|
|
|
the BRANCH_FAILURE_ROUTE route type.
|
|
|
|
|
|
- Example 1.118. event_route[tm:branch-failure:id] usage
|
|
|
+ Example 1.119. event_route[tm:branch-failure:id] usage
|
|
|
...
|
|
|
request_route {
|
|
|
...
|
|
|
@@ -3516,7 +3540,7 @@ event_route[tm:branch-failure:myroute] {
|
|
|
The request can still be updated, i.e., changes are possible to R-URI
|
|
|
($ru), destination URI ($du) or the send socket ($fs).
|
|
|
|
|
|
- Example 1.119. event_route[tm:local-request] usage
|
|
|
+ Example 1.120. event_route[tm:local-request] usage
|
|
|
...
|
|
|
event_route [tm:local-request] {
|
|
|
xlog("L_INFO", "Routing locally generated $rm to $ru\n");
|
|
|
@@ -3529,7 +3553,7 @@ event_route [tm:local-request] {
|
|
|
Executed after the tm module sent a local generated, transaction
|
|
|
stateful response.
|
|
|
|
|
|
- Example 1.120. event_route[tm:local-response] usage
|
|
|
+ Example 1.121. event_route[tm:local-response] usage
|
|
|
...
|
|
|
event_route[tm:local-response] {
|
|
|
xlog("tm:local-response replied locally\n");
|
|
|
@@ -3541,7 +3565,7 @@ event_route[tm:local-response] {
|
|
|
Executed after the tm module sent the ACK of the 200ok for a local
|
|
|
generated INVITE. It is executed with the received 200ok response.
|
|
|
|
|
|
- Example 1.121. event_route[tm:local-ack-sent] usage
|
|
|
+ Example 1.122. event_route[tm:local-ack-sent] usage
|
|
|
...
|
|
|
event_route[tm:local-ack-sent] {
|
|
|
xlog("ACK for local INVITE was sent\n");
|