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

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


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


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/00/8300/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index a24ca81..9cdf71c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23823,6 +23823,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/8300
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I547a458fc59721c918cb48be060cbfc3c88bcf9c
Gerrit-Change-Number: 8300
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/0e8b5f54/attachment.html>


More information about the asterisk-code-review mailing list