[Asterisk-code-review] Match chan sip blf behavior of asteriks 1.8 (asterisk[14])

Zach R asteriskteam at digium.com
Fri Apr 14 15:14:30 CDT 2017


Zach R has uploaded a new change for review. ( https://gerrit.asterisk.org/5485 )

Change subject: Match chan_sip blf behavior of asteriks 1.8
......................................................................

Match chan_sip blf behavior of asteriks 1.8

On asterisk 1.8 with chan_sip the dialog body would send early for
INUSE&&RINGING state instead of confirmed.The Cisco SPA series would not flash
as if the monitored device was ringing when the text state was confirmed instead
of early.As well in the dialog body info generator I set the dialog body to have
the direction node when the extension's state is INUSE&&RINGING.Otherwise some
phones such as the Cisco SPA series would not be able to do directed pick up of
monitored devices.

ASTERISK-26919 #close

Change-Id: I4326228f83a327a7510fecae0fec43c2945a3f25
---
M res/res_pjsip/presence_xml.c
M res/res_pjsip_dialog_info_body_generator.c
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/85/5485/1

diff --git a/res/res_pjsip/presence_xml.c b/res/res_pjsip/presence_xml.c
index c991a0d..0eab813 100644
--- a/res/res_pjsip/presence_xml.c
+++ b/res/res_pjsip/presence_xml.c
@@ -92,7 +92,7 @@
 		*pidfnote = "Ringing";
 		break;
 	case (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING):
-		*statestring = "confirmed";
+		*statestring = "early";
 		*local_state = NOTIFY_INUSE;
 		*pidfstate = "busy";
 		*pidfnote = "Ringing";
diff --git a/res/res_pjsip_dialog_info_body_generator.c b/res/res_pjsip_dialog_info_body_generator.c
index 5006b9e..2c37693 100644
--- a/res/res_pjsip_dialog_info_body_generator.c
+++ b/res/res_pjsip_dialog_info_body_generator.c
@@ -133,7 +133,7 @@
 
 	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) {
+	if (state_data->exten_state == AST_EXTENSION_RINGING || (state_data->exten_state == (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING))) {
 		ast_sip_presence_xml_create_attr(state_data->pool, dialog, "direction", "recipient");
 	}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4326228f83a327a7510fecae0fec43c2945a3f25
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Zach R <zrothy at monmouth.com>



More information about the asterisk-code-review mailing list