[arm-allstar] macro question

Doug Crompton doug at crompton.com
Thu Sep 3 19:53:20 EST 2015


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
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20150903/2c115656/attachment.html>


More information about the arm-allstar mailing list