This patch helps us to handle inadequatness of Linphone mobile apps (both iOS and Android flavours are affected) without reinventing a lot of logics to handle each transport (we use TCP, TLS, WS, WSS).
E.g. if we have two TLS-based Linphone clients, even with enable_double_rr for gentle cross-forwarding we would get single RR header without transport= attribute, resulting in Linphone sending ACK and BYE via UDP.
This new option, being enabled, results in two RR headers being always inserted, with transport attribute being always added. I believe this cannot harm the installation with enable_double_rr, just makes instructions more explicit.
The Linphone's behaviour looks like a set of different bugs, but it would get us much more efforts to fix.
I don't know if any other useragent needs such workaround. So I would perfectly understand if this commit wouldn't be accepted upstream.
Also this commit currently lacks README doc rebuild, because I don't know how to do that. Only XML doc is updated.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/257
-- Commit Summary --
* rr: add enable_double_rr_always option
-- File Changes --
M modules/rr/doc/rr_admin.xml (24)
M modules/rr/record.c (14)
M modules/rr/rr_mod.c (2)
M modules/rr/rr_mod.h (1)
M tcp_read.c (5)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/257.patchhttps://github.com/kamailio/kamailio/pull/257.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/257
Module: kamailio
Branch: master
Commit: b344ba0b527c0c0dd12063f6f8a37f13bddb317b
URL: https://github.com/kamailio/kamailio/commit/b344ba0b527c0c0dd12063f6f8a37f1…
Author: Camille Oudot <camille.oudot(a)orange.com>
Committer: Camille Oudot <camille.oudot(a)orange.com>
Date: 2016-02-15T18:43:00+01:00
http_async_client: update doc with $http_req(key)
---
Modified: modules/http_async_client/doc/http_async_client_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/b344ba0b527c0c0dd12063f6f8a37f1…
Patch: https://github.com/kamailio/kamailio/commit/b344ba0b527c0c0dd12063f6f8a37f1…
---
diff --git a/modules/http_async_client/doc/http_async_client_admin.xml b/modules/http_async_client/doc/http_async_client_admin.xml
index 1a53d2d..45ac3b1 100644
--- a/modules/http_async_client/doc/http_async_client_admin.xml
+++ b/modules/http_async_client/doc/http_async_client_admin.xml
@@ -562,7 +562,33 @@ http_query("https://example.com/test.php", "HTTP_REPLY");
<section>
<title>Pseudo Variables</title>
- <para>The following pseudo variables can only be used in the callback routes executed by http_async_query()</para>
+ <para>The <literal>$http_req(key)</literal> write-only variable can be used to set custom parameters before sending a HTTP query</para>
+ <para>setting this variable has the same effect than using the <literal>http_set_*()</literal>functions</para>
+ <para><literal>key</literal> can be one of:</para>
+ <itemizedlist>
+ <listitem><para><emphasis>all</emphasis>: if set to <literal>$null</literal>, resets all the parameters to their default value (the ones defined in modparam)</para></listitem>
+ <listitem><para><emphasis>hdr</emphasis>: sets/modifies/remove a HTTP header (see <emphasis>http_append_header()</emphasis>). N.B.: setting this variable multiple times will add several headers to the query.</para></listitem>
+ <listitem><para><emphasis>method</emphasis>: sets the HTTP method (see <emphasis>http_set_method()</emphasis>)</para></listitem>
+ <listitem><para><emphasis>timeout</emphasis>: sets the HTTP timeout (see <emphasis>http_set_timeout()</emphasis>)</para></listitem>
+ <listitem><para><emphasis>tls_client_cert</emphasis>: sets the client certificate to use (see <emphasis>http_set_tls_client_cert()</emphasis>)</para></listitem>
+ <listitem><para><emphasis>tls_client_key</emphasis>: sets the client certificate key to use (see <emphasis>http_set_tls_client_key()</emphasis>)</para></listitem>
+ <listitem><para><emphasis>tls_ca_path</emphasis>: sets the CA certificate files to use (see <emphasis>http_set_tls_ca_path()</emphasis>)</para></listitem>
+ </itemizedlist>
+ <example>
+ <title><literal>$http_req(key)</literal> variable usage</title>
+ <programlisting format="linespecific">
+...
+$http_req(all) = $null; # reset the parameters
+$http_req(timeout) = 100; # 100 ms
+$http_req(method) = "DELETE";
+$http_req(hdr) = "X-Sip-Call-Id: " + $ci;
+$http_req(hdr) = "X-Foo: bar"; # add a 2nd header
+# the following request will use the above parameters
+http_query("https://example.com/test.php", "HTTP_REPLY");
+...
+ </programlisting>
+ </example>
+ <para>The following read-only pseudo variables can only be used in the callback routes executed by http_async_query()</para>
<itemizedlist>
<listitem><para>
<emphasis>$http_ok</emphasis>: 1 if cURL executed the request successfully, 0 otherwise (check $ah_err for details)
@@ -587,7 +613,6 @@ http_query("https://example.com/test.php", "HTTP_REPLY");
</para></listitem>
</itemizedlist>
</section>
-
<section>
<title>Statistics</title>
<section>
Dear,
We are looking for a Kamailio/asterisk/Open Ser programmer/engineer. We
need to fill this vacant job in our company. If you like to join our
team please send me an e-mail to numan(a)bmdcompany.com.
Best regards,
Emad