Switch PJSIP auth to use a vector.

Since Asterisk has a vector API now, places where arrays are manually
resized don't really make sense any more. Since the auth work in PJSIP
was freshly-written, it was easy to reform it to use a vector.

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



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403499 f38db490-d61c-443f-a65b-d21fe96a405b
res_pjsip_nat: Add NAT module to session dialogs.

Due to the way pjproject internally works it was possible for the
NAT module to not be invoked on messages with-in a session dialog.
This means that the various parts of the message would not get rewritten
with the source IP address and port.

This change uses a session supplement to add the NAT module
to the dialog on the first incoming or outgoing INVITE.

(closes issue ASTERISK-22941)
Reported by: Leif Madsen
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403511 f38db490-d61c-443f-a65b-d21fe96a405b
Create function for retrieving Mixmonitor instance data.

For the time, this is only useful for retrieving the filename.

The purpose of this function is to better facilitate multiple
mixmonitors per channel. Setting a MIXMONITOR_FILENAME channel
variable is not conducive to such behavior, so allowing finer
grained access to individual mixmonitor properties improves
the situation. The MIXMONITOR_FILENAME channel variable is still
set, though, so there is no worry about backwards compatibility.

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



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403512 f38db490-d61c-443f-a65b-d21fe96a405b
Add a CONFBRIDGE_RESULT channel variable to discern why a channel left a ConfBridge.

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



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

You would think that a new file would start off without any whitespace
oddities.
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403528 f38db490-d61c-443f-a65b-d21fe96a405b
endpoints: Keep a reference to channel ids when creating snapshot.

The snapshot process for endpoints uses the channel ids present
on the endpoint itself. Without keeping a reference it was possible
for the strings to be freed underneath any consumer of an endpoint
snapshot.

A reference is now held by the snapshot to the channel ids and
released when the snapshot is destroyed.

(issue ASTERISK-22801)
Reported by: Matt Jordan
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403543 f38db490-d61c-443f-a65b-d21fe96a405b
sorcery: Eliminate shadowing a varaible that caused confusion.

* Eliminated shadowing of the __ast_sorcery_apply_config() name parameter
causing confusion.

* Fix potential crash from sorcery.conf user input in
__ast_sorcery_apply_config() if the user supplied a malformed config line
that is missing the sorcery object type name.

* Remove redundant test in __ast_sorcery_apply_config().  !config and
config == CONFIGS_STATUS_FILEMISSING are identical.
........

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@403544 f38db490-d61c-443f-a65b-d21fe96a405b
res_sorcery_astdb.c: Fix get multiple records by regex.

* Fix sorcery_astdb_retrieve_regex() pattern matching.  Let the regexec()
function match the stored key values instead of having astdb prefilter
them.  Previoiusly you could only use a simple regex pattern when the
pattern began with '^'.

* Fix off nominal memory leak in sorcery_astdb_retrieve_regex().
........

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


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