Module: kamailio
Branch: master
Commit: 152f46dd03c179f2fc63cb69498ad43db51fb1ae
URL:
https://github.com/kamailio/kamailio/commit/152f46dd03c179f2fc63cb69498ad43…
Author: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Committer: Stefan Mititelu <stefan.mititelu92(a)gmail.com>
Date: 2017-01-14T11:12:51+02:00
rtpengine: Add kemi rtpengine_manage0/1
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/152f46dd03c179f2fc63cb69498ad43…
Patch:
https://github.com/kamailio/kamailio/commit/152f46dd03c179f2fc63cb69498ad43…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 710b7ef..f964a6a 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -76,6 +76,7 @@
#include "../../core/route.h"
#include "../../core/rpc.h"
#include "../../core/rpc_lookup.h"
+#include "../../core/kemi.h"
#include "../../modules/tm/tm_load.h"
#include "rtpengine.h"
#include "rtpengine_funcs.h"
@@ -2995,3 +2996,40 @@ set_rtp_inst_pvar(struct sip_msg *msg, const str * const uri) {
}
return 0;
}
+
+/**
+ *
+ */
+static int ki_rtpengine_manage0(sip_msg_t *msg) {
+ return rtpengine_rtpp_set_wrap(msg, rtpengine_manage_wrap, NULL, 1);
+}
+
+/**
+ *
+ */
+static int ki_rtpengine_manage1(sip_msg_t *msg, str *flags) {
+ return rtpengine_rtpp_set_wrap(msg, rtpengine_manage_wrap, ((flags &&
flags->len > 0) ? flags->s : NULL), 1);
+}
+
+/**
+ *
+ */
+static sr_kemi_t sr_kemi_rtpengine_exports[] = {
+ { str_init("rtpengine"), str_init("rtpengine_manage0"),
+ SR_KEMIP_INT, ki_rtpengine_manage0,
+ { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
+ { str_init("rtpengine"), str_init("rtpengine_manage1"),
+ SR_KEMIP_INT, ki_rtpengine_manage1,
+ { 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 } }
+};
+
+int mod_register(char *path, int *dlflags, void *p1, void *p2) {
+ sr_kemi_modules_add(sr_kemi_rtpengine_exports);
+ return 0;
+}