Module: kamailio
Branch: master
Commit: 57c14e65d3cea754c88374b8dd1d67cb5be3f295
URL: 
https://github.com/kamailio/kamailio/commit/57c14e65d3cea754c88374b8dd1d67cb5be3f295

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2017-11-23T09:51:10+01:00

drouting: exported next_routing() to kemi framework

---

Modified: src/modules/drouting/drouting.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/57c14e65d3cea754c88374b8dd1d67cb5be3f295.diff
Patch: 
https://github.com/kamailio/kamailio/commit/57c14e65d3cea754c88374b8dd1d67cb5be3f295.patch

---

diff --git a/src/modules/drouting/drouting.c b/src/modules/drouting/drouting.c
index f3e59991c0..148c991a25 100644
--- a/src/modules/drouting/drouting.c
+++ b/src/modules/drouting/drouting.c
@@ -115,7 +115,7 @@ static int dr_exit(void);
 static int do_routing(struct sip_msg *msg, int grp_id);
 static int do_routing_0(struct sip_msg *msg, char *str1, char *str2);
 static int do_routing_1(struct sip_msg *msg, char *str1, char *str2);
-static int use_next_gw(struct sip_msg *msg);
+static int use_next_gw(struct sip_msg *msg, char *p1, char *p2);
 static int is_from_gw_0(struct sip_msg *msg, char *str1, char *str2);
 static int is_from_gw_1(struct sip_msg *msg, char *str1, char *str2);
 static int is_from_gw_2(struct sip_msg *msg, char *str1, char *str2);
@@ -666,7 +666,7 @@ static int do_routing_1(struct sip_msg *msg, char *str1, 
char *str2)
 }
 
 
-static int use_next_gw(struct sip_msg *msg)
+static int ki_next_routing(sip_msg_t *msg)
 {
        struct usr_avp *avp;
        int_str val;
@@ -699,6 +699,11 @@ static int use_next_gw(struct sip_msg *msg)
        return 1;
 }
 
+static int use_next_gw(struct sip_msg *msg, char *p1, char *p2)
+{
+       return ki_next_routing(msg);
+}
+
 int dr_already_choosen(rt_info_t *rt_info, int *active_gwlist,
                int *local_gwlist, int lgw_size, int check)
 {
@@ -1160,6 +1165,16 @@ static sr_kemi_t sr_kemi_drouting_exports[] = {
                { SR_KEMIP_INT, SR_KEMIP_NONE, SR_KEMIP_NONE,
                        SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
        },
+       { str_init("drouting"), str_init("next_routing"),
+               SR_KEMIP_INT, ki_next_routing,
+               { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+                       SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+       },
+       { str_init("drouting"), str_init("use_next_gw"),
+               SR_KEMIP_INT, ki_next_routing,
+               { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+                       SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+       },
        { str_init("drouting"), str_init("is_from_gw"),
                SR_KEMIP_INT, ki_is_from_gw,
                { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to