[sr-dev] git:master:10f116e7: dialog: export dlg_bridge() to kemi framework

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 8 16:17:00 CEST 2019


Module: kamailio
Branch: master
Commit: 10f116e726533f91467d90a38101d5b16a5801a5
URL: https://github.com/kamailio/kamailio/commit/10f116e726533f91467d90a38101d5b16a5801a5

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-08-08T16:16:40+02:00

dialog: export dlg_bridge() to kemi framework

---

Modified: src/modules/dialog/dialog.c

---

Diff:  https://github.com/kamailio/kamailio/commit/10f116e726533f91467d90a38101d5b16a5801a5.diff
Patch: https://github.com/kamailio/kamailio/commit/10f116e726533f91467d90a38101d5b16a5801a5.patch

---

diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 5df35de40a..8f5a186e40 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -1211,6 +1211,14 @@ static int w_dlg_bridge(struct sip_msg *msg, char *from, char *to, char *op)
 	return 1;
 }
 
+static int ki_dlg_bridge(sip_msg_t *msg, str *sfrom, str *sto, str *soproxy)
+{
+	if(dlg_bridge(sfrom, sto, soproxy, NULL)!=0)
+		return -1;
+	return 1;
+
+}
+
 /**
  *
  */
@@ -2101,6 +2109,11 @@ 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("dlg_bridge"),
+		SR_KEMIP_INT, ki_dlg_bridge,
+		{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
+			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