Module: kamailio
Branch: master
Commit: bd1ca1839ac0d70c70bbbe3a98e5845129cb2567
URL:
https://github.com/kamailio/kamailio/commit/bd1ca1839ac0d70c70bbbe3a98e5845…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-01T13:47:21+02:00
pv: config and kemi functions to print xavu vars
---
Modified: src/modules/pv/pv.c
Modified: src/modules/pv/pv_xavp.c
Modified: src/modules/pv/pv_xavp.h
---
Diff:
https://github.com/kamailio/kamailio/commit/bd1ca1839ac0d70c70bbbe3a98e5845…
Patch:
https://github.com/kamailio/kamailio/commit/bd1ca1839ac0d70c70bbbe3a98e5845…
---
diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c
index fd123a42a3..7931056ec6 100644
--- a/src/modules/pv/pv.c
+++ b/src/modules/pv/pv.c
@@ -572,6 +572,8 @@ static cmd_export_t cmds[]={
ANY_ROUTE },
{"pv_xavp_print", (cmd_function)pv_xavp_print, 0, 0, 0,
ANY_ROUTE },
+ {"pv_xavu_print", (cmd_function)pv_xavu_print, 0, 0, 0,
+ ANY_ROUTE },
{"pv_var_to_xavp", (cmd_function)w_var_to_xavp, 2, fixup_spve_spve,
fixup_free_spve_spve, ANY_ROUTE },
{"pv_xavp_to_var", (cmd_function)w_xavp_to_var, 1, fixup_spve_null,
@@ -822,6 +824,12 @@ static int ki_xavp_print(sip_msg_t* msg)
return 1;
}
+static int ki_xavu_print(sip_msg_t* msg)
+{
+ xavu_print_list(NULL);
+ return 1;
+}
+
/**
*
*/
@@ -1859,6 +1867,11 @@ static sr_kemi_t sr_kemi_pvx_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("pvx"), str_init("pv_xavu_print"),
+ SR_KEMIP_INT, ki_xavu_print,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ str_init("pvx"), str_init("xavp_params_explode"),
SR_KEMIP_INT, ki_xavp_params_explode,
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
diff --git a/src/modules/pv/pv_xavp.c b/src/modules/pv/pv_xavp.c
index 5b14b1a3a7..0cdef80a0e 100644
--- a/src/modules/pv/pv_xavp.c
+++ b/src/modules/pv/pv_xavp.c
@@ -568,6 +568,12 @@ int pv_xavp_print(sip_msg_t* msg, char* s1, char *s2)
return 1;
}
+int pv_xavu_print(sip_msg_t* msg, char* s1, char *s2)
+{
+ xavu_print_list(NULL);
+ return 1;
+}
+
/**
*
*/
diff --git a/src/modules/pv/pv_xavp.h b/src/modules/pv/pv_xavp.h
index 6f2e9f474b..3d56be5a58 100644
--- a/src/modules/pv/pv_xavp.h
+++ b/src/modules/pv/pv_xavp.h
@@ -33,6 +33,7 @@ int pv_set_xavu(struct sip_msg* msg, pv_param_t *param,
int pv_parse_xavu_name(pv_spec_p sp, str *in);
int pv_xavp_print(struct sip_msg* msg, char* s1, char *s2);
+int pv_xavu_print(struct sip_msg* msg, char* s1, char *s2);
int xavp_params_explode(str *params, str *xname);