summaryrefslogtreecommitdiff
path: root/res/res_pjsip_dialog_info_body_generator.c
diff options
context:
space:
mode:
authorAlexei Gradinari <alex2grad@gmail.com>2016-04-07 17:39:19 -0400
committerJoshua Colp <jcolp@digium.com>2016-04-08 05:49:02 -0500
commitb3be9454157bc542ab2672cdabbd2a03605eeaee (patch)
tree8ce5e90b8c19c2b8f9e1dd8b4a03bddef47c3c4e /res/res_pjsip_dialog_info_body_generator.c
parent28cefc3e888f9385443a97fcbeb0be5ee3efc76f (diff)
res_pjsip_dialog_info: Add missing "direction" attribute in NOTIFY event
BLF pickup isn't working on Cisco SPA and Snom phones if the direction="recipient" attribute is missing in 'dialog' tag. This patch adds direction="recipient" if extension state is Ringing. ASTERISK-24601 #close Change-Id: I5b2c097ca29fd59e92ba237ca5d397cb1b0bcd8c
Diffstat (limited to 'res/res_pjsip_dialog_info_body_generator.c')
-rw-r--r--res/res_pjsip_dialog_info_body_generator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c
index e48057ba4..86f398654 100644
--- a/res/res_pjsip_dialog_info_body_generator.c
+++ b/res/res_pjsip_dialog_info_body_generator.c
@@ -133,6 +133,9 @@ static int dialog_info_generate_body_content(void *body, void *data)
dialog = ast_sip_presence_xml_create_node(state_data->pool, dialog_info, "dialog");
ast_sip_presence_xml_create_attr(state_data->pool, dialog, "id", state_data->exten);
+ if (state_data->exten_state == AST_EXTENSION_RINGING) {
+ ast_sip_presence_xml_create_attr(state_data->pool, dialog, "direction", "recipient");
+ }
state = ast_sip_presence_xml_create_node(state_data->pool, dialog, "state");
pj_strdup2(state_data->pool, &state->content, statestring);