Revision: 5883
http://openser.svn.sourceforge.net/openser/?rev=5883&view=rev
Author: ibc_sf
Date: 2009-06-23 17:06:19 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
- Debian Control files: Replaced GnuTLS with OpenSSL since OpenSSL provides better performance:
http://www.mail-archive.com/lftp-devel@uniyar.ac.ru/msg01487.html
Modified Paths:
--------------
trunk/packaging/debian/control
trunk/packaging/debian-etch/control
trunk/packaging/debian-lenny/control
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
On Dienstag, 23. Juni 2009, you wrote:
> > is it inherited in this case? the tls implementation in core of kamailio
> > is binding directly to openssl library and therefore need for the gpl
> > disclaimer, but in this case utils binds to curl library.
> >
> > In sip router this is fixed I guess and tls is shipped with debs --
> > anyhow, tls is a module in sr, the core is the same.
Hi Jan,
> If I understand it correctly, we are talking here about Debian control
> files that are being kept in the git repository, right? But aren't those
> files intended for people who want to build Debian packages themselves,
> rather than for official Debian developers? As far as I know official
> Debian developers maintain their control files elsewhere, and in fact it is
> recommended that upstream projects do not provide their own control files.
sure, our debian control files are different then the official ones. And they
are maintained in a different repository, e.g. in "pkg-voip" for kamailio. But
they are synchronised from time to time.
> If this is the case, does it really matter if we keep libcurl4-openssl-dev
> in our control files? We know that all the stuff should work (at least was
> developed with) with openssl, so shouldn't this be the default for the
> people who attempt to build the packages themselves?
>
> Also note that the -dev packages are only needed to actually build
> packages, they are not needed at runtime. They only contain files that are
> needed to compile applications that use libcurl. Corresponding runtime
> libraries are in libcurl3 (openssl version) and libcurl3-gnutls (gnutls
> version) and these can be installed at the same time. What this means is
> that it is not possible to *compile* applications for use with
> libcurl-openssl and libcurl-gnutls at the same time.
I've nothing against it, just wanted to note that it makes packaging a bit
harder from a debian POV.
Henning
while testing new version of lcr module, i got this kind of tm errors:
Jun 22 11:27:36 localhost /usr/sbin/sip-router[16330]: ERROR: tm [t_reply.c:1066]: ERROR: t_should_relay_response: status rewrite by UAS: stored: 408, received: 403
Jun 22 11:27:36 localhost /usr/sbin/sip-router[16329]: ERROR: tm [t_reply.c:1066]: ERROR: t_should_relay_response: status rewrite by UAS: stored: 408, received: 403
Jun 22 11:27:37 localhost /usr/sbin/sip-router[16331]: ERROR: tm [t_reply.c:1066]: ERROR: t_should_relay_response: status rewrite by UAS: stored: 408, received: 403
Jun 22 11:27:39 localhost /usr/sbin/sip-router[16331]: ERROR: tm [t_reply.c:1066]: ERROR: t_should_relay_response: status rewrite by UAS: stored: 408, received: 403
they came when i first called t_relay 4 times. first call was in route
block and the rest in failure route block. there was no reply to any of
these four calls and each time fr_timer hit. on fifth call, gw
responded with 403.
i don't get these kind of errors in k. what do they mean and how to get
rid of them?
-- juha
Module: sip-router
Branch: master
Commit: c263b1a7a83f7143093e699754b377647d54496d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c263b1a…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jun 22 17:26:47 2009 +0200
tm doc: t_check_trans and note about fr_timer_avp
- added missing t_check_trans docs
- added fr_timer_avp and fr_inv_timer_avp notes about new empty/zero
avp value handling (use default value) and about using seconds
instead of milliseconds.
---
modules/tm/doc/functions.xml | 75 ++++++++++++++++++++++++++++++++++++++++++
modules/tm/doc/params.xml | 30 ++++++++++++++--
2 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/modules/tm/doc/functions.xml b/modules/tm/doc/functions.xml
index 70309a5..d3b21d0 100644
--- a/modules/tm/doc/functions.xml
+++ b/modules/tm/doc/functions.xml
@@ -1104,4 +1104,79 @@ if (!t_next_contacts()) {
</example>
</section>
+ <section id="t_check_trans">
+ <title>
+ <function>t_check_trans()</function>
+ </title>
+ <para>
+ <function>t_check_trans()</function> can be used to quickly check if
+ a message belongs or is related to a transaction. It behaves
+ differently for different types of messages:
+ <itemizedlist>
+ <listitem>
+ <para>For a SIP Reply it returns true if the reply belongs to
+ an existing transaction and false otherwise.</para>
+ </listitem>
+ <listitem>
+ <para>For a CANCEL it behaves exactly as
+ <function>t_lookup_cancel()</function>: returns true if a
+ corresponding INVITE transaction exists for the CANCEL and
+ false otherwise.</para>
+ </listitem>
+ <listitem>
+ <para>For ACKs to negative replies or for ACKs to local
+ transactions it will terminate the script if the ACK belongs
+ to a transaction (it would make very little sense to process
+ an ACK to a negative reply for an existing transaction in
+ some other way then to simply pass it to tm) or return false
+ if not.</para>
+ </listitem>
+ <listitem>
+ <para>For end-to-end ACKs (ACKs to 2xx responses for forwarded
+ INVITE transactions) it will return true if the corresponding
+ INVITE transaction is found and still active and false if not.
+ </para>
+ <note>Note that the e2e ACK matching is more of a hint
+ then a certainty. A delayed e2e ACK might arrive after the
+ transaction wait time elapses, when the INVITE transaction no
+ longer exists and thus would not match anything. There are
+ also cases when tm would not keep all the information needed
+ for e2e ACK matching (since this is not needed for a statefull
+ proxy and it requires additional memory, tm will not keep this
+ information unless needed by some other module or callbacks).
+ </note>
+ </listitem>
+ <listitem>
+ <para>For other requests (non ACKs and non CANCELs), it will
+ terminate the script for retransmissions and return false for
+ new requests (for which no transaction exists yet).</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <note><para>
+ An important difference from kamailio version is that for an ACK to
+ negative reply or for a local transaction, the script execution will be
+ immediately stopped and the message handled by tm, instead of returning
+ true.
+ </para></note>
+ <para><function>t_check_trans()</function> functionality for requests,
+ except for the e2e ACK matching, can be replicated in the script
+ using <function>t_lookup_cancel()</function> and
+ <function>t_lookup_request()</function>.
+ </para>
+ <para>See also: <function>t_lookup_request()</function>,
+ <function>t_lookup_cancel()</function>.
+ </para>
+ <example>
+ <title><function>t_check_trans</function> usage</title>
+ <programlisting>
+
+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()
+
+ </programlisting>
+ </example>
+ </section>
+
</section>
diff --git a/modules/tm/doc/params.xml b/modules/tm/doc/params.xml
index ddfcb29..7df9f13 100644
--- a/modules/tm/doc/params.xml
+++ b/modules/tm/doc/params.xml
@@ -809,6 +809,17 @@ modparam("tm", "contacts_avp", "$avp(i:25)")
The value of this parameter is the the name of the AVP to be
checked, without the $ character or "$avp" prefix.
</para>
+ <note><para>
+ The value of the AVP is expected to be expressed in
+ <emphasis>seconds</emphasis> and not milliseconds (unlike the rest
+ of the timers).
+ </para></note>
+ <para>
+ This parameter is kept for backwards compatibility (hence its
+ value expressed in seconds instead of milliseconds and its arcane
+ way of specifying the avps). The recommended replacement is using
+ <function>t_set_fr()</function> on a per transaction basis.
+ </para>
<para>
See also: <function>t_set_fr()</function>,
<varname>fr_timer</varname>.
@@ -830,15 +841,26 @@ modparam("tm", "fr_timer_avp", "i:708")
per-transaction basis. The administrator can provide a value to be
used for a particular transaction in an AVP. This parameter
contains the name of the AVP that will be checked. If the AVP
- exists then its value will be used for the fr_inv_timer timer,
- effectively overriding the value configured in
- <varname>fr_inv_timer</varname> parameter for the current
- transaction.
+ exists, is non-empty and non-zero then its value will be used
+ for the fr_inv_timer timer, effectively overriding the value
+ configured in <varname>fr_inv_timer</varname> parameter for the
+ current transaction.
</para>
<para>
The value of this parameter is the the name of the AVP to be
checked, without the $ character or "$avp" prefix.
</para>
+ <note><para>
+ The value of the AVP is expected to be expressed in
+ <emphasis>seconds</emphasis> and not milliseconds (unlike the rest
+ of the timers).
+ </para></note>
+ <para>
+ This parameter is kept for backwards compatibility (hence its
+ value expressed in seconds instead of milliseconds and its arcane
+ way of specifying the avps). The recommended replacement is using
+ <function>t_set_fr()</function> on a per transaction basis.
+ </para>
<para>
See also: <function>t_set_fr()</function>,
<varname>fr_inv_timer</varname>.
Module: sip-router
Branch: master
Commit: e5cf7a1831e380cd6bd43e5a36dfd6d04625bc41
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e5cf7a1…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jun 22 17:32:44 2009 +0200
tm doc: README re-generated
---
modules/tm/README | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 165 insertions(+), 3 deletions(-)
diff --git a/modules/tm/README b/modules/tm/README
index db20c8d..39e3261 100644
--- a/modules/tm/README
+++ b/modules/tm/README
@@ -15,6 +15,97 @@ Juha Heinanen
Revision $Revision$ $Date$
__________________________________________________________________
+ 1.1. Overview
+ 1.2. Known Issues
+ 1.3. Parameters
+
+ 1.3.1. fr_timer (integer)
+ 1.3.2. fr_inv_timer (integer)
+ 1.3.3. max_inv_lifetime (integer)
+ 1.3.4. max_noninv_lifetime (integer)
+ 1.3.5. wt_timer (integer)
+ 1.3.6. delete_timer (integer)
+ 1.3.7. retr_timer1 (integer)
+ 1.3.8. retr_timer2 (integer)
+ 1.3.9. noisy_ctimer (integer)
+ 1.3.10. restart_fr_on_each_reply (integer)
+ 1.3.11. auto_inv_100 (integer)
+ 1.3.12. auto_inv_100_reason (string)
+ 1.3.13. unix_tx_timeout (integer)
+ 1.3.14. aggregate_challenges (integer)
+ 1.3.15. reparse_invite (integer)
+ 1.3.16. ac_extra_hdrs (string)
+ 1.3.17. blst_503 (integer)
+ 1.3.18. blst_503_def_timeout (integer)
+ 1.3.19. blst_503_min_timeout (integer)
+ 1.3.20. blst_503_max_timeout (integer)
+ 1.3.21. blst_methods_add (unsigned integer)
+ 1.3.22. blst_methods_lookup (unsigned integer)
+ 1.3.23. cancel_b_method (integer)
+ 1.3.24. reparse_on_dns_failover (integer)
+ 1.3.25. on_sl_reply (string)
+ 1.3.26. fr_inv_timer_next (integer)
+ 1.3.27. contacts_avp (string)
+ 1.3.28. fr_timer_avp (string)
+ 1.3.29. fr_inv_timer_avp (string)
+
+ 1.4. Functions
+
+ 1.4.1. t_relay_to_udp(ip, port), t_relay_to_udp(),
+ t_relay_to_tcp(ip, port) t_relay_to_tcp()
+ t_relay_to_tls(ip, port) t_relay_to_tls()
+ t_relay_to_sctp(ip, port) t_relay_to_sctp()
+
+ 1.4.2. t_relay() t_relay(host, port)
+ 1.4.3. t_on_failure(failure_route)
+ 1.4.4. t_on_reply(onreply_route)
+ 1.4.5. t_on_branch(branch_route)
+ 1.4.6. append_branch()
+ 1.4.7. t_newtran()
+ 1.4.8. t_reply(code, reason_phrase)
+ 1.4.9. t_lookup_request()
+ 1.4.10. t_retransmit_reply()
+ 1.4.11. t_release()
+ 1.4.12. t_forward_nonack() t_forward_nonack(ip, port)
+ t_forward_nonack_udp(ip, port) t_forward_nonack_tcp(ip,
+ port) t_forward_nonack_tls(ip, port)
+ t_forward_nonack_sctp(ip, port)
+
+ 1.4.13. t_set_fr(fr_inv_timeout [, fr_timeout])
+ 1.4.14. t_reset_fr()
+ 1.4.15. t_set_max_lifetime(inv_lifetime, noninv_lifetime)
+ 1.4.16. t_reset_max_lifetime()
+ 1.4.17. t_set_retr(retr_t1_interval, retr_t2_interval)
+ 1.4.18. t_reset_retr()
+ 1.4.19. t_set_auto_inv_100(0|1)
+ 1.4.20. t_branch_timeout()
+ 1.4.21. t_branch_replied()
+ 1.4.22. t_any_timeout()
+ 1.4.23. t_any_replied()
+ 1.4.24. t_grep_status("code")
+ 1.4.25. t_is_canceled()
+ 1.4.26. t_is_expired()
+ 1.4.27. t_relay_cancel()
+ 1.4.28. t_lookup_cancel(), t_lookup_cancel(1)
+ 1.4.29. t_drop_replies()
+ 1.4.30. t_save_lumps()
+ 1.4.31. t_load_contacts()
+ 1.4.32. t_next_contacts()
+ 1.4.33. t_check_trans()
+
+ 1.5. TM Module API
+
+ 1.5.1. Defines
+ 1.5.2. Functions
+
+ 1.5.2.1. register_tmcb(cb_type, cb_func)
+ 1.5.2.2. load_tm(*import_structure)
+ 1.5.2.3. int t_suspend(struct sip_msg *msg, unsigned int
+ *hash_index, unsigned int *label)
+
+ 1.5.2.4. int t_continue(unsigned int hash_index, unsigned
+ int label, struct action *route)
+
1.1. Overview
TM module enables stateful processing of SIP transactions. The main use
@@ -617,6 +708,16 @@ modparam("tm", "contacts_avp", "$avp(i:25)")
The value of this parameter is the the name of the AVP to be checked,
without the $ character or "$avp" prefix.
+Note
+
+ The value of the AVP is expected to be expressed in seconds and not
+ milliseconds (unlike the rest of the timers).
+
+ This parameter is kept for backwards compatibility (hence its value
+ expressed in seconds instead of milliseconds and its arcane way of
+ specifying the avps). The recommended replacement is using t_set_fr()
+ on a per transaction basis.
+
See also: t_set_fr(), fr_timer.
Example 28. Set fr_timer_avp parameter
@@ -629,13 +730,24 @@ modparam("tm", "fr_timer_avp", "i:708")
The value of fr_inv_timer timer can be overriden on per-transaction
basis. The administrator can provide a value to be used for a
particular transaction in an AVP. This parameter contains the name of
- the AVP that will be checked. If the AVP exists then its value will be
- used for the fr_inv_timer timer, effectively overriding the value
- configured in fr_inv_timer parameter for the current transaction.
+ the AVP that will be checked. If the AVP exists, is non-empty and
+ non-zero then its value will be used for the fr_inv_timer timer,
+ effectively overriding the value configured in fr_inv_timer parameter
+ for the current transaction.
The value of this parameter is the the name of the AVP to be checked,
without the $ character or "$avp" prefix.
+Note
+
+ The value of the AVP is expected to be expressed in seconds and not
+ milliseconds (unlike the rest of the timers).
+
+ This parameter is kept for backwards compatibility (hence its value
+ expressed in seconds instead of milliseconds and its arcane way of
+ specifying the avps). The recommended replacement is using t_set_fr()
+ on a per transaction basis.
+
See also: t_set_fr(), fr_inv_timer.
Example 29. Set fr_inv_timer_avp parameter
@@ -1350,6 +1462,56 @@ if (!t_next_contacts()) {
};
...
+1.4.33. t_check_trans()
+
+ t_check_trans() can be used to quickly check if a message belongs or is
+ related to a transaction. It behaves differently for different types of
+ messages:
+ * For a SIP Reply it returns true if the reply belongs to an existing
+ transaction and false otherwise.
+ * For a CANCEL it behaves exactly as t_lookup_cancel(): returns true
+ if a corresponding INVITE transaction exists for the CANCEL and
+ false otherwise.
+ * For ACKs to negative replies or for ACKs to local transactions it
+ will terminate the script if the ACK belongs to a transaction (it
+ would make very little sense to process an ACK to a negative reply
+ for an existing transaction in some other way then to simply pass
+ it to tm) or return false if not.
+ * For end-to-end ACKs (ACKs to 2xx responses for forwarded INVITE
+ transactions) it will return true if the corresponding INVITE
+ transaction is found and still active and false if not.
+
+Note
+ Note that the e2e ACK matching is more of a hint then a certainty.
+ A delayed e2e ACK might arrive after the transaction wait time
+ elapses, when the INVITE transaction no longer exists and thus
+ would not match anything. There are also cases when tm would not
+ keep all the information needed for e2e ACK matching (since this is
+ not needed for a statefull proxy and it requires additional memory,
+ tm will not keep this information unless needed by some other
+ module or callbacks).
+ * For other requests (non ACKs and non CANCELs), it will terminate
+ the script for retransmissions and return false for new requests
+ (for which no transaction exists yet).
+
+Note
+
+ An important difference from kamailio version is that for an ACK to
+ negative reply or for a local transaction, the script execution will be
+ immediately stopped and the message handled by tm, instead of returning
+ true.
+
+ t_check_trans() functionality for requests, except for the e2e ACK
+ matching, can be replicated in the script using t_lookup_cancel() and
+ t_lookup_request().
+
+ See also: t_lookup_request(), t_lookup_cancel().
+
+ Example 62. 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()
+
1.5. TM Module API
Revision History
Module: sip-router
Branch: master
Commit: bcc993680ca2722aec2e4f240569cb7979808e18
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bcc9936…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Jun 22 16:00:10 2009 +0200
tm: ignore avp timers with 0 or empty value
Kamailio compatibility: If an avp timer (fr_timer_avp or
fr_inv_timer_avp) is empty ("") or 0, use the default timer
value (fr_timer or fr_inv_timer).
Reported-by: Juha Heinanen jh at tutpro com.
---
modules/tm/t_funcs.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index c228b60..d60c99e 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -416,8 +416,9 @@ int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param,
}
-/*
- * Get the FR_{INV}_TIMER from corresponding AVP
+/** Get the FR_{INV}_TIMER from corresponding AVP.
+ * @return 0 on success (use *timer) or 1 on failure (avp non-existent,
+ * avp present but empty/0, avp value not numeric).
*/
static inline int avp2timer(unsigned int* timer, int type, int_str name)
{
@@ -443,7 +444,7 @@ static inline int avp2timer(unsigned int* timer, int type, int_str name)
*timer = val_istr.n;
}
- return 0;
+ return *timer==0; /* 1 if 0 (use default), 0 if !=0 (use *timer) */
}