Module: sip-router Branch: kamailio_3.0 Commit: d8af3a4b17bf1ca71df1d977d986f407ff34cfc2 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d8af3a4b...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Jan 6 15:39:46 2010 +0100
tm: documented t_relay_to() function
---
modules/tm/README | 39 +++++++++++++++++++++- modules/tm/doc/functions.xml | 74 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 109 insertions(+), 4 deletions(-)
diff --git a/modules/tm/README b/modules/tm/README index 33125c8..a971836 100644 --- a/modules/tm/README +++ b/modules/tm/README @@ -104,6 +104,7 @@ Juha Heinanen 1.5.34. t_set_disable_6xx(0|1) 1.5.35. t_set_disable_failover(0|1) 1.5.36. t_replicate(params) + 1.5.37. t_relay_to(proxy, flags)
1.6. TM Module API
@@ -2014,14 +2015,48 @@ route { # sent to 1.2.3.4:5060 over tcp t_replicate("sip:1.2.3.4:5060;transport=tcp");
-# sent to 1.2.3.4:5060 over tls -$var(h) = "1.2.3.4:5060"; +# sent to 1.2.3.4:5061 over tls +$var(h) = "1.2.3.4:5061"; t_replicate("sip:$var(h);transport=tls");
# sent to 1.2.3.4:5060 over udp t_replicate_to_udp("1.2.3.4", "5060"); ...
+1.5.37. t_relay_to(proxy, flags) + + Forward the SIP request to a specific address, controlling internal + behavior via flags. + + There are several function prototypes: + * t_relay_to(), + * t_relay_to(proxy), + * t_relay_to(flags) + * t_relay_to(proxy, flags) + + Meaning of the parameters is as follows: + * proxy - address where the request should be sent. Format is: + "proto:host:port" - any of proto or port can be ommitted, along + with the semicolon after or before. + * flags - bitmask integer value to control the internal behavior. + Bits can be: + + 0x01 - do not generate 100 reply. + + 0x02 - do not generate reply on internal error (NOTE: has no + effect anymore). + + 0x04 - disable dns failover. + + Example 74. t_replicate usage +... +# sent to 1.2.3.4:5060 over tcp +t_relay_to("tcp:1.2.3.4:5060"); + +# sent to 1.2.3.4 over tls +t_relay_to("tls:1.2.3.4"); + +# sent to dst URI or R-URI without a 100 reply +t_relay_to("0x01"); +... + 1.6. TM Module API
Revision History diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml index dc2835d..dc4207c 100644 --- a/modules/tm/doc/functions.xml +++ b/modules/tm/doc/functions.xml @@ -1387,8 +1387,8 @@ route { # sent to 1.2.3.4:5060 over tcp t_replicate("sip:1.2.3.4:5060;transport=tcp");
-# sent to 1.2.3.4:5060 over tls -$var(h) = "1.2.3.4:5060"; +# sent to 1.2.3.4:5061 over tls +$var(h) = "1.2.3.4:5061"; t_replicate("sip:$var(h);transport=tls");
# sent to 1.2.3.4:5060 over udp @@ -1397,5 +1397,75 @@ t_replicate_to_udp("1.2.3.4", "5060"); </programlisting> </example> </section> + <section id="t_relay_to"> + <title> + <function>t_relay_to(proxy, flags)</function> + </title> + <para> + Forward the SIP request to a specific address, controlling internal + behavior via flags. + </para> + <para> + There are several function prototypes: + <itemizedlist> + <listitem> + <function>t_relay_to()</function>, + </listitem> + <listitem> + <function>t_relay_to(proxy)</function>, + </listitem> + <listitem> + <function>t_relay_to(flags)</function> + </listitem> + <listitem> + <function>t_relay_to(proxy, flags)</function> + </listitem> + </itemizedlist> + </para> + <para>Meaning of the parameters is as follows:</para> + <itemizedlist> + <listitem> + <para><emphasis>proxy</emphasis> - address where the request should + be sent. Format is: "proto:host:port" - any of proto or port can be + ommitted, along with the semicolon after or before. + </para> + </listitem> + <listitem> + <para><emphasis>flags</emphasis> - bitmask integer value to control + the internal behavior. Bits can be: + </para> + <itemizedlist> + <listitem> + <para><emphasis>0x01</emphasis> - do not generate 100 reply. + </para> + </listitem> + <listitem> + <para><emphasis>0x02</emphasis> - do not generate reply on internal + error (NOTE: has no effect anymore). + </para> + </listitem> + <listitem> + <para><emphasis>0x04</emphasis> - disable dns failover. + </para> + </listitem> + </itemizedlist> + </listitem> + </itemizedlist> + <example> + <title><function>t_replicate</function> usage</title> + <programlisting> +... +# sent to 1.2.3.4:5060 over tcp +t_relay_to("tcp:1.2.3.4:5060"); + +# sent to 1.2.3.4 over tls +t_relay_to("tls:1.2.3.4"); + +# sent to dst URI or R-URI without a 100 reply +t_relay_to("0x01"); +... + </programlisting> + </example> + </section>
</section>