[sr-dev] git:master:65254288: kazoo: missing sender alternative for presence

lazedo luis.azedo at factorlusitano.com
Tue May 2 14:15:32 CEST 2017


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

Author: lazedo <luis.azedo at factorlusitano.com>
Committer: lazedo <luis.azedo at factorlusitano.com>
Date: 2017-05-02T13:15:08+01:00

kazoo: missing sender alternative for presence

---

Modified: src/modules/kazoo/kz_pua.c

---

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

---

diff --git a/src/modules/kazoo/kz_pua.c b/src/modules/kazoo/kz_pua.c
index 44a7448..f512efe 100644
--- a/src/modules/kazoo/kz_pua.c
+++ b/src/modules/kazoo/kz_pua.c
@@ -221,6 +221,10 @@ int kz_pua_publish_presence_to_presentity(struct json_object *json_obj) {
 	json_extract_field(BLF_JSON_ETAG, etag);
 	json_extract_field(BLF_JSON_SENDER, sender);
 
+	if (sender.len == 0) {
+		json_extract_field(BLF_JSON_SWITCH_URI, sender);
+	}
+
 	struct json_object* ExpiresObj = kz_json_get_object(json_obj, BLF_JSON_EXPIRES);
 	if (ExpiresObj != NULL) {
 		expires = json_object_get_int(ExpiresObj);




More information about the sr-dev mailing list