[Asterisk-code-review] chan sip: Emit a second ringing event to ensure channel is f... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Feb 20 10:42:59 CST 2018


Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/8301


Change subject: chan_sip: Emit a second ringing event to ensure channel is found.
......................................................................

chan_sip: Emit a second ringing event to ensure channel is found.

When constructing a dialog-info+xml NOTIFY message a ringing channel
is found if the state is ringing and further information is placed into
the message. Due to the migration to the Stasis message bus this did
not always work as expected.

This change raises a second ringing event in such a way to guarantee
that the event is received by chan_sip and another lookup is done to
find the ringing channel.

ASTERISK-24488

Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
---
M channels/chan_sip.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/8301/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index acf5a14..8570163 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23984,6 +23984,9 @@
 			ast_queue_control(p->owner, AST_CONTROL_RINGING);
 			if (ast_channel_state(p->owner) != AST_STATE_UP) {
 				ast_setstate(p->owner, AST_STATE_RINGING);
+				if (p->relatedpeer) {
+					ast_devstate_changed(AST_DEVICE_UNKNOWN, AST_DEVSTATE_NOT_CACHABLE, "SIP/%s", p->relatedpeer->name);
+				}
 			}
 		}
 		if (find_sdp(req)) {

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
Gerrit-Change-Number: 8301
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180220/6587c0ea/attachment.html>


More information about the asterisk-code-review mailing list