[asterisk-dev] Default audiohook inheritance
Mark Michelson
mmichelson at digium.com
Mon Dec 14 14:50:57 CST 2009
Dwayne Hubbard wrote:
> About a year ago, Mark Michelson introduced a helpful dialplan function
> called AUDIOHOOK_INHERIT which enables the dialplan writer to specify
> whether or not [an] audiohook(s) should propagate to a new channel
> during a masquerade.
>
> I would like to start a discussion regarding the current behavior of
> audiohooks and more specifically whether audiohooks should propagate to
> the new channel during a masquerade by default. In my opinion, the edge
> cases are where the dialplan writer would not want audiohooks to
> propagate to the new channel during a masquerade. It is also my opinion
> that the average dialplan writer does not want to know which dialplan
> functions/applications/etc use audiohooks or masquerades under-the-hood.
>
> My proposal is to merge the functionality of func_audiohookinherit.c
> into audiohook.c and to retain the AUDIOHOOK_INHERIT function for the
> edge cases where the dialplan writer wants to disable (or re-enable) the
> inheritance of audiohooks on a channel.
>
> If the Asterisk community and Digium agree, I would be more than happy
> to provide the patch.
>
> regards,
> Dwayne Hubbard
>
As a consumer of the Asterisk users mailing list, I have to agree that most
people seem to expect that audiohooks will remain active after a masquerade. It
seems odd that someone would have to seek out the AUDIOHOOK_INHERIT function in
order to get the behavior one expects, especially since the term "audiohook" is
not in the typical Asterisk user's lexicon.
The reason why this functionality was originally written this way was to disrupt
existing systems as little as possible. One thing we've been dragged over the
coals for is causing subtle or not-so-subtle behavior changes when someone
performs an upgrade.
My stance on this is that such a change in trunk would be welcome, but changing
this in released versions (and the soon-to-be-released 1.6.2) is not a good
idea. If an appropriate notice were placed in UPGRADE.txt about the change, I
think most people would find the change welcome. I think you're right that the
times when audiohooks should *not* be inherited are the edge cases.
Mark Michelson
More information about the asterisk-dev
mailing list