Made audiohooks, framehooks, and monitor prevent local channel optimization.

Audiohooks, framehooks, and monitor represent state on a local channel
that will go away if it is optimized out.

(closes issue ASTERISK-21954)
Reported by: rmudgett

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394791 f38db490-d61c-443f-a65b-d21fe96a405b
Convert CCSS manager events to stasis.

(closes issue ASTERISK-21473)

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


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394793 f38db490-d61c-443f-a65b-d21fe96a405b
Fix crash when using temporary peers

Temporary peers do not have an associated Stasis endpoint and quite a
bit of code in chan_sip assumes that all peers have a Stasis endpoint.
All endpoint accesses in chan_sip are now wrapped in an endpoint
NULL-check.


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