set duplex=1 in rpt.conf
Date: Tue, 8 Jul 2014 06:58:27 -0600
Subject: Re: [App_rpt-users] Macro Help
From: electricity440@gmail.com
To: doug@crompton.comI just realized that no audio will play when Duplex=0. Telemetry works, but any system audio does not work. Is there a way to fix this?On Mon, Jul 7, 2014 at 10:43 PM, Doug Crompton <doug@crompton.com> wrote:
First of all there is a way to do that automatically. Put a sound file in
/var/lib/asterisk/sounds/rpt/nodenames/
such as 27225.ulaw
That file would play when you connected to node 27225.
There are already some sample files in there and some groups like the WAN system have file sets you can install for many of their nodes.
To just play a sound file locally when you type a DTMF sequence do the following....
In the functions section of your rpt.conf file add the DTMF sequence. Note the DTMF sequence must not conflict with any other commands.
985=localplay,/tmp/some-sound-file
This would play the file when you DTMF 985. Note that you do NOT put the extent on the sound file name. No ulaw, gsm etc. and the file must comply with the requirements for playing - sample rate, etc.
Another way to execute macro commands and a way I usually employ because it is much more flexible is to use bash scripts in the system and call them to do things. The scripts could also be called from a system cron job setup using crontab.
985=cmd,/tmp/some-script.sh
The script could be
#! /bin/bash
/usr/sbin/asterisk -rx "rpt fun node *327133"
/usr/sbin/asterisk -rx "rpt localplay node some-sound-file"
Replace node with your node number
This would connect your node to node 27133 and play the specified sound file locally.
These scripts could go anywhere on the system but I recommend creating a directory under /etc/asterisk - call it local or your call letters or whatever you want and put your local files there. Then if you backup the asterisk directory your local files will be backed up also.
Remember you have to make a script you create executable for it to work - chmod 750 filename
73 Doug
WA3DSP
http://www.crompton.com/hamradio
Date: Mon, 7 Jul 2014 16:14:58 -0600
From: electricity440@gmail.com
To: app_rpt-users@ohnosec.org
Subject: [App_rpt-users] Macro Help_______________________________________________ App_rpt-users mailing list App_rpt-users@ohnosec.org http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users To unsubscribe from this list please visit http://ohnosec.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.Im still a bit confused on how to use macros. So lets say I want to execute a command when the DTMF is dialed, lets say just a simple localplayHow would I implement that command into a DTMF sequence so I could save it as part of my macro.Lets say I wanted to create a macro to connect to the node 28298 and play the audio file. How would I implement the localplay command in the macros?[mymacros]
1= (localplaycommandHere) *328298--