Module: kamailio
Branch: master
Commit: e31516ec061d19c83870044292d8e7c665e89c8e
URL:
https://github.com/kamailio/kamailio/commit/e31516ec061d19c83870044292d8e7c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-29T11:25:51+02:00
presence: more functions exported to kemi framework
---
Modified: src/modules/presence/presence.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e31516ec061d19c83870044292d8e7c…
Patch:
https://github.com/kamailio/kamailio/commit/e31516ec061d19c83870044292d8e7c…
---
diff --git a/src/modules/presence/presence.c b/src/modules/presence/presence.c
index 116c37f..cc71171 100644
--- a/src/modules/presence/presence.c
+++ b/src/modules/presence/presence.c
@@ -1433,6 +1433,15 @@ static int w_pres_auth_status(struct sip_msg *_msg, char *_sp1,
char *_sp2)
return pres_auth_status(_msg, watcher_uri, presentity_uri);
}
+int ki_pres_auth_status(sip_msg_t* msg, str* watcher_uri, str* presentity_uri)
+{
+ if(watcher_uri==NULL || presentity_uri==NULL) {
+ LM_ERR("invalid parameters\n");
+ return -1;
+ }
+ return pres_auth_status(msg, *watcher_uri, *presentity_uri);
+}
+
int pres_auth_status(struct sip_msg* msg, str watcher_uri, str presentity_uri)
{
str event;
@@ -1907,6 +1916,11 @@ static sr_kemi_t sr_kemi_presence_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+ { str_init("presence"), str_init("pres_auth_status"),
+ SR_KEMIP_INT, ki_pres_auth_status,
+ { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+ },
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};