Module: kamailio
Branch: master
Commit: dc7fc82ff77a8016c1a1e15b7aa0e950f7cca379
URL:
https://github.com/kamailio/kamailio/commit/dc7fc82ff77a8016c1a1e15b7aa0e95…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-06-27T11:28:30+02:00
pv: several new $E... variables for punctuation signs
- facilitate using them in params (e.g., for transformations)
---
Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_core.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dc7fc82ff77a8016c1a1e15b7aa0e95…
Patch:
https://github.com/kamailio/kamailio/commit/dc7fc82ff77a8016c1a1e15b7aa0e95…
---
diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index 4b9329589fb..a5b7d9ebd03 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -207,6 +207,20 @@ static pv_export_t mod_pvs[] = {
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 4},
{{"Et", (sizeof("Et") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 3},
+ {{"Ec", (sizeof("Ec") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 5},
+ {{"Eq", (sizeof("Eq") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 6},
+ {{"Ek", (sizeof("Ek") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 7},
+ {{"Ei", (sizeof("Ei") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 8},
+ {{"Ej", (sizeof("Ej") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 9},
+ {{"Eb", (sizeof("Eb") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 10},
+ {{"Ev", (sizeof("Ev") - 1)}, /* */
+ PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 11},
{{"fd", (sizeof("fd") - 1)}, /* */
PVT_OTHER, pv_get_from_attr, pv_set_from_domain, 0, 0,
pv_init_iname, 3},
diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c
index 261322e97e6..ca0a7388475 100644
--- a/src/modules/pv/pv_core.c
+++ b/src/modules/pv/pv_core.c
@@ -1510,6 +1510,27 @@ int pv_get_escstr(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
case 4:
_pv_escstr[i] = ' ';
break;
+ case 5:
+ _pv_escstr[i] = ',';
+ break;
+ case 6:
+ _pv_escstr[i] = '"';
+ break;
+ case 7:
+ _pv_escstr[i] = '\'';
+ break;
+ case 8:
+ _pv_escstr[i] = ':';
+ break;
+ case 9:
+ _pv_escstr[i] = ';';
+ break;
+ case 10:
+ _pv_escstr[i] = '\\';
+ break;
+ case 11:
+ _pv_escstr[i] = '`';
+ break;
default:
_pv_escstr[i] = '\n';
break;