summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2018-02-20 12:33:43 -0400
committerJoshua Colp <jcolp@digium.com>2018-02-20 10:42:58 -0600
commit259c80675e800110bcdd55fcd22e091315964163 (patch)
treef5fd53cf8cf0df1ed7e09d77400d2659a697e55a /channels
parent1b3742451790e9320f0594f3bf793fa67b82c83d (diff)
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
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index acf5a147e..85701634c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23984,6 +23984,9 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
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)) {