[sr-dev] git:master:71522702: dialog: exported kemi variants to get empty and print var values
Daniel-Constantin Mierla
miconda at gmail.com
Tue Jun 11 12:11:42 CEST 2019
Module: kamailio
Branch: master
Commit: 71522702d94c3269ca0bde5f68562036c7908ffd
URL: https://github.com/kamailio/kamailio/commit/71522702d94c3269ca0bde5f68562036c7908ffd
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-06-11T10:39:11+02:00
dialog: exported kemi variants to get empty and print var values
---
Modified: src/modules/dialog/dialog.c
---
Diff: https://github.com/kamailio/kamailio/commit/71522702d94c3269ca0bde5f68562036c7908ffd.diff
Patch: https://github.com/kamailio/kamailio/commit/71522702d94c3269ca0bde5f68562036c7908ffd.patch
---
diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index a28daae1c2..cb3a80b3b1 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -1913,6 +1913,21 @@ static sr_kemi_xval_t* ki_dlg_var_get(sip_msg_t *msg, str *name)
return ki_dlg_var_get_mode(msg, name, SR_KEMI_XVAL_NULL_NONE);
}
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_dlg_var_gete(sip_msg_t *msg, str *name)
+{
+ return ki_dlg_var_get_mode(msg, name, SR_KEMI_XVAL_NULL_EMPTY);
+}
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_dlg_var_getw(sip_msg_t *msg, str *name)
+{
+ return ki_dlg_var_get_mode(msg, name, SR_KEMI_XVAL_NULL_PRINT);
+}
+
/**
*
*/
@@ -2028,6 +2043,16 @@ static sr_kemi_t sr_kemi_dialog_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("dialog"), str_init("var_gete"),
+ SR_KEMIP_XVAL, ki_dlg_var_gete,
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("dialog"), str_init("var_getw"),
+ SR_KEMIP_XVAL, ki_dlg_var_getw,
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};
More information about the sr-dev
mailing list