Fix several crashes in MeetMeAdmin

This change ensures that MeetMeAdmin commands requiring a user actually
get a user and fixes another issue where an extra dereference could
occur for a last-entered user being ejected if a user identifier was
also provided.

(closes issue ASTERISK-21907)
Reported by: Alex Epshteyn
Review: https://reviewboard.asterisk.org/r/2844/
........

Merged revisions 399033 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399036 f38db490-d61c-443f-a65b-d21fe96a405b
ARI: Fix WebSocket response when subprotocol isn't specified

When I moved the ARI WebSocket from /ws to /ari/events, I added code to
allow a WebSocket to connect without specifying the subprotocol if
there's only one subprotocol handler registered for the WebSocket.

Naively, I coded it to always respond with the subprotocol in use.
Unfortunately, according to RFC 6455, if the server's response includes
a subprotocol header field that "indicates the use of a subprotocol that
was not present in the client's handshake [...], the client MUST _Fail
the WebSocket Connection_.", emphasis theirs.

This patch correctly omits the Sec-WebSocket-Protocol if one is not
specified by the client.

(closes issue ASTERISK-22441)
Review: https://reviewboard.asterisk.org/r/2828/
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399042 f38db490-d61c-443f-a65b-d21fe96a405b
res_pjsip: Forward PJSIP logging to Asterisk logging

This patch uses PJSIP's pj_log_set_log_func() to forward PJSIP's log
messages to Asterisk's logger. This is done in a new module:
res_pjsip_log_forwarder.so.

This patch sets defaultenabled on the existing res_pjsip_logger.so to
no, since logging every SIP packet seems a bit odd to do by default, and
is (hopefully) less necessary with regular PJSIP logging.

It also removes res_rtp_asterisk's disabling of PJSIP logging.

(closes issue ASTERISK-22360)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/2830/
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399051 f38db490-d61c-443f-a65b-d21fe96a405b
Broke the build! Forgot para tags within my description.

https://bamboo.asterisk.org/bamboo/browse/AST-ATRUNKBUILD-304
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399071 f38db490-d61c-443f-a65b-d21fe96a405b
Put merge tracking for r399039 back.


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399080 f38db490-d61c-443f-a65b-d21fe96a405b
Recorded merge of revisions 399035,399049 from http://svn.asterisk.org/svn/asterisk/branches/12

These were lost in r399071


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399081 f38db490-d61c-443f-a65b-d21fe96a405b
Change how realms are handled for outbound authentication.

With this change, if no realm is specified in an outbound auth
section, then we will simply match the realm that was present
in the 401/407 challenge.

(closes issue ASTERISK-22741)
Reported by George Joseph
(closes issue ASTERISK-22386)
Reported by Rusty Newton

Patches:
	outbound_auth_realm_v4.patch uploaded by George Joseph (License #6322)
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@399082 f38db490-d61c-443f-a65b-d21fe96a405b
Create more accurate Contact headers for dialogs when we are the UAS.

(closes issue AST-1207)
reported by John Bigelow

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

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


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