diff --git a/modules/kazoo/defs.h b/modules/kazoo/defs.h
index 01d9af40477..e7f991de8bb 100644
--- a/modules/kazoo/defs.h
+++ b/modules/kazoo/defs.h
@@ -69,14 +69,17 @@
#define DIALOGINFO_EMPTY_BODY "\
\
-"
+#define LOCAL_TAG "local-tag=\"%.*s\""
+#define REMOTE_TAG "remote-tag=\"%.*s\""
+
#define DIALOGINFO_BODY "\
\
-\
+\
%.*s\
\
%.*s\
@@ -91,7 +94,7 @@
#define DIALOGINFO_BODY_2 "\
\
-\
+\
%.*s\
\
%.*s\
diff --git a/modules/kazoo/kz_pua.c b/modules/kazoo/kz_pua.c
index 562a0606e2d..d9757a7b478 100644
--- a/modules/kazoo/kz_pua.c
+++ b/modules/kazoo/kz_pua.c
@@ -320,6 +320,8 @@ int kz_pua_publish_dialoginfo_to_presentity(struct json_object *json_obj) {
int expires = 0;
str event = str_init("dialog");
int reset = 0;
+ char to_tag_buffer[100];
+ char from_tag_buffer[100];
char *body = (char *)pkg_malloc(DIALOGINFO_BODY_BUFFER_SIZE);
if(body == NULL) {
@@ -375,6 +377,16 @@ int kz_pua_publish_dialoginfo_to_presentity(struct json_object *json_obj) {
if(!to_uri.len)
to_uri = to;
+ if(fromtag.len > 0) {
+ fromtag.len = sprintf(from_tag_buffer, LOCAL_TAG, fromtag.len, fromtag.s);
+ fromtag.s = from_tag_buffer;
+ }
+
+ if(totag.len > 0) {
+ totag.len = sprintf(to_tag_buffer, REMOTE_TAG, totag.len, totag.s);
+ totag.s = to_tag_buffer;
+ }
+
if(callid.len) {
if(dbk_include_entity) {