<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font style="" color="#000000" face="Tahoma,sans-serif">Neil,<br><br> See my DTMF digit passing in autopatch howto. I think that is a more concise answer to this question you had.<br id="FontBreak"></font><br><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: Tue, 8 Dec 2015 17:11:32 -0500<br>Subject: Re: [arm-allstar] scripting - last dtmf digit received in client display<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div>Doug</div>
<div>THANK YOU</div>
<div>You have just opened the door to many script possibilities. You should
write the book</div>
<div>Scripting in Asterisk"</div>
<div>Thanks again and I will let you know my results in a week or so</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=""><b>From:</b> <a title="doug@crompton.com" href="mailto:doug@crompton.com">Doug Crompton</a> </div>
<div><b>Sent:</b> Tuesday, December 08, 2015 4:22 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] scripting - last dtmf digit received in
client display</div></div></div>
<div><br></div>
<div dir="ltr"><font color="#000000" face="Tahoma,sans-serif">Neil,<br><br> A
couple of more points on my last message. You should comment or delete the line
that plays - "please enter the" It is redundant the digits have already
been passed. With that line removed if you enter *61114300 it will
playback - Frequency 14300.<br><br>You could enter a line after the
SayDigits line like this -<br><br>exten =>
_1xxxxx,n,Playback(megahertz)<br><br>Then it would say - Frequency 14300
megahertz<br><br>hertz, kilohertz, and gigahertz are also available.<br><br>The
reason to enter the second "1" - 611 - is that it points it to the first
context. In that way you can have 10 sections 0-9 or *610 thru
*619 with parameters after that. Each section could do something else. If
you wanted more you could add a third digit. Each context could have as many
DTMF characters passed to it as desire or it could be none if none are
needed.<br><br>Asterisk can make system calls so anything that would run under
Linux can be executed and parameters can be passed. Here is an example of how I
call x10 control from my phone -<br><br>exten =>
_1.,1,System(/usr/local/bin/x10 on ${EXTEN:1})<br><br>In this case I execute the
x10 program in /usr/local/bin and pass it the parameters "on" and one digit of
the extension.<br><br>So if you wanted to pass the frequency to hamlib (I don't
know hamlib parameters so this is JUST and example)<br><br></font><font color="#000000" face="Tahoma,sans-serif"><font color="#000000" face="Tahoma,sans-serif">exten => _1.,1,System(/directory-location/hamlib
<freq-command> ${EXTEN})</font><br><br>The digits can be formatted either
in the extensions file with asterisk commands or sent to an external script for
formatting. <br><br>Also note that any playback in asterisk would be global.
That is if you are connected to other nodes they would hear "Frequency
14300" There are ways to get around this by using system calls either in
the dial plan or in a script that directly calls asterisk and executes rpt
commands. You can execute rpt commands from the dialplan but there is no
SayDigit command in Allstar so you would have to use a script to say the
individual digits. An example is in the script that says the IP address which
calls speaktext.sh. If this is an issue then you could go to the extra trouble
but if not it would greatly simplify things.<br id="ecxFontBreak"></font><br><font face="Tahoma,sans-serif">While the example I show uses the current default *61 to
enter the patch you could leave that line intact if you are using it to actually
do patch things and enter a new line with the same parameter except with the
"context=" changed and a different function code defined. So as an example
entering -</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">871=autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1
</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">and leaving the
61 function alone would mean that you would enter</font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif"><br></font><font face="Tahoma,sans-serif">*8711xxxxx to enter a five digit frequency. Of
course the number of frequency digits could be any lenght defined by the x's
indicating a digit.</font><font face="Tahoma,sans-serif"><br></font><br><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="ecxstopSpelling">
From: doug@crompton.com<br>To: arm-allstar@hamvoip.org<br>Date: Tue, 8 Dec 2015
13:46:44 -0500<br>Subject: Re: [arm-allstar] scripting - last dtmf digit
received in client display<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr"><font color="#000000" face="Tahoma,sans-serif">Neil,<br><br> OK
here is a way to do this at least here are the clues to do it. I have not done
it completely for you but what I show here does work.<br><br>First in rpt.conf
find the phone patch function - 61<br><br>change the context= to
context=command_radio<br><br>then in extensions.conf add the following context
at the end -<br><br>[command_radio]<br>exten =>
_1xxxxx,1,Playback(please-enter-the)<br>exten =>
_1xxxxx,n,Playback(frequency)<br>exten =>
_1xxxxx,n,SayDigits(${EXTEN})<br>exten => _1xxxxx,n,Wait(2)<br>exten =>
_1xxxxx,n,Hangup()<br><br>You need to understand asterisk dial plans in order to
understand this but basically the way this is setup if you enter at the
radio *611xxxxx the last 5 digits will be passed as the EXTEN
variable in Asterisk. At that point you could do whatever you wanted with it -
like pass to a script that sent it to hamlib for execution. Of course the number
of digits could be changed and other functions could be added.<br><br>When
changing either file you need to either reload then in the client or restart
Allstar.<br><br></font><font face="Tahoma,sans-serif">The Asterisk diaplan is very
powerful but you need to hone up on the commands and syntax!!!<br><br>This is
the (more) right way to do this rather than adding stuff to
Allstar.<br></font><br><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><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>
<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>_______________________________________________
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></body>
</html>