From ef70c08dc7e074bee599c01a6850499ce8889ed6 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 11 Aug 2014 18:32:37 +0000 Subject: Improve call forwarding reporting, especially with regards to ARI. This patch addresses a few issues: 1) The order of Dial events have been changed when performing a call forward. The order has now been altered to 1) Dial begins dialing channel A. 2) When A forwards the call to B, we issue the dial end event to channel A, indicating the dial is being canceled due to a forward to B. 3) When the call to channel B occurs, we then issue a new dial begin to channel B. 2) Call forwards are now reported on the calling channel, not the peer channel. 3) AMI DialEnd events have been altered to display the extension the call is being forwarded to when relevant. 4) You can now get the values of channel variables for channels that are not currently in the Stasis application. This brings the retrieval of channel variables more in line with the rest of channel read operations since they may be performed on channels not in Stasis. ASTERISK-24134 #close Reported by Matt Jordan ASTERISK-24138 #close Reported by Matt Jordan Patches: forward-shenanigans.diff uploaded by Matt Jordan (License #6283) Review: https://reviewboard.asterisk.org/r/3899 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420794 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_pjsip_pubsub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'res/res_pjsip_pubsub.c') diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c index f9b64f85f..90be60d4e 100644 --- a/res/res_pjsip_pubsub.c +++ b/res/res_pjsip_pubsub.c @@ -2032,10 +2032,13 @@ int ast_sip_subscription_notify(struct ast_sip_subscription *sub, void *notify_d if (sub->tree->notification_batch_interval) { return schedule_notification(sub->tree); } else { + int res; /* See the note in pubsub_on_rx_refresh() for why sub->tree is refbumped here */ ao2_ref(sub->tree, +1); - return send_notify(sub->tree, 0); + res = send_notify(sub->tree, 0); ao2_ref(sub->tree, -1); + + return res; } } -- cgit v1.2.3