[arm-allstar] macro question

Neil k8it k8it at cac.net
Thu Sep 3 20:47:33 EST 2015


Thanks Doug. And yes I agree with using scripts. What I am trying to do is respond to a users DTMF digits for a remote base application. I now have written script code using hamlib to control my TMV71A radio. it works good but only has a few preprogrammed memories based on which macro you use.
I would like to instead receive three DTMF digits and process them before passing them to the radio via hamlib. Somehow there is a way!
If I call a script
is it possible to call an asterisk function from within the script  to receive three DTMF digits directly to the script for more processing?


Thanks
73 Neil Sablatzky  K8IT
Allstar Node 41838 KITLINK
Allstar Node 42087 KITLINK HUB
IRLP Node exp0068
Echolink K8IT-L
WIRES-X K8IT 11479 Room 21479


From: Doug Crompton 
Sent: Thursday, September 03, 2015 8:53 PM
To: ARM Allstar 
Subject: Re: [arm-allstar] macro question


Neil,

 I don't think you can pass parameters to a macro. There would be no way to test for vlaues. Why not call a script and pass parameters there. here is an example from rpt.conf. This is defined in the [functions] section. *A1 would call this and execute sayip.sh.  27225 is the passed parameter.

A1=cmd,/usr/local/sbin/sayip.sh 27225 

The in the sayip.sh script $1 is then defined as 27225.  You can have multiple parameters so if it were -

A1=cmd,/usr/local/sbin/sayip.sh 1 2 3

Then in the script $1 would =1, $2 would = 2, and $3 would =3.

This yet again shows the power of using scripts over built-in code.

73 Doug
WA3DSP
http://www.crompton.com/hamradio



> From: k8it at cac.net
> To: arm-allstar at hamvoip.org
> Date: Thu, 3 Sep 2015 19:00:20 -0400
> Subject: [arm-allstar] macro question
> 
> using a macro say for example
> *52 which can call a bash script
> How can I pass say the next three DTMF digits to the script to be processed?
> For example if a user enters *52123 where 123 is three random dtmf digits 
> how can I pass the 123 digits to the bash script?
> 
> Thanks
> 73 Neil Sablatzky K8IT
> Allstar Node 41838 KITLINK
> Allstar Node 42087 KITLINK HUB
> IRLP Node exp0068
> Echolink K8IT-L
> WIRES-X K8IT 11479 Room 21479
> 
> 
> _______________________________________________
> 
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2 web page - http://hamvoip.org
> 



--------------------------------------------------------------------------------


_______________________________________________

arm-allstar mailing list
arm-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar

Visit the BBB and RPi2 web page - http://hamvoip.org 


--------------------------------------------------------------------------------


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6125 / Virus Database: 4409/10570 - Release Date: 09/03/15
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20150903/53af5c8b/attachment.html>


More information about the arm-allstar mailing list