Logger: Add dynamic logger channels

This adds the ability to dynamically add and remove logger channels
from Asterisk via the CLI.

(closes issue AST-1150)
Review: https://reviewboard.asterisk.org/r/3185/


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@407989 f38db490-d61c-443f-a65b-d21fe96a405b
Fix crash in AMI PJSIPShowEndpoint action.

If an AOR has no permanent contacts, then the
permanent_contacts container is never allocated.
This makes the code safe in the face of NULLs.

I also changed the variable that counts contacts
from "num" to "total_contacts" since there are now
two variables that are indicate numbers of things.
........

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


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