[Asterisk-code-review] Workaround for wrong identity in dialog package XML in notify. (asterisk[14])

Thierry Magnien asteriskteam at digium.com
Thu Aug 10 06:45:08 CDT 2017


Thierry Magnien has uploaded this change for review. ( https://gerrit.asterisk.org/6210


Change subject: Workaround for wrong identity in dialog package XML in notify.
......................................................................

Workaround for wrong identity in dialog package XML in notify.

Issue ASTERISK-24488 is due to SIP channel not being in ringing
state at the time the NOTIFY is sent, so find_ringing_channel
does not return anything.

This patch allows for multiple device updates until channel
 is in ringing state and bound to monitored extension.

Change-Id: Ib31ef1b6dcb9e844b2c1612e634c2a5b88906724
---
M channels/chan_sip.c
M main/pbx.c
2 files changed, 7 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/10/6210/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cd5cc0c..27d99e0 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15285,6 +15285,9 @@
 
 					ast_channel_unlock(callee);
 					callee = ast_channel_unref(callee);
+				} else {
+					/* Don't send wrong remote information */
+					break;
 				}
 
 				/* We create a fake call-id which the phone will send back in an INVITE
diff --git a/main/pbx.c b/main/pbx.c
index 0b2c438..8542b83 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3573,8 +3573,10 @@
 
 	dev_state = stasis_message_data(msg);
 	if (dev_state->eid) {
-		/* ignore non-aggregate states */
-		return;
+		/* ignore non-aggregate states except for ringing states */
+		if (!(dev_state->state == AST_DEVICE_RINGING || dev_state->state == AST_DEVICE_RINGINUSE)) {
+			return;
+		}
 	}
 
 	if (ao2_container_count(hintdevices) == 0 && ao2_container_count(autohints) == 0) {

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

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib31ef1b6dcb9e844b2c1612e634c2a5b88906724
Gerrit-Change-Number: 6210
Gerrit-PatchSet: 1
Gerrit-Owner: Thierry Magnien <thierry.magnien at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170810/eba2af02/attachment.html>


More information about the asterisk-code-review mailing list