PJSIP ACLs: Fix ACLs not loading on startup and apply/acl issues on contact

The biggest problem this patch fixes is that ACLs weren't previously being
loaded when the res_pjsip_acl module was loaded. Yikes. In addition, the
ACL options contact_permit and contact_acl were effectively interpreted as
contact_deny and this patch fixes that as well.

AST-1418 #close
Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4120/

ASTERISK-24531 #close
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/4171/
........

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@428376 f38db490-d61c-443f-a65b-d21fe96a405b
AST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.

The DB dialplan function when executed from an external protocol (for instance
AMI), could result in a privilege escalation.

Asterisk now inhibits the DB function from being executed from an external
interface if the live_dangerously option is set to no.

ASTERISK-24534
Reported by: Gareth Palmer
patches: submitted by Gareth Palmer (license 5169)
........

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

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

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

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@428418 f38db490-d61c-443f-a65b-d21fe96a405b
Fix error with mixed address family ACLs.

Prior to this commit, the address family of the first item in an ACL
was used to compare all incoming traffic. This could lead to traffic
of other IP address families bypassing ACLs.

ASTERISK-24469 #close

Reported by Matt Jordan
Patches:
	ASTERISK-24469-11.diff uploaded by Matt Jordan (License #6283)

AST-2014-012
........

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

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

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

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


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