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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2016-04-27T16:22:39+02:00

core: kemi - exported KSR.isdsturiset() function

---

Modified: kemi.c

---

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

---

diff --git a/kemi.c b/kemi.c
index 3ceaad6..7b08a83 100644
--- a/kemi.c
+++ b/kemi.c
@@ -420,6 +420,22 @@ static int sr_kemi_core_resetdsturi(sip_msg_t *msg)
 /**
  *
  */
+static int sr_kemi_core_isdsturiset(sip_msg_t *msg)
+{
+       if(msg==NULL) {
+               LM_WARN("invalid msg parameter\n");
+               return SR_KEMI_FALSE;
+       }
+
+       if(msg->dst_uri.s!=NULL && msg->dst_uri.len>0) {
+               return SR_KEMI_TRUE;
+       }
+       return SR_KEMI_FALSE;
+}
+
+/**
+ *
+ */
 static int sr_kemi_core_force_rport(sip_msg_t *msg)
 {
        if(msg==NULL) {
@@ -535,6 +551,11 @@ static sr_kemi_t _sr_kemi_core[] = {
                { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
                        SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
        },
+       { str_init(""), str_init("isdsturiset"),
+               SR_KEMIP_BOOL, sr_kemi_core_isdsturiset,
+               { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+                       SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+       },
        { str_init(""), str_init("force_rport"),
                SR_KEMIP_BOOL, sr_kemi_core_force_rport,
                { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to