asterisk/res/stasis
Matthew Jordan 29f66b0429 ARI/PJSIP: Add the ability to redirect (transfer) a channel in a Stasis app
This patch adds a new feature to ARI to redirect a channel to another server,
and fixes a few bugs in PJSIP's handling of the Transfer dialplan
application/ARI redirect capability.

*New Feature*
A new operation has been added to the ARI channels resource, redirect. With
this, a channel in a Stasis application can be redirected to another endpoint
of the same underlying channel technology.

*Bug fixes*
In the process of writing this new feature, two bugs were fixed in the PJSIP
stack:
(1) The existing .transfer channel callback had the limitation that it could
    only transfer channels to a SIP URI, i.e., you had to pass
    'PJSIP/sip:foo@my_provider.com' to the dialplan application. While this is
    still supported, it is somewhat unintuitive - particularly in a world full
    of endpoints. As such, we now also support specifying the PJSIP endpoint to
    transfer to.
(2) res_pjsip_multihomed was, unfortunately, trying to 'help' a 302 redirect by
    updating its Contact header. Alas, that resulted in the forwarding
    destination set by the dialplan application/ARI resource/whatever being
    rewritten with very incorrect information. Hence, we now don't bother
    updating an outgoing response if it is a 302. Since this took a looong time
    to find, some additional debug statements have been added to those modules
    that update the Contact headers.

Review: https://reviewboard.asterisk.org/r/4316/

ASTERISK-24015 #close
Reported by: Private Name

ASTERISK-24703 #close
Reported by: Matt Jordan
........

Merged revisions 431717 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431718 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-12 20:34:37 +00:00
..
app.c stasis transfer: fix a race condition on stasis bridge push 2015-01-22 18:10:13 +00:00
app.h Stasis: Fix StasisStart/End order and missing events 2014-12-08 15:45:46 +00:00
command.c ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
command.h ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
control.c ARI/PJSIP: Add the ability to redirect (transfer) a channel in a Stasis app 2015-02-12 20:34:37 +00:00
control.h Stasis: Convey transfer information to applications 2014-08-07 15:30:19 +00:00
messaging.c stasis: Fix compilation issue with ao2 tagged objects 2014-08-05 21:48:05 +00:00
messaging.h Clean up files that do not end with newlines 2014-08-21 14:52:28 +00:00
stasis_bridge.c stasis transfer: fix stasis bridge push race part two 2015-01-29 23:03:14 +00:00
stasis_bridge.h ARI: Make mixing bridges propagate linkedids and accountcodes. 2014-07-09 16:34:51 +00:00