<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 7/28/11 10:04 AM, Lu Vencl wrote:
<blockquote cite="mid:0bf601cc4d2f$466ad570$d3408050$@net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<!--[if !mso]>
<style id=owaTempEditStyle>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi
Corey,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yea,
I just thought that I could issue commands to another node
without actually connecting to it.. I would have thought
there would be a way
to do this in the background (short from SSHing into the
box) so you would not have
to go through the actual connect process, but the current
method is just fine..
I just did not understand it for some reason at first that
you had to connect.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
suppose I could create some sort of macro to login to the
boxes and perform the intended commands, just got to learn
how to do all of
that when I get some time.. <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks
and 73<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Lu,
KA4EPS<o:p></o:p></span></p>
<br>
</div>
</blockquote>
That's what the XXX=cmd,/some/were/in/your/filesystem comes in
handy, where XXX=some DTMF command, and /.... is a script you run.
You can have asterisk execute shell commands as the target of a DTMF
sequence.<br>
<br>
For instance:<br>
<br>
in rpt.conf in the functions stanza, I have lines thus: (note,
123/124 is a placeholder for the purposes of this discussion)<br>
<br>
[functions]<br>
...<br>
123=cmd,/etc/asterisk/scripts/nodexup.sh<br>
124=cmd,/etc/asterisk/scripts/nodexdown.sh<br>
...<br>
<br>
and in a scripts directory I've created under /etc/asterisk there's
a shell script called nodexup.sh:<br>
<br>
#!/bin/bash<br>
/usr/sbin/asterisk -rx "rpt cmd myhubnode ilink 3 nodex"<br>
<br>
with a chmod of 755, owned by whomever owns the asterisk daemon. To
write the node down script, cp nodexup.sh nodexdown.sh, change the 3
to a 1, save, check the permissions, and restart asterisk.<br>
<br>
Now, if you have multiple nodes running on the same instantiation of
asterisk (as I do), I have them all pointing to a common function
stanza (I know, I should separate them out...), so, from any of my
nodes I can DTMF 123 (not really this sequence), and it will link
myhubnode to some nodex and take it down if I send the complimentary
sequence. I can still do the *4myhubnode*3nodex# if I want, but,
having *123# to press correctly is a lot less liable to
fat-fingering or going into brain fade on the DTMF pad on the HT or
mobile than the extended sequence. <br>
<br>
Yeah, it means you have to figure out just what you want to do, but,
the ability to execute not only macros, but shell scripts from the
daemon is a powerful (and dangerous) thing. You can still do the
long sequence if you need something for ad-hoc, but for normal ops,
making up a script to do it for you is a time/stress/fatfinger
prevention/ease of ops technique. By the by, you can also execute
the shell script from the command line, too...;)<br>
<br>
Just my opinion, maybe this answers your question.<br>
<br>
However, if you're looking for automatic connect on
reboot/restart...look at the startup_marcro line in the rpt.conf for
the node.... <br>
<pre class="moz-signature" cols="72">--
Bryan
In this world, you must be oh so smart or oh so pleasant.
Well, for years I was smart. I recommend pleasant.
You may quote me. </pre>
</body>
</html>