res_stasis: Ensure the channel is always departed from the bridge when it leaves.

This change adds a command to the command queue to explicitly depart the channel
from the bridge when it is told it has left. If the channel has already been departed
or has entered a different bridge this command will become a no-op.

(closes issue ASTERISK-22703)
Reported by: John Bigelow

(closes issue ASTERISK-22634)
Reported by: Kevin Harwell

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

Merged revisions 402336 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@402337 f38db490-d61c-443f-a65b-d21fe96a405b
res_ari_channels: Fix a deadlock when originating multiple channels close to eachother.

If a Stasis application is specified an implicit subscription is done on the originated
channel. This was previously done with the channel lock held which is dangerous as the
underlying code locks the container and iterates items. This change releases the lock
on the originated channel before subscribing occurs.

(closes issue ASTERISK-22768)
Reported by: Matt Jordan

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

Merged revisions 402346 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@402347 f38db490-d61c-443f-a65b-d21fe96a405b
chan_sip: Fix RTCP port for SRFLX ICE candidates

This corrects one-way audio between Asterisk and Chrome/jssip as a
result of Asterisk inserting the incorrect RTCP port into RTCP SRFLX
ICE candidates. This also exposes an ICE component enumeration to
extract further details from candidates.

(closes issue ASTERISK-21383)
Reported by: Shaun Clark
Review: https://reviewboard.asterisk.org/r/2967/
........

Merged revisions 402345 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 402348 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@402349 f38db490-d61c-443f-a65b-d21fe96a405b