<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<STYLE><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></STYLE>
<META name=GENERATOR content="MSHTML 11.00.10240.16445"></HEAD>
<BODY id=MailContainerBody class=hmmessage
style="PADDING-TOP: 15px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV>some very interesting ideas.</DIV>
<DIV>What I might try is to create a total of 11 scripts. Say *50 to
*59, *60 </DIV>
<DIV> </DIV>
<DIV>Using your ideas, I can use the first ten scripts to enter digits 0- 9 to a
temporary variable, use localplay to echo the digit and exit. (Assume that
the variable is equal to null at the beginning) Each of these scripts will test
the variable for a length of 3 digits. When
this occurs another script will be called. . This
script will process the 3 DTMF digits and call the HAMLIB with
the proper commands. . The *60 macro will call a disconnect
script. Doing it this way I can get 1000 memories with only a few simple
scripts. Also the temporary variable will be cleared to null once the memory
connect command is issued. What do you think of this idea?</DIV>
<DIV> </DIV>
<DIV>Thanks<BR>73 Neil Sablatzky K8IT<BR>Allstar Node 41838
KITLINK<BR>Allstar Node 42087 KITLINK HUB<BR>IRLP Node exp0068<BR>Echolink
K8IT-L<BR>WIRES-X K8IT 11479 Room 21479</DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=doug@crompton.com
href="mailto:doug@crompton.com">Doug Crompton</A> </DIV>
<DIV><B>Sent:</B> Thursday, September 03, 2015 10:57 PM</DIV>
<DIV><B>To:</B> <A title=arm-allstar@hamvoip.org
href="mailto:arm-allstar@hamvoip.org">ARM Allstar</A> </DIV>
<DIV><B>Subject:</B> Re: [arm-allstar] macro question</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV dir=ltr><FONT color=#000000 face=Tahoma,sans-serif>Neil,<BR><BR> You
could define multiple functions that called the same script with different
parameters or channels. In this case *D1 through *D3 would set channels 1-3. You
can add more as you wish and even process additional parameters.<BR></FONT><BR
id=FontBreak><FONT color=#000000
face=Tahoma,sans-serif>D1=cmd,/etc/asterisk/local/set_channel 1 <BR></FONT><FONT
color=#000000 face=Tahoma,sans-serif>D2=cmd,/etc/asterisk/local/set_channel
2</FONT><BR><FONT color=#000000
face=Tahoma,sans-serif>D3=cmd,/etc/asterisk/local/set_channel
3</FONT><BR><B><FONT style="FONT-SIZE: 16pt"
size=4>etc....<BR><BR></FONT></B><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><FONT size=+0>Then in the script test the parameter and
execute the </FONT><FONT size=+0>proper command or just use the parameter in the
call to the command.</FONT></FONT><B><FONT style="FONT-SIZE: 16pt" size=4><FONT
style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><BR></FONT></B><FONT style="FONT-SIZE: 12pt"
size=3 face=Tahoma,sans-serif># !/bin/bash<BR><BR>if [ -z $1
]<BR> then<BR> echo "No channel given (1-16)"<BR>
exit 0<BR>fi<BR><BR>case "$1" in<BR><BR> 1) Echo "Channel
1"<BR> # command for channel 1 to asterisk put
here<BR> ;;<BR><BR> 2) echo "Channel
2"<BR> # command for channel 2 to asterisk put
here<BR> ;;<BR><BR> 3) echo "Channel
3"<BR> # command for channel 3 to asterisk put
here<BR> ;;<BR>#etc.... add
channels<BR><BR>esac<BR><BR>exit</FONT><B><FONT style="FONT-SIZE: 16pt"
size=4><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><BR></FONT></B><FONT style="FONT-SIZE: 16pt"
size=4><FONT style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>By the way
Dave, KB4FXC commented to me that you could use the dialplan in extensions .conf
to do this and that is exactly what I did years ago in a script to control my
X10 system from the phone in Asterisk.</FONT><FONT style="FONT-SIZE: 12pt"
size=3 face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR>Here is an example </FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>-</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>[controlx10]</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
s,1,background(doug/enter_x10)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => s,n,Set(TIMEOUT(response)=4)</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
s,n,Set(TIMEOUT(digit)=1)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => s,n,WaitExten()</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
s,n,Goto(s,1)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _1.,1,System(/usr/local/bin/x10 on
${EXTEN:1})</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _1.,n,SayNumber(${EXTEN:1})</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_1.,n,Playback(on)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _1.,n,Goto(s,1)</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_0.,1,System(/usr/local/bin/x10 off ${EXTEN:1})</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_0.,n,SayNumber(${EXTEN:1})</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _0.,n,Playback(off)</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_0.,n,Goto(s,1)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _3.,1,System(/usr/local/bin/x10 dim
${EXTEN:1})</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>;exten => _3.,1,noop(${EXTEN:1})</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_3.,n,Goto(s,1)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _4.,1,System(/usr/local/bin/x10 bright
${EXTEN:1})</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _4.,n,Goto(s,1)</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_5.,1,System(/usr/local/bin/x10 allon ${EXTEN:1})</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
_5.,n,Goto(s,1)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _6.,1,System(/usr/local/bin/x10 alloff
${EXTEN:1})</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => _6.,n,Goto(s,1)</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>;exten =>
4,1,Playback(goodbye)</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>;exten => 4,n,Hangup()</FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif><BR></FONT><FONT
style="FONT-SIZE: 12pt" size=3 face=Tahoma,sans-serif>exten =>
*,1,Return()</FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif><BR></FONT><FONT style="FONT-SIZE: 12pt" size=3
face=Tahoma,sans-serif>exten => #,1,Hangup()<BR><BR>This would need to be
setup in Allstar but could work. I think for now an easier and more
straightforward way would be to use the script method I proposed above if it
works for you.<BR><BR></FONT></FONT><B><FONT style="FONT-SIZE: 16pt" size=4>73
Doug</FONT><FONT style="FONT-SIZE: 16pt" size=4><BR></FONT><FONT
style="FONT-SIZE: 16pt" size=4>WA3DSP</FONT><FONT style="FONT-SIZE: 16pt"
size=4><BR></FONT><FONT style="FONT-SIZE: 16pt"
size=4>http://www.crompton.com/hamradio</FONT></B><FONT style="FONT-SIZE: 16pt"
size=4><BR></FONT><BR><BR>
<DIV>
<HR id=stopSpelling>
From: k8it@cac.net<BR>To: arm-allstar@hamvoip.org<BR>Date: Thu, 3 Sep 2015
21:47:33 -0400<BR>Subject: Re: [arm-allstar] macro question<BR><BR>
<STYLE><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></STYLE>
<DIV>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.</DIV>
<DIV>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!</DIV>
<DIV>If I call a script</DIV>
<DIV>is it possible to call an asterisk function from within the script to
receive three DTMF digits directly to the script for more processing?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Thanks<BR>73 Neil Sablatzky K8IT<BR>Allstar Node 41838
KITLINK<BR>Allstar Node 42087 KITLINK HUB<BR>IRLP Node exp0068<BR>Echolink
K8IT-L<BR>WIRES-X K8IT 11479 Room 21479</DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV><B>From:</B> <A title=doug@crompton.com
href="mailto:doug@crompton.com">Doug Crompton</A> </DIV>
<DIV><B>Sent:</B> Thursday, September 03, 2015 8:53 PM</DIV>
<DIV><B>To:</B> <A title=arm-allstar@hamvoip.org
href="mailto:arm-allstar@hamvoip.org">ARM Allstar</A> </DIV>
<DIV><B>Subject:</B> Re: [arm-allstar] macro question</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV dir=ltr><FONT color=#000000 face=Tahoma,sans-serif>Neil,<BR><BR> 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.<BR><BR>A1=cmd,/usr/local/sbin/sayip.sh 27225 <BR><BR>The in the
sayip.sh script $1 is then defined as 27225. You can have multiple
parameters so if it were -<BR><BR>A1=cmd,/usr/local/sbin/sayip.sh 1 2
3<BR><BR>Then in the script $1 would =1, $2 would = 2, and $3 would
=3.<BR><BR>This yet again shows the power of using scripts over built-in
code.<BR><BR></FONT><B><FONT style="FONT-SIZE: 16pt" size=4>73 Doug</FONT><FONT
style="FONT-SIZE: 16pt" size=4><BR></FONT><FONT style="FONT-SIZE: 16pt"
size=4>WA3DSP</FONT><FONT style="FONT-SIZE: 16pt" size=4><BR></FONT><FONT
style="FONT-SIZE: 16pt" size=4>http://www.crompton.com/hamradio</FONT></B><FONT
style="FONT-SIZE: 16pt" size=4><BR></FONT><BR><BR>
<DIV>> From: k8it@cac.net<BR>> To: arm-allstar@hamvoip.org<BR>> Date:
Thu, 3 Sep 2015 19:00:20 -0400<BR>> Subject: [arm-allstar] macro
question<BR>> <BR>> using a macro say for example<BR>> *52 which can
call a bash script<BR>> How can I pass say the next three DTMF digits to the
script to be processed?<BR>> For example if a user enters *52123 where 123 is
three random dtmf digits <BR>> how can I pass the 123 digits to the bash
script?<BR>> <BR>> Thanks<BR>> 73 Neil Sablatzky K8IT<BR>> Allstar
Node 41838 KITLINK<BR>> Allstar Node 42087 KITLINK HUB<BR>> IRLP Node
exp0068<BR>> Echolink K8IT-L<BR>> WIRES-X K8IT 11479 Room 21479<BR>>
<BR>> <BR>> _______________________________________________<BR>>
<BR>> arm-allstar mailing list<BR>> arm-allstar@hamvoip.org<BR>>
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar<BR>> <BR>>
Visit the BBB and RPi2 web page - http://hamvoip.org<BR>>
<BR></DIV></DIV><BR>
<HR>
<BR>_______________________________________________<BR><BR>arm-allstar mailing
list<BR>arm-allstar@hamvoip.org<BR>http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar<BR><BR>Visit
the BBB and RPi2 web page - http://hamvoip.org <BR>
<HR>
<BR><A target=_blank></A>
<P align=left>No virus found in this message.<BR>Checked by AVG - <A
href="http://www.avg.com" target=_blank>www.avg.com</A><BR>Version: 2015.0.6125
/ Virus Database: 4409/10570 - Release Date:
09/03/15</P><BR>_______________________________________________ arm-allstar
mailing list arm-allstar@hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar Visit the BBB and
RPi2 web page - http://hamvoip.org</DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR><BR>arm-allstar
mailing
list<BR>arm-allstar@hamvoip.org<BR>http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar<BR><BR>Visit
the BBB and RPi2 web page - http://hamvoip.org
<P>
<HR>
<P></P><A></A>
<P align=left avgcert?? color="#000000">No virus found in this
message.<BR>Checked by AVG - <A
href="http://www.avg.com">www.avg.com</A><BR>Version: 2015.0.6125 / Virus
Database: 4409/10570 - Release Date: 09/03/15</P></BODY></HTML>