Summary:ASTERISK-20158: Add support to Audio Call Next Event - in app_alarmreceiver
Reporter:Pedro Kiefer (pedrokiefer)Labels:
Date Opened:2012-07-20 12:30:48Date Closed:2012-09-05 11:04:08
Versions:SVN Frequency of
Environment:Attachments:( 0) 0006-Exit-the-loop-on-Audio-Call-Next-event.patch
( 1) 0006-Exit-the-loop-on-Audio-Call-Next-event.patch
Description:Some alarm panels have support for opening a voice channel after sending the alarm data. This patch add support for this.

Currently the alarm receiver app is waiting for the remote site to hangup, this kind of alarm panels never hangup, and we get stuck on the alarm receiver app until it times out.
Comments:By: Pedro Kiefer (pedrokiefer) 2012-07-20 12:31:35.001-0500

This patch was generated after those on ASTERISK-20157.

By: Pedro Kiefer (pedrokiefer) 2012-08-13 12:45:41.628-0500

New version of the patch, after review by Kaloyan Kovachev

By: Kaloyan Kovachev (knk) 2012-08-17 11:53:33.557-0500

As stated in the review, this is a bug on my opinion, because 'we get stuck on the alarm receiver app until it times out'
This also applies for a malicious caller who can block the line for a long time (will open another issue), but the complete fix will require adding a config or application option to timeout if no valid events are received for some time or the call keeps going too long even with valid events.
I think the best will be to add application options as it will not break old dialplans, but will allow the user to set different values for whitelisted panels, that send lots of events (call_timeout) or 'known broken' panels that have problems sending dtmf (no_event_timeout).

By: Pedro Kiefer (pedrokiefer) 2012-08-17 12:21:18.948-0500

That is definitely a bug on the alarm receiver code, this patch was not meant to fix this, only to handle the audio call next type of event. I can create a patch for this too, but I won't be able to do any coding until next monday.

I would really like to rewrite the main loop of the app, the way it works right now looks and feels dirty to me. I'm willing to do this, but I would love to have some kind of unit testing, do you have any ideas of how I could do that?

By: Kaloyan Kovachev (knk) 2012-08-17 13:49:31.037-0500

I have some (long waiting) code that is fixing this problem, adds more formats and A-law calls handling, but will post them (in separate issues) after this round of changes goes in, because not all changes will be accepted at this point for inclusion, so all-in-one patch is just doomed. Closing all issues opened at the moment is the first step on my opinion ... then we may continue

By: Pedro Kiefer (pedrokiefer) 2012-08-17 14:23:12.813-0500

That sounds good to me! :)