Module: kamailio
Branch: 5.5
Commit: 19901d0cdb6cf06a84315c19a27986bca7a05025
URL: https://github.com/kamailio/kamailio/commit/19901d0cdb6cf06a84315c19a27986b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-01T10:58:18+02:00
core: parse via - fixed whitespacing
(cherry picked from commit 01664d1d82dcfe952fce29033b4fcd5e44cf2319)
---
Modified: src/core/parser/parse_via.h
---
Diff: https://github.com/kamailio/kamailio/commit/19901d0cdb6cf06a84315c19a27986b…
Patch: https://github.com/kamailio/kamailio/commit/19901d0cdb6cf06a84315c19a27986b…
---
diff --git a/src/core/parser/parse_via.h b/src/core/parser/parse_via.h
index fca486e358..e4957961f1 100644
--- a/src/core/parser/parse_via.h
+++ b/src/core/parser/parse_via.h
@@ -13,8 +13,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -32,11 +32,11 @@
struct sip_msg;
/* via param types
- * WARNING: keep in sync with parse_via.c FIN_HIDDEN...
+ * WARNING: keep in sync with parse_via.c FIN_HIDDEN...
* and with tm/sip_msg.c via_body_cloner
*/
enum {
- PARAM_HIDDEN=230, PARAM_TTL, PARAM_BRANCH,
+ PARAM_HIDDEN=230, PARAM_TTL, PARAM_BRANCH,
PARAM_MADDR, PARAM_RECEIVED, PARAM_RPORT, PARAM_I, PARAM_ALIAS,
#ifdef USE_COMP
PARAM_COMP,
@@ -60,12 +60,12 @@ typedef struct via_param {
/* Format: name/version/transport host:port;params comment */
- /* WARNING: keep in sync with tm/sip_msg.c via_body_cloner */
-typedef struct via_body {
+/* WARNING: keep in sync with tm/sip_msg.c via_body_cloner */
+typedef struct via_body {
int error;
str hdr; /* Contains "Via" or "v" */
str name;
- str version;
+ str version;
str transport;
str host;
short proto; /* transport */
@@ -80,7 +80,7 @@ typedef struct via_body {
struct via_param* param_lst; /* list of parameters*/
struct via_param* last_param; /*last via parameter, internal use*/
- /* shortcuts to "important" params*/
+ /* shortcuts to "important" params*/
struct via_param* branch;
str tid; /* transaction id, part of branch */
struct via_param* received;
@@ -90,8 +90,8 @@ typedef struct via_body {
#ifdef USE_COMP
struct via_param* comp; /* see rfc3486 */
#endif
- struct via_body* next; /* pointer to next via body string if
- compact via or null */
+ struct via_body* next; /* pointer to next via body string
+ if compact via or null */
} via_body_t;
Module: kamailio
Branch: master
Commit: bf4ae4b5f4f4b75c534681c520fa1060f234a18e
URL: https://github.com/kamailio/kamailio/commit/bf4ae4b5f4f4b75c534681c520fa106…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-06-01T09:31:20+02:00
modules: readme files regenerated - nathelper ... [skip ci]
---
Modified: src/modules/nathelper/README
---
Diff: https://github.com/kamailio/kamailio/commit/bf4ae4b5f4f4b75c534681c520fa106…
Patch: https://github.com/kamailio/kamailio/commit/bf4ae4b5f4f4b75c534681c520fa106…
---
diff --git a/src/modules/nathelper/README b/src/modules/nathelper/README
index 0fa395da20..8e5c790d58 100644
--- a/src/modules/nathelper/README
+++ b/src/modules/nathelper/README
@@ -66,7 +66,7 @@ Ovidiu Sas
5.5. nat_uac_test(flags)
5.6. is_rfc1918(ip_address)
5.7. add_contact_alias([ip_addr, port, proto])
- 5.8. handle_ruri_alias()
+ 5.8. handle_ruri_alias([mode])
5.9. set_contact_alias([trim])
5.10. set_alias_to_pv(target_avp)
@@ -157,7 +157,7 @@ Chapter 1. Admin Guide
5.5. nat_uac_test(flags)
5.6. is_rfc1918(ip_address)
5.7. add_contact_alias([ip_addr, port, proto])
- 5.8. handle_ruri_alias()
+ 5.8. handle_ruri_alias([mode])
5.9. set_contact_alias([trim])
5.10. set_alias_to_pv(target_avp)
@@ -497,7 +497,7 @@ modparam("nathelper", "nat_addr_mode", 0)
5.5. nat_uac_test(flags)
5.6. is_rfc1918(ip_address)
5.7. add_contact_alias([ip_addr, port, proto])
- 5.8. handle_ruri_alias()
+ 5.8. handle_ruri_alias([mode])
5.9. set_contact_alias([trim])
5.10. set_alias_to_pv(target_avp)
@@ -668,7 +668,7 @@ if(is_rfc1918("$rd")) {
};
...
-5.8. handle_ruri_alias()
+5.8. handle_ruri_alias([mode])
Checks if the Request URI has an “alias” parameter and if so, removes
it and sets the “$du” based on its value. Note that this means that
@@ -677,6 +677,10 @@ if(is_rfc1918("$rd")) {
on a request, make sure that you screen the alias parameter value of
Request URI the same way as you would screen the Request URI itself.
+ The optional parameter mode can be 0 to consume first alias parameter,
+ otherwise it consumes the last alias parameter. If the parameter mode
+ is not provided, it consumes the first parameter.
+
Returns 1 if “;alias” parameter was found and “$du” was set and the
“$ru” rewritten, 2 if the alias parameter was not found and nothing was
done, or -1 in case of error.
Module: kamailio
Branch: master
Commit: 9c060a66f83a42c46767f5b28b6a3640764ebb87
URL: https://github.com/kamailio/kamailio/commit/9c060a66f83a42c46767f5b28b6a364…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-06-01T09:29:33+02:00
nathelper: docs for mode parameter for handle_ruri_alias()
---
Modified: src/modules/nathelper/doc/nathelper_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/9c060a66f83a42c46767f5b28b6a364…
Patch: https://github.com/kamailio/kamailio/commit/9c060a66f83a42c46767f5b28b6a364…
---
diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index 5096a676d4..39e61e6856 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -794,17 +794,21 @@ if(is_rfc1918("$rd")) {
<section id="nathelper.f.handle_ruri_alias">
<title>
- <function moreinfo="none">handle_ruri_alias()</function>
+ <function moreinfo="none">handle_ruri_alias([mode])</function>
</title>
<para>
Checks if the Request URI has an <quote>alias</quote>
parameter and if so, removes it and sets the <quote>$du</quote> based
- on its value. Note that this means that routing of request is based on
- <quote>;alias</quote> parameter value of the Request URI rather than
+ on its value. Note that this means that routing of request is based on
+ <quote>;alias</quote> parameter value of the Request URI rather than
the Request URI itself. If you call <function>handle_ruri_alias()</function>
on a request, make sure that you screen the alias parameter value of
- Request URI the same way as you would screen the
- Request URI itself.
+ Request URI the same way as you would screen the Request URI itself.
+ </para>
+ <para>
+ The optional parameter mode can be 0 to consume first alias parameter,
+ otherwise it consumes the last alias parameter. If the parameter mode is
+ not provided, it consumes the first parameter.
</para>
<para>
Returns <emphasis>1</emphasis> if <quote>;alias</quote> parameter was