Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

Does - ‘/etc/asterisk/scripts/disconnect’ script have ownership rights ?

…mike/kb8jnm

···

-------- Original Message --------

Subject: [App_rpt-users] Unable to connect to remote asterisk (does

/var/run/asterisk.ctl exist?)

From: Skyler Fennell electricity440@gmail.com

Date: Thu, December 04, 2014 12:05 pm

To: “app_rpt-users@ohnosec.orgapp_rpt-users@ohnosec.org

I created a simple php file where anyone with the link can disconnect my nose from all links if something wrong is going on (due to the fact my node is same channel, half duplex linked, and if it was stuck on transmit, local transmissions would double with the node)

<?php echo "All links sucessfully disconnected from 40764, KDØWHB test1"; echo '>
';



// Outputs all the result of shellcommand "", and returns

// the last output line into $last_line. Stores the return value

// of the shell command in $retval.

$last_line = system('/etc/asterisk/scripts/disconnect', $retval);



// Printing additional info

echo '


Last line of the output: ' . $last_line . '
Return value: ' . $retval; ?>

The code was found on the php website as a sample and I just changed ls to my script that works when ran from a normal shell.

Visiting kd0whb.duckdns.org/disconnect.php shows the output of “unable to connect to remote”

Any suggestions?

Thanks,

Skyler, KDØWHB


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

The script works fine when I run it normally. I also tried to enter the specific command on the web page.

···

On Thu, Dec 4, 2014 at 11:25 AM, mike@midnighteng.com wrote:

Does - ‘/etc/asterisk/scripts/disconnect’ script have ownership rights ?

…mike/kb8jnm

-------- Original Message --------

Subject: [App_rpt-users] Unable to connect to remote asterisk (does

/var/run/asterisk.ctl exist?)

From: Skyler Fennell electricity440@gmail.com

Date: Thu, December 04, 2014 12:05 pm

To: “app_rpt-users@ohnosec.orgapp_rpt-users@ohnosec.org

I created a simple php file where anyone with the link can disconnect my nose from all links if something wrong is going on (due to the fact my node is same channel, half duplex linked, and if it was stuck on transmit, local transmissions would double with the node)

<?php echo "All links sucessfully disconnected from 40764, KDØWHB test1"; echo '>
';



// Outputs all the result of shellcommand "", and returns

// the last output line into $last_line. Stores the return value

// of the shell command in $retval.

$last_line = system('/etc/asterisk/scripts/disconnect', $retval);



// Printing additional info

echo '


Last line of the output: ' . $last_line . '
Return value: ' . $retval; ?>

The code was found on the php website as a sample and I just changed ls to my script that works when ran from a normal shell.

Visiting kd0whb.duckdns.org/disconnect.php shows the output of “unable to connect to remote”

Any suggestions?

Thanks,

Skyler, KDØWHB


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

Does the script itself have the absolute command in it? In other words /use/sbin/asterisk instead of just asterisk? That is just an example. I find scripts normally do t work because you don’t have the path and just the command. What will run logged in locally won’t in cron or Apache if you don’t use the directory/command

···

On Thu, Dec 4, 2014 at 11:25 AM, mike@midnighteng.com wrote:

Does - ‘/etc/asterisk/scripts/disconnect’ script have ownership rights ?

…mike/kb8jnm

-------- Original Message --------

Subject: [App_rpt-users] Unable to connect to remote asterisk (does

/var/run/asterisk.ctl exist?)

From: Skyler Fennell electricity440@gmail.com

Date: Thu, December 04, 2014 12:05 pm

To: “app_rpt-users@ohnosec.orgapp_rpt-users@ohnosec.org

I created a simple php file where anyone with the link can disconnect my nose from all links if something wrong is going on (due to the fact my node is same channel, half duplex linked, and if it was stuck on transmit, local transmissions would double with the node)

<?php echo "All links sucessfully disconnected from 40764, KDØWHB test1"; echo '>
';



// Outputs all the result of shellcommand "", and returns

// the last output line into $last_line. Stores the return value

// of the shell command in $retval.

$last_line = system('/etc/asterisk/scripts/disconnect', $retval);



// Printing additional info

echo '


Last line of the output: ' . $last_line . '
Return value: ' . $retval; ?>

The code was found on the php website as a sample and I just changed ls to my script that works when ran from a normal shell.

Visiting kd0whb.duckdns.org/disconnect.php shows the output of “unable to connect to remote”

Any suggestions?

Thanks,

Skyler, KDØWHB


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

nope, thats probably it, the script simply has:

asterisk -rx “rpt fun 40764 *71”

Should I add a /usr/sbin/asterisk -rx "rpt fun 40764 ?

···

On Thu, Dec 4, 2014 at 1:54 PM, Corey Dean n3fe@repeater.net wrote:

Does the script itself have the absolute command in it? In other words /use/sbin/asterisk instead of just asterisk? That is just an example. I find scripts normally do t work because you don’t have the path and just the command. What will run logged in locally won’t in cron or Apache if you don’t use the directory/command

Sent from my iPhone

On Dec 4, 2014, at 3:49 PM, Skyler F electricity440@gmail.com wrote:

The script works fine when I run it normally. I also tried to enter the specific command on the web page.


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

On Thu, Dec 4, 2014 at 11:25 AM, mike@midnighteng.com wrote:

Does - ‘/etc/asterisk/scripts/disconnect’ script have ownership rights ?

…mike/kb8jnm

-------- Original Message --------

Subject: [App_rpt-users] Unable to connect to remote asterisk (does

/var/run/asterisk.ctl exist?)

From: Skyler Fennell electricity440@gmail.com

Date: Thu, December 04, 2014 12:05 pm

To: “app_rpt-users@ohnosec.orgapp_rpt-users@ohnosec.org

I created a simple php file where anyone with the link can disconnect my nose from all links if something wrong is going on (due to the fact my node is same channel, half duplex linked, and if it was stuck on transmit, local transmissions would double with the node)

<?php echo "All links sucessfully disconnected from 40764, KDØWHB test1"; echo '>
';



// Outputs all the result of shellcommand "", and returns

// the last output line into $last_line. Stores the return value

// of the shell command in $retval.

$last_line = system('/etc/asterisk/scripts/disconnect', $retval);



// Printing additional info

echo '


Last line of the output: ' . $last_line . '
Return value: ' . $retval; ?>

The code was found on the php website as a sample and I just changed ls to my script that works when ran from a normal shell.

Visiting kd0whb.duckdns.org/disconnect.php shows the output of “unable to connect to remote”

Any suggestions?

Thanks,

Skyler, KDØWHB


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.


App_rpt-users mailing list

App_rpt-users@ohnosec.org

http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the “Unsubscribe or edit options button”

You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.


Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

Skyler Fennell
amsatnet.info

KDØWHB

electricity440@gmail.com

Yes.

I’m not sure where the script is being called from… But in running scripts via cron, I find that the path to asterisk needs to be used.

Maybe because $PATH isn’t set…

···

From: “Skyler F” electricity440@gmail.com
To: “Dean, Corey” n3fe@repeater.net, “rpt-users, app” app_rpt-users@ohnosec.org
Sent: Thursday, December 4, 2014 4:00:43 PM
Subject: Re: [App_rpt-users] Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)

nope, thats probably it, the script simply has:

asterisk -rx “rpt fun 40764 *71”

Should I add a /usr/sbin/asterisk -rx "rpt fun 40764 ?

I am still getting the unable to connect error after I modified script and tried directly from the php file:

$last_line = system(‘/usr/sbin/asterisk -rx “rpt fun 40764 *71”’, $retval);

( at Kd0whb.duckdns.org/disconnect.php)

···

On Dec 4, 2014, at 2:29 PM, Skyler Fennell electricity440@gmail.com wrote:

I am still getting the unable to connect error after I modified script and tried directly from the php file:

$last_line = system(‘/usr/sbin/asterisk -rx “rpt fun 40764 *71”’, $retval);

( at Kd0whb.duckdns.org/disconnect.php)