<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div style="font-family:tahoma,sans-serif;font-size:small">Luc,</div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small"> I had to go ahead and complete the command. So here it is as an attached script. It will be in the next update but anyone that wants to try it out go ahead. Here is the syntax -</div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small"># Command Syntax<br><br># remote-command.sh <node> <command> [port]<br># Port defaults to 222<br><br># Command Examples<br># remote-command.sh 40000 *81 - Say time at node 40000<br># remote-command.sh 40000 *340001 - connect node 40000 to 40001<br># remote-command.sh 40000 *76 - disconnect all nodes at 40000<br># remote-command.sh 40000 *140001 223 - disconnect node 40001 from 40000 - use ssh port 223<br></div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small">The beauty of this command is that you do not need to be connected to any of these nodes BUT you do need to have SSH permission. So it would be nodes in your control.</div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small">The lookup searches both rpt_extnodes, dns-query (hamvoip) and local routes. So it would work for local routes as long as the node and IP address appeared in the [nodes] section of rpt.conf. In the future when we start DNS'ing private nodes that will not be necessary.</div><div style="font-family:tahoma,sans-serif;font-size:small"><br></div><div style="font-family:tahoma,sans-serif;font-size:small">Note you must create the password file and the passwords for all nodes you connect to must be the same. You could use public keys also but you would need to modify the ssh call.<br></div><div style="font-family:tahoma,sans-serif;font-size:small"><div dir="ltr"><div style="font-family:tahoma,sans-serif;font-size:small"><br clear="all"></div><div><div class="m_6984386477683223351m_-8215943971173556339gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><b><font size="4">73 Doug<br></font></b></div><b><font size="4">WA3DSP<br></font></b></div><b><font size="4"><a href="http://www.crompton.com/hamradio" target="_blank">http://www.crompton.com/hamradio</a><br></font></b></div></div></div>
</div>
</div><div style="font-family:tahoma,sans-serif;font-size:small"></div><div style="font-family:tahoma,sans-serif;font-size:small"></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 6, 2019 at 5:12 PM Luc Drolet VE2LUQ <<a href="mailto:ldrolet@cgocable.ca" target="_blank">ldrolet@cgocable.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Doug,<br>
<br>
WOW, Ok I understand your script<br>
I'm going to do tests at the end of the week and I cross well that it will work well<br>
<br>
Thank you for your explanations it's greatly appreciate<br>
<br>
73 's<br>
Luc<br>
<br>
<br>
<br>
> Le 6 févr. 2019 à 01:55, Doug Crompton via ARM-allstar <<a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a>> a écrit :<br>
> <br>
> Luc,<br>
> <br>
> The Asterisk remote command in hamvoip Allstar has been turned off by<br>
> default because of its inherent insecurity. While you could turn it back on<br>
> a better approach might be to use Supermon with remote management. If you<br>
> don't have a screen available such as in a mobile situation your could use<br>
> a script to send ssh commands to control the node in question. This script<br>
> could certainly be expanded on but gives you the idea. In order to use it<br>
> you need to know the IP address of the node you want to control. Again the<br>
> address could be automated since we know the address for public nodes. For<br>
> private nodes you would need to specify it. right now this script is hard<br>
> wired for control of one remote node l but again it could be made more<br>
> flexible with more parameters. This script would be called from DTMF<br>
> functions setup on the controlling server so DTMF could be used on the<br>
> controlling server. You could further expand this using the autopatch DTMF<br>
> parameter passing (howto at <a href="http://hamvoip.org" rel="noreferrer" target="_blank">hamvoip.org</a>) and pass the actual node number in<br>
> the DTMF sequence. For now though if you decide to try it go simple and<br>
> hardwire it and use a different script for each remote node you want to<br>
> control. The script could be named to indetify it by the remote node<br>
> number. Obviously you must have a valid login on the system you want to<br>
> control.<br>
> <br>
> Example function to connect the remote node to node 40000<br>
> D3=cmd,/root/remote-command.sh *340000<br>
> <br>
> Example function to disconnect all connected nodes from the remote node<br>
> D76=cmd,/root/remote-command.sh *76<br>
> <br>
> Example to play the time on the remote node<br>
> D81=cmd,/root/remote-command.sh *81<br>
> <br>
> and here is the remote-command.sh script -<br>
> <br>
> #!/bin/bash<br>
> # Doug, WA3DSP 2/2019<br>
> #<br>
> # This script logs into a remote system executes an Asterisk command and<br>
> logs out<br>
> #<br>
> # Command examples<br>
> # remote-command.sh <command><br>
> # remote-command.sh *81<br>
> # remote-command.sh *340000<br>
> # remote-command.sh *76<br>
> <br>
> # Send remote ssh command automatically<br>
> <br>
> if [ -z $1 ]<br>
> then<br>
> echo "No command given"<br>
> exit<br>
> else<br>
> command=$1<br>
> fi<br>
> <br>
> # This is the distant node you are remote controlling from<br>
> srcnode="1998"<br>
> <br>
> # This is the remote nodes IP address or domain name<br>
> # Can be a local (LAN) address or anywhere on the Internet<br>
> remote_address="127.0.0.1"<br>
> <br>
> #"This is the remote nodes ssh port<br>
> port="222"<br>
> <br>
> #"This is the command to be executed"<br>
> full_command="\"rpt fun $srcnode $command\""<br>
> <br>
> # The -f specifies where the password for this login is located<br>
> # This file must be protected or use keys instead.<br>
> <br>
> sshpass -f /root/pname ssh -o StrictHostKeyChecking=no root@$remote_address<br>
> -p $port "asterisk -rx $full_command"<br>
> <br>
> # END of script<br>
> <br>
> <br>
> *73 Doug*<br>
> <br>
> *WA3DSP*<br>
> <br>
> *<a href="http://www.crompton.com/hamradio" rel="noreferrer" target="_blank">http://www.crompton.com/hamradio</a> <<a href="http://www.crompton.com/hamradio" rel="noreferrer" target="_blank">http://www.crompton.com/hamradio</a>>*<br>
> <br>
> <br>
> On Tue, Feb 5, 2019 at 8:51 PM "Luc Drolet VE2LUQ via ARM-allstar" <<br>
> <a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a>> wrote:<br>
> <br>
>> Good night, Doug.<br>
>> <br>
>> OK, I'll make myself better understood with this file attached PDF<br>
>> <br>
>> My main Node is 1400 <a href="http://ve2luq.com" rel="noreferrer" target="_blank">ve2luq.com</a><br>
>> And I'm mobile on a 1410 NODE with my car<br>
>> And I want to connect a repeater to Richboro fires the NODE 1800 for<br>
>> example.<br>
>> Is there a method I can do my connection because I'm not on the main node<br>
>> so this node has the function in RPT. conf<br>
>> <br>
>> I can't do * 31800 because I'm not on the main node, I'm on a secondary<br>
>> node of my main node.<br>
>> <br>
>> Is there a connection method?<br>
>> <br>
>> Thank you for your help<br>
>> <br>
>> 73’s<br>
>> Luc<br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>>> Le 5 févr. 2019 à 02:51, Doug Crompton via ARM-allstar <<br>
>> <a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a>> a écrit :<br>
>>> <br>
>>> Luc,<br>
>>> <br>
>>> I am really not understanding your explanation. But I gather what you<br>
>> want<br>
>>> to be able to do is connect private nodes. Private nodes need to be<br>
>>> manually routed. Any node can connect to any other node if BOTH ends have<br>
>>> the proper port and IP address info for the other node. In your situation<br>
>>> using private nodes you must put the address information in manually in<br>
>> the<br>
>>> [nodes] stanza of rpt.conf. Every route to every other server needs to be<br>
>>> in that stanza if you want a connection between them. This includes the<br>
>>> port. There is a howto on this at hamvoip.<br>
>>> <br>
>>> <br>
>>> *73 Doug*<br>
>>> <br>
>>> *WA3DSP*<br>
>>> <br>
>>> *<a href="http://www.crompton.com/hamradio" rel="noreferrer" target="_blank">http://www.crompton.com/hamradio</a> <<a href="http://www.crompton.com/hamradio" rel="noreferrer" target="_blank">http://www.crompton.com/hamradio</a>>*<br>
>>> <br>
>>> <br>
>>> On Mon, Feb 4, 2019 at 8:16 PM "Luc Drolet VE2LUQ via ARM-allstar" <<br>
>>> <a href="mailto:arm-allstar@hamvoip.org" target="_blank">arm-allstar@hamvoip.org</a>> wrote:<br>
>>> <br>
>>>> Hello to you,<br>
>>>> <br>
>>>> Is it possible to make remote NODE, I explain<br>
>>>> <br>
>>>> I have my main node 1400 that it all the info from the external<br>
>> repeaters<br>
>>>> are in its RPT. conf of node 1400<br>
>>>> <br>
>>>> So if I'm on one of its nodes is it possible to make a connection to<br>
>> other<br>
>>>> repeaters, for example connection to node 1800 and that the info of node<br>
>>>> 1800 is only in the RPT. conf of 1400 and I am on a node that is<br>
>> already in<br>
>>>> connection with the node 1400 by Example NODE 1410 and I want to connect<br>
>>>> 1800<br>
>>>> <br>
>>>> If I would be on the node 1400 I would * 31800 but because I am on node<br>
>>>> 1410 I can not do this with my microphone in DTMF<br>
>>>> <br>
>>>> Is there a solution?<br>
>>>> <br>
>>>> Thank you and good evening<br>
>>>> <br>
>>>> 73’s<br>
>>>> Luc<br>
>>>> VE2LUQ<br>
>>>> <br>
>>>> <br>
>>>> _______________________________________________<br>
>>>> <br>
>>>> ARM-allstar mailing list<br>
>>>> <a href="mailto:ARM-allstar@hamvoip.org" target="_blank">ARM-allstar@hamvoip.org</a><br>
>>>> <a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" rel="noreferrer" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a><br>
>>>> <br>
>>>> Visit the BBB and RPi2/3 web page - <a href="http://hamvoip.org" rel="noreferrer" target="_blank">http://hamvoip.org</a><br>
>>> _______________________________________________<br>
>>> <br>
>>> ARM-allstar mailing list<br>
>>> <a href="mailto:ARM-allstar@hamvoip.org" target="_blank">ARM-allstar@hamvoip.org</a><br>
>>> <a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" rel="noreferrer" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a><br>
>>> <br>
>>> Visit the BBB and RPi2/3 web page - <a href="http://hamvoip.org" rel="noreferrer" target="_blank">http://hamvoip.org</a><br>
>> <br>
>> _______________________________________________<br>
>> <br>
>> ARM-allstar mailing list<br>
>> <a href="mailto:ARM-allstar@hamvoip.org" target="_blank">ARM-allstar@hamvoip.org</a><br>
>> <a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" rel="noreferrer" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a><br>
>> <br>
>> Visit the BBB and RPi2/3 web page - <a href="http://hamvoip.org" rel="noreferrer" target="_blank">http://hamvoip.org</a><br>
> _______________________________________________<br>
> <br>
> ARM-allstar mailing list<br>
> <a href="mailto:ARM-allstar@hamvoip.org" target="_blank">ARM-allstar@hamvoip.org</a><br>
> <a href="http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar" rel="noreferrer" target="_blank">http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar</a><br>
> <br>
> Visit the BBB and RPi2/3 web page - <a href="http://hamvoip.org" rel="noreferrer" target="_blank">http://hamvoip.org</a><br>
<br>
</blockquote></div>
</div></div>