[Home]

Summary:ASTERISK-28868: app_alarmreceiver: does not call "eventcmd" with events as arguments or piping
Reporter:Paul Langner (plangner)Labels:
Date Opened:2020-05-04 10:02:18Date Closed:2020-05-18 12:00:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_alarmreceiver
Versions:16.10.0 Frequency of
Occurrence
Related
Issues:
Environment:AllAttachments:( 0) app_alarmreceiver.c
Description:alarmreceiver.conf documentation states that app_alarmreceiver.c will pipe the alarm events to the user application specified by eventcmd in alarmreceiver.conf, yet it does not do this, and only calls the eventcmd program with no arguments, and no piping (Lines 154-158).

To solve this issue, a command string needs to be created consisting of the user command specified by eventcmd, followed by the list of events, passed as command-line arguments, and this string called upon hang-up.  This is better than piping, as typically the events need to be parsed into human-readable form prior to e-mailing, etc. - which is easily done in a bash script.

Up to this point, the approach (without fixing the issue) has been to enable writing individual events to the /tmp directory and then having the program specified in eventcmd search this directory for the most recent file, and then parse this to obtain the event.
Comments:By: Asterisk Team (asteriskteam) 2020-05-04 10:02:19.155-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Paul Langner (plangner) 2020-05-04 10:10:37.426-0500

This modification does the following:

Modification Lines 154-158: Changes the comment to specify calling user program specified in eventcmd with events as command-line arguments, versus piping to the command

Addition Lines 799-800: Declare 2x char strings to formulate the calling string with events

Change Lines 846-847 -> Lines 848-856: Create the calling string with events as args, and call string

By: Joshua C. Colp (jcolp) 2020-05-04 10:47:52.804-0500

Patches are only viewable once attached after a signed license agreement has been accepted.

As well to have them included in the fastest way possible they can be placed on Gerrit[1] for code review and inclusion after the license agreement is signed as well. If this isn't done then it is up to someone else to go through the process.

[1] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

By: Asterisk Team (asteriskteam) 2020-05-18 12:00:01.160-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines