... | ... |
@@ -110,14 +110,15 @@ Juha Heinanen |
110 | 110 |
5.38. t_load_contacts() |
111 | 111 |
5.39. t_next_contacts() |
112 | 112 |
5.40. t_next_contact_flow() |
113 |
- 5.41. t_check_trans() |
|
114 |
- 5.42. t_set_disable_6xx(0|1) |
|
115 |
- 5.43. t_set_disable_failover(0|1) |
|
116 |
- 5.44. t_set_disable_internal_reply(0|1) |
|
117 |
- 5.45. t_replicate(params) |
|
118 |
- 5.46. t_relay_to(proxy, flags) |
|
119 |
- 5.47. t_set_no_e2e_cancel_reason(0|1) |
|
120 |
- 5.48. t_is_set(target) |
|
113 |
+ 5.41. t_check_status(re) |
|
114 |
+ 5.42. t_check_trans() |
|
115 |
+ 5.43. t_set_disable_6xx(0|1) |
|
116 |
+ 5.44. t_set_disable_failover(0|1) |
|
117 |
+ 5.45. t_set_disable_internal_reply(0|1) |
|
118 |
+ 5.46. t_replicate(params) |
|
119 |
+ 5.47. t_relay_to(proxy, flags) |
|
120 |
+ 5.48. t_set_no_e2e_cancel_reason(0|1) |
|
121 |
+ 5.49. t_is_set(target) |
|
121 | 122 |
|
122 | 123 |
6. TM Module API |
123 | 124 |
|
... | ... |
@@ -219,15 +220,16 @@ Juha Heinanen |
219 | 220 |
1.76. t_load_contacts usage |
220 | 221 |
1.77. t_next_contacts usage |
221 | 222 |
1.78. t_next_contact_flow usage |
222 |
- 1.79. t_check_trans usage |
|
223 |
- 1.80. t_set_disable_6xx usage |
|
224 |
- 1.81. t_set_disable_failover usage |
|
225 |
- 1.82. t_set_disable_internal_reply usage |
|
226 |
- 1.83. t_replicate usage |
|
223 |
+ 1.79. t_check_status usage |
|
224 |
+ 1.80. t_check_trans usage |
|
225 |
+ 1.81. t_set_disable_6xx usage |
|
226 |
+ 1.82. t_set_disable_failover usage |
|
227 |
+ 1.83. t_set_disable_internal_reply usage |
|
227 | 228 |
1.84. t_replicate usage |
228 |
- 1.85. t_set_no_e2e_cancel_reason usage |
|
229 |
- 1.86. t_replicate usage |
|
230 |
- 1.87. event_route[tm:branch-failure] usage |
|
229 |
+ 1.85. t_replicate usage |
|
230 |
+ 1.86. t_set_no_e2e_cancel_reason usage |
|
231 |
+ 1.87. t_replicate usage |
|
232 |
+ 1.88. event_route[tm:branch-failure] usage |
|
231 | 233 |
|
232 | 234 |
Chapter 1. Admin Guide |
233 | 235 |
|
... | ... |
@@ -326,14 +328,15 @@ Chapter 1. Admin Guide |
326 | 328 |
5.38. t_load_contacts() |
327 | 329 |
5.39. t_next_contacts() |
328 | 330 |
5.40. t_next_contact_flow() |
329 |
- 5.41. t_check_trans() |
|
330 |
- 5.42. t_set_disable_6xx(0|1) |
|
331 |
- 5.43. t_set_disable_failover(0|1) |
|
332 |
- 5.44. t_set_disable_internal_reply(0|1) |
|
333 |
- 5.45. t_replicate(params) |
|
334 |
- 5.46. t_relay_to(proxy, flags) |
|
335 |
- 5.47. t_set_no_e2e_cancel_reason(0|1) |
|
336 |
- 5.48. t_is_set(target) |
|
331 |
+ 5.41. t_check_status(re) |
|
332 |
+ 5.42. t_check_trans() |
|
333 |
+ 5.43. t_set_disable_6xx(0|1) |
|
334 |
+ 5.44. t_set_disable_failover(0|1) |
|
335 |
+ 5.45. t_set_disable_internal_reply(0|1) |
|
336 |
+ 5.46. t_replicate(params) |
|
337 |
+ 5.47. t_relay_to(proxy, flags) |
|
338 |
+ 5.48. t_set_no_e2e_cancel_reason(0|1) |
|
339 |
+ 5.49. t_is_set(target) |
|
337 | 340 |
|
338 | 341 |
6. TM Module API |
339 | 342 |
|
... | ... |
@@ -1594,14 +1597,15 @@ modparam("tm", "dns_reuse_rcv_socket", 1) |
1594 | 1597 |
5.38. t_load_contacts() |
1595 | 1598 |
5.39. t_next_contacts() |
1596 | 1599 |
5.40. t_next_contact_flow() |
1597 |
- 5.41. t_check_trans() |
|
1598 |
- 5.42. t_set_disable_6xx(0|1) |
|
1599 |
- 5.43. t_set_disable_failover(0|1) |
|
1600 |
- 5.44. t_set_disable_internal_reply(0|1) |
|
1601 |
- 5.45. t_replicate(params) |
|
1602 |
- 5.46. t_relay_to(proxy, flags) |
|
1603 |
- 5.47. t_set_no_e2e_cancel_reason(0|1) |
|
1604 |
- 5.48. t_is_set(target) |
|
1600 |
+ 5.41. t_check_status(re) |
|
1601 |
+ 5.42. t_check_trans() |
|
1602 |
+ 5.43. t_set_disable_6xx(0|1) |
|
1603 |
+ 5.44. t_set_disable_failover(0|1) |
|
1604 |
+ 5.45. t_set_disable_internal_reply(0|1) |
|
1605 |
+ 5.46. t_replicate(params) |
|
1606 |
+ 5.47. t_relay_to(proxy, flags) |
|
1607 |
+ 5.48. t_set_no_e2e_cancel_reason(0|1) |
|
1608 |
+ 5.49. t_is_set(target) |
|
1605 | 1609 |
|
1606 | 1610 |
5.1. t_relay([host, port]) |
1607 | 1611 |
|
... | ... |
@@ -2425,7 +2429,25 @@ event_route[tm:branch-failure:outbound] |
2425 | 2429 |
} |
2426 | 2430 |
... |
2427 | 2431 |
|
2428 |
-5.41. t_check_trans() |
|
2432 |
+5.41. t_check_status(re) |
|
2433 |
+ |
|
2434 |
+ Returns true if the regular expresion "re" match the reply code of the |
|
2435 |
+ response message as follows: |
|
2436 |
+ * in routing block - the code of the last sent reply. |
|
2437 |
+ * in on_reply block - the code of the current received reply. |
|
2438 |
+ * in on_failure block - the code of the selected negative final |
|
2439 |
+ reply. |
|
2440 |
+ |
|
2441 |
+ This function can be used from ANY_ROUTE . |
|
2442 |
+ |
|
2443 |
+ Example 1.79. t_check_status usage |
|
2444 |
+... |
|
2445 |
+if (t_check_status("(487)|(408)")) { |
|
2446 |
+ log("487 or 408 negative reply\n"); |
|
2447 |
+} |
|
2448 |
+... |
|
2449 |
+ |
|
2450 |
+5.42. t_check_trans() |
|
2429 | 2451 |
|
2430 | 2452 |
t_check_trans() can be used to quickly check if a message belongs or is |
2431 | 2453 |
related to a transaction. It behaves differently for different types of |
... | ... |
@@ -2470,12 +2492,12 @@ Note |
2470 | 2492 |
|
2471 | 2493 |
See also: t_lookup_request(), t_lookup_cancel(). |
2472 | 2494 |
|
2473 |
- Example 1.79. t_check_trans usage |
|
2495 |
+ Example 1.80. t_check_trans usage |
|
2474 | 2496 |
if ( method == "CANCEL" && !t_check_trans()) |
2475 | 2497 |
sl_reply("403", "cancel out of the blue forbidden"); |
2476 | 2498 |
# note: in this example t_check_trans() can be replaced by t_lookup_cancel() |
2477 | 2499 |
|
2478 |
-5.42. t_set_disable_6xx(0|1) |
|
2500 |
+5.43. t_set_disable_6xx(0|1) |
|
2479 | 2501 |
|
2480 | 2502 |
Turn off/on 6xx replies special rfc conformant handling on a per |
2481 | 2503 |
transaction basis. If turned off (t_set_disable_6xx("1")) 6XXs will be |
... | ... |
@@ -2485,7 +2507,7 @@ if ( method == "CANCEL" && !t_check_trans()) |
2485 | 2507 |
|
2486 | 2508 |
See also: disable_6xx_block. |
2487 | 2509 |
|
2488 |
- Example 1.80. t_set_disable_6xx usage |
|
2510 |
+ Example 1.81. t_set_disable_6xx usage |
|
2489 | 2511 |
... |
2490 | 2512 |
route { |
2491 | 2513 |
... |
... | ... |
@@ -2494,13 +2516,13 @@ route { |
2494 | 2516 |
... |
2495 | 2517 |
} |
2496 | 2518 |
|
2497 |
-5.43. t_set_disable_failover(0|1) |
|
2519 |
+5.44. t_set_disable_failover(0|1) |
|
2498 | 2520 |
|
2499 | 2521 |
Turn off/on dns failover on a per transaction basis. |
2500 | 2522 |
|
2501 | 2523 |
See also: use_dns_failover. |
2502 | 2524 |
|
2503 |
- Example 1.81. t_set_disable_failover usage |
|
2525 |
+ Example 1.82. t_set_disable_failover usage |
|
2504 | 2526 |
... |
2505 | 2527 |
route { |
2506 | 2528 |
... |
... | ... |
@@ -2509,11 +2531,11 @@ route { |
2509 | 2531 |
... |
2510 | 2532 |
} |
2511 | 2533 |
|
2512 |
-5.44. t_set_disable_internal_reply(0|1) |
|
2534 |
+5.45. t_set_disable_internal_reply(0|1) |
|
2513 | 2535 |
|
2514 | 2536 |
Turn off/on sending internally a SIP reply in case of relay errors. |
2515 | 2537 |
|
2516 |
- Example 1.82. t_set_disable_internal_reply usage |
|
2538 |
+ Example 1.83. t_set_disable_internal_reply usage |
|
2517 | 2539 |
... |
2518 | 2540 |
t_set_disable_internal_reply(1); # turn off sending internal reply on error |
2519 | 2541 |
if(!t_relay()) { |
... | ... |
@@ -2521,7 +2543,7 @@ if(!t_relay()) { |
2521 | 2543 |
} |
2522 | 2544 |
... |
2523 | 2545 |
|
2524 |
-5.45. t_replicate(params) |
|
2546 |
+5.46. t_replicate(params) |
|
2525 | 2547 |
|
2526 | 2548 |
Replicate the SIP request to a specific address. |
2527 | 2549 |
|
... | ... |
@@ -2543,7 +2565,7 @@ if(!t_relay()) { |
2543 | 2565 |
* hostport - address in "host:port" format. It can be given via an |
2544 | 2566 |
AVP. |
2545 | 2567 |
|
2546 |
- Example 1.83. t_replicate usage |
|
2568 |
+ Example 1.84. t_replicate usage |
|
2547 | 2569 |
... |
2548 | 2570 |
# sent to 1.2.3.4:5060 over tcp |
2549 | 2571 |
t_replicate("sip:1.2.3.4:5060;transport=tcp"); |
... | ... |
@@ -2556,7 +2578,7 @@ t_replicate("sip:$var(h);transport=tls"); |
2556 | 2578 |
t_replicate_to_udp("1.2.3.4", "5060"); |
2557 | 2579 |
... |
2558 | 2580 |
|
2559 |
-5.46. t_relay_to(proxy, flags) |
|
2581 |
+5.47. t_relay_to(proxy, flags) |
|
2560 | 2582 |
|
2561 | 2583 |
Forward the SIP request to a specific address, controlling internal |
2562 | 2584 |
behavior via flags. |
... | ... |
@@ -2577,7 +2599,7 @@ t_replicate_to_udp("1.2.3.4", "5060"); |
2577 | 2599 |
+ 0x02 - do not generate reply on internal error. |
2578 | 2600 |
+ 0x04 - disable dns failover. |
2579 | 2601 |
|
2580 |
- Example 1.84. t_replicate usage |
|
2602 |
+ Example 1.85. t_replicate usage |
|
2581 | 2603 |
... |
2582 | 2604 |
# sent to 1.2.3.4:5060 over tcp |
2583 | 2605 |
t_relay_to("tcp:1.2.3.4:5060"); |
... | ... |
@@ -2589,7 +2611,7 @@ t_relay_to("tls:1.2.3.4"); |
2589 | 2611 |
t_relay_to("0x01"); |
2590 | 2612 |
... |
2591 | 2613 |
|
2592 |
-5.47. t_set_no_e2e_cancel_reason(0|1) |
|
2614 |
+5.48. t_set_no_e2e_cancel_reason(0|1) |
|
2593 | 2615 |
|
2594 | 2616 |
Enables/disables reason header (RFC 3326) copying from the triggering |
2595 | 2617 |
received CANCEL to the generated hop-by-hop CANCEL. 0 enables and 1 |
... | ... |
@@ -2600,7 +2622,7 @@ t_relay_to("0x01"); |
2600 | 2622 |
|
2601 | 2623 |
See also: e2e_cancel_reason. |
2602 | 2624 |
|
2603 |
- Example 1.85. t_set_no_e2e_cancel_reason usage |
|
2625 |
+ Example 1.86. t_set_no_e2e_cancel_reason usage |
|
2604 | 2626 |
... |
2605 | 2627 |
route { |
2606 | 2628 |
... |
... | ... |
@@ -2610,7 +2632,7 @@ opying |
2610 | 2632 |
... |
2611 | 2633 |
} |
2612 | 2634 |
|
2613 |
-5.48. t_is_set(target) |
|
2635 |
+5.49. t_is_set(target) |
|
2614 | 2636 |
|
2615 | 2637 |
Return true if the attribute specified by 'target' is set for |
2616 | 2638 |
transaction. |
... | ... |
@@ -2623,7 +2645,7 @@ opying |
2623 | 2645 |
* onreply_route - the function returns true if an onreply route is |
2624 | 2646 |
set to be executed. |
2625 | 2647 |
|
2626 |
- Example 1.86. t_replicate usage |
|
2648 |
+ Example 1.87. t_replicate usage |
|
2627 | 2649 |
... |
2628 | 2650 |
if(!t_is_set("failure_route")) |
2629 | 2651 |
LM_DBG("no failure route will be executed for current transaction\n"); |
... | ... |
@@ -2810,7 +2832,7 @@ action *route) |
2810 | 2832 |
enabled with the t_on_branch_failure function. This event_route uses |
2811 | 2833 |
the BRANCH_FAILURE_ROUTE route type. |
2812 | 2834 |
|
2813 |
- Example 1.87. event_route[tm:branch-failure] usage |
|
2835 |
+ Example 1.88. event_route[tm:branch-failure] usage |
|
2814 | 2836 |
... |
2815 | 2837 |
route { |
2816 | 2838 |
t_on_branch_failure("myroute"); |