ISDN AOC: Fix crash from an AOC-E message that doesn't have a channel association.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 19 Feb 2015 18:26:49 +0000 (18:26 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 19 Feb 2015 18:26:49 +0000 (18:26 +0000)
commit252aee4228da62d1e0c9859413d692bd75e3420f
treea5982b263f6c4e64435f5db0aabafebe0376b4d1
parent6992b2e8fa3c05a165bedab79713949ce4703ecb
ISDN AOC: Fix crash from an AOC-E message that doesn't have a channel association.

Processing an AOC-E event that does not or no longer has a channel
association causes a crash.

The problem with posting AOC events to the channel topic is that AOC-E
events don't always have a channel association and posting the event to
the all channels topic is just wrong.  AOC-E events do however have their
own charging association method to refer to the agreement with the
charging entity.

* Changed the AOC events to post to the AMI manager topic instead of the
channel topics.  If a channel is associated with the event then channel
snapshot information is supplied with the AMI event.

* Eliminated RAII_VAR() usage in aoc_to_ami() and ast_aoc_manager_event().

This patch supercedes the patch on Review: https://reviewboard.asterisk.org/r/4427/

ASTERISK-22670 #close
Reported by: klaus3000

ASTERISK-24689 #close
Reported by: Marcel Manz

ASTERISK-24740 #close
Reported by: Panos Gkikakis

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

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/aoc.c