[asterisk-dev] [Code Review] 4427: Fix crash when AOC-E message is received after the channel has been destroyed.

Matt Jordan reviewboard at asterisk.org
Tue Feb 17 11:17:38 CST 2015



> On Feb. 16, 2015, 12:50 p.m., Matt Jordan wrote:
> > /branches/12/main/aoc.c, lines 1871-1880
> > <https://reviewboard.asterisk.org/r/4427/diff/1/?file=71450#file71450line1871>
> >
> >     I don't think this is the right way to fix the problem.
> >     
> >     This is really just working around the underlying problem: the AOC-E message in sig_pri is being raised too late in the process. Preferably, it should be raising the AOC-E event with the channel - currently, it is doing this after the channel has been destroyed.
> >     
> >     Right now, publishing to ast_channel_publish_blob without a channel will publish it to the all channel topic, which is not the right answer.
> >     
> >     If we can't hold onto the channel long enough, then we should at least:
> >     (a) Provide the channel name, and alter the AOC messages to look for that field
> >     (b) Alter the AOC AMI formatting to be tolerant of there not being a channel.
> >     
> >     
> >
> 
> rmudgett wrote:
>     @matt: ISDN can send the AOC-E event with the incoming DISCONNECT or well after the channel is gone so there may not be a channel available.  It is up to the network when or if AOC-E is sent.
> 
> Matt Jordan wrote:
>     I was afraid of that.
>     
>     In that case, we should preferably provide the channel name at least in the event, which would allow the AOC-E event to be tied back to previous AOC events.
> 
> Joshua Colp wrote:
>     Looking at the previous implementation it looks as though we didn't even do... that...

Yeah. I think the channel has to be just an "FYI".

In reality, AOC messages are not necessarily tied to a channel. They are their own thing, and may reference a channel. Publishing them to the channel topic was probably incorrect.

I think if a channel exists that an AOC message can be associated with, that's a good thing. However, since they may exist outside of the lifetime of a channel, they should probably be published to either the manager topic (since that is the only thing that is concerned with AOC messages) or their own topic.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4427/#review14468
-----------------------------------------------------------


On Feb. 15, 2015, 4:33 p.m., roeften wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4427/
> -----------------------------------------------------------
> 
> (Updated Feb. 15, 2015, 4:33 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-22670, ASTERISK-24689 and ASTERISK-24740
>     https://issues.asterisk.org/jira/browse/ASTERISK-22670
>     https://issues.asterisk.org/jira/browse/ASTERISK-24689
>     https://issues.asterisk.org/jira/browse/ASTERISK-24740
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Mostly checking for null and allowing a manager event to be generated without a channel specified (which seems to work).
> 
> 
> Diffs
> -----
> 
>   /branches/12/main/manager_channels.c 431876 
>   /branches/12/main/aoc.c 431876 
> 
> Diff: https://reviewboard.asterisk.org/r/4427/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> roeften
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150217/6d10294e/attachment-0001.html>


More information about the asterisk-dev mailing list