[App_rpt-users] Allstar 'Answering Machine'
Matthew Simmons
km6toa at gmail.com
Mon May 20 07:31:37 UTC 2019
I think I've come up with a pretty simple solution.
Recording is simple. Just add "archivedir=/home/somefolder" to rpt.conf .
The problem was how to start and stop recording. Once you have set an
archive directory in rpt.conf it just keeps recording their forever which
is not what I needed.
My solution was to set the immutable attribute for the archive directory
(chattr +i /home/allstarudio/*). This prevents any files from being
modified or created in the archive directory. App.rpt is still trying to
put files in the folder but it cannot.
So I made a simple script that removes the immutable attribute from the
archive directory, sleeps for 15seconds and then adds the immutable
attribute back. This allows any transmission made within that 15 seconds to
be saved in the archive directory.
I then defined a custom DTMF function in the function stanza of rpt.conf.
When this DTMF tone is dialed the mailbox.sh script will run and any
transmission the user starts within the next 15 seconds will be recorded.
Script is copied below.
Anyone is welcome to dial my node and leave a message. Node # 49245
mailbox.sh
#!/bin/bash
# How to use this script
# You must Uncommnet or add the line "archivedir = /home/allstaraudio" in
/etc/asterisk/rpt.conf
# You must also create the "allstaraudio" directory in your home folder
# create a custom DTMF macro in functions stanza of rpt.conf that calls
this script.
# example dtmf macro "85=cmd,/home/yourusername/mailbox.sh"
#this sets the app.rpt audio archive directory to immutable
chattr -i /home/allstaraudio/*
# this pauses the script for 15 seconds. Any transmission that begins
within this 15 seconds will be recorded even if it is longer than 15
seconds.
sleep 15s
#this adds the immutable attribute from the app.rpt audio archive directory
preventing any further audio files from being stored.
chattr +i /home/allstaraudio/*
On Sun, May 19, 2019 at 1:20 AM Mark Johnston <markjohnston73 at gmail.com>
wrote:
>
> https://www.google.com/search?ei=jhHhXKeTCsWCk-4Pope3oA0&q=asterisk+1.4+voicemail&oq=asterisk+1.4&gs_l=psy-ab.1.0.35i39j0l3j0i22i30l6.11482.19925..21107...6.0..0.87.1219.17......0....1..gws-wiz.....6..0i71j0i67j0i131j0i20i263.fAOFoHS72mA
>
>
>
>
> **** North West Hub Allstar Node 2295 <http://www.markjohnston.us/nwhub>
> ****
>
> "Got Root?"
>
> How many software engineers does it take to change a light bulb?
> *None. It's a hardware problem.*
>
> The best way to accelerate a computer running Windows is at 9.81 m/s².
>
> *"I get paid to support Windows, I use Linux to get work done."*
>
>
>
> On Sun, May 19, 2019 at 12:19 AM Matthew Simmons <km6toa at gmail.com> wrote:
>
>> What is this "built in voicemail" you speak of?
>>
>> On Sun, May 19, 2019 at 12:16 AM Mark Johnston <markjohnston73 at gmail.com>
>> wrote:
>>
>>> Yea, I looked into using the built in voicemail, but havent' touched
>>> that in a while...
>>> Way back I made a vmail system (scripted) for IRLP...
>>>
>>>
>>>
>>>
>>> **** North West Hub Allstar Node 2295 <http://www.markjohnston.us/nwhub>
>>> ****
>>>
>>> "Got Root?"
>>>
>>> How many software engineers does it take to change a light bulb?
>>> *None. It's a hardware problem.*
>>>
>>> The best way to accelerate a computer running Windows is at 9.81 m/s².
>>>
>>> *"I get paid to support Windows, I use Linux to get work done."*
>>>
>>>
>>>
>>> On Sun, May 19, 2019 at 12:14 AM Clifford Novey <cnovey at gmail.com>
>>> wrote:
>>>
>>>> Great idea. I hope you figure it out.
>>>> Clifford
>>>> KK6QMS
>>>>
>>>> On Sat, May 18, 2019, 2:10 PM Matthew Simmons <km6toa at gmail.com> wrote:
>>>>
>>>>> My goal is to create a simple 'answering machine' for my allstar node.
>>>>>
>>>>> I would like for a user to be able to connect to my node and enter a
>>>>> DTMF command that would then cause the node to record the very next
>>>>> transmission and store it to a folder on a mounted volume on the PI.
>>>>>
>>>>> I have looked into using the built-in recording feature via *'**archivedir'
>>>>> *. Howver I am not sure how to control it so that it will start and
>>>>> stop recording.
>>>>>
>>>>> So my question is this. Is there a simple way to tell the node to
>>>>> record the next transmission, save it, and then stop recording?
>>>>>
>>>>> I am hoping this could be done via a script which could be called by
>>>>> app rpt via a dtmf command.
>>>>>
>>>>> Any info or suggestions would be greatly appreciated.
>>>>>
>>>>> 73,
>>>>> KM6TOA
>>>>> _______________________________________________
>>>>> App_rpt-users mailing list
>>>>> App_rpt-users at lists.allstarlink.org
>>>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>>>>
>>>>> To unsubscribe from this list please visit
>>>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>>>> and scroll down to the bottom of the page. Enter your email address and
>>>>> press the "Unsubscribe or edit options button"
>>>>> You do not need a password to unsubscribe, you can do it via email
>>>>> confirmation. If you have trouble unsubscribing, please send a message to
>>>>> the list detailing the problem.
>>>>>
>>>> _______________________________________________
>>>> App_rpt-users mailing list
>>>> App_rpt-users at lists.allstarlink.org
>>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>>>
>>>> To unsubscribe from this list please visit
>>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>>> and scroll down to the bottom of the page. Enter your email address and
>>>> press the "Unsubscribe or edit options button"
>>>> You do not need a password to unsubscribe, you can do it via email
>>>> confirmation. If you have trouble unsubscribing, please send a message to
>>>> the list detailing the problem.
>>>>
>>> _______________________________________________
>>> App_rpt-users mailing list
>>> App_rpt-users at lists.allstarlink.org
>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>>
>>> To unsubscribe from this list please visit
>>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users and
>>> scroll down to the bottom of the page. Enter your email address and press
>>> the "Unsubscribe or edit options button"
>>> You do not need a password to unsubscribe, you can do it via email
>>> confirmation. If you have trouble unsubscribing, please send a message to
>>> the list detailing the problem.
>>>
>> _______________________________________________
>> App_rpt-users mailing list
>> App_rpt-users at lists.allstarlink.org
>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>>
>> To unsubscribe from this list please visit
>> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users and
>> scroll down to the bottom of the page. Enter your email address and press
>> the "Unsubscribe or edit options button"
>> You do not need a password to unsubscribe, you can do it via email
>> confirmation. If you have trouble unsubscribing, please send a message to
>> the list detailing the problem.
>>
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at lists.allstarlink.org
> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users
>
> To unsubscribe from this list please visit
> http://lists.allstarlink.org/cgi-bin/mailman/listinfo/app_rpt-users and
> scroll down to the bottom of the page. Enter your email address and press
> the "Unsubscribe or edit options button"
> You do not need a password to unsubscribe, you can do it via email
> confirmation. If you have trouble unsubscribing, please send a message to
> the list detailing the problem.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20190520/86ac6ae9/attachment.html>
More information about the App_rpt-users
mailing list