Module: kamailio
Branch: master
Commit: e98e8a86f33fab2a3969044d9eef327072709601
URL:
https://github.com/kamailio/kamailio/commit/e98e8a86f33fab2a3969044d9eef327…
Author: Stefan Mititelu <smititelu(a)users.noreply.github.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-01-14T15:34:53+02:00
Merge pull request #929 from smititelu/kemi-rtpengine
rtpengine: Add kemi rtpengine_manage0/1
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e98e8a86f33fab2a3969044d9eef327…
Patch:
https://github.com/kamailio/kamailio/commit/e98e8a86f33fab2a3969044d9eef327…
---
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;
+}