[Asterisk-code-review] res pjsip dialog info: Missing "direction" attribute in NOTI... (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Thu Apr 7 16:48:47 CDT 2016


Alexei Gradinari has uploaded a new change for review.

  https://gerrit.asterisk.org/2557

Change subject: res_pjsip_dialog_info: Missing "direction" attribute in NOTIFY event
......................................................................

res_pjsip_dialog_info: Missing "direction" attribute in NOTIFY event

BLF pickup isn't working on Cisco SPA and snom phones
if the direction="recipient" attribute missing in 'dialog' tag.

This patch added direction="recipient" if state Ringing

ASTERISK-24601

Change-Id: I5b2c097ca29fd59e92ba237ca5d397cb1b0bcd8c
---
M res/res_pjsip_dialog_info_body_generator.c
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/57/2557/1

diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c
index 48ac60f..b21b70f 100644
--- a/res/res_pjsip_dialog_info_body_generator.c
+++ b/res/res_pjsip_dialog_info_body_generator.c
@@ -133,6 +133,9 @@
 
 	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);

-- 
To view, visit https://gerrit.asterisk.org/2557
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b2c097ca29fd59e92ba237ca5d397cb1b0bcd8c
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>



More information about the asterisk-code-review mailing list