[App_rpt-users] Executing a script - does not work

Steve Zingman szingman at msgstor.com
Sat Jan 23 01:10:10 UTC 2016


Out of habit I like to have spaces for readability. When I ran the test 
I ran asterisk from the root prompt as asterisk -vcd. Did you get any 
output from asterisk?
*CLI> [Jan 22 19:29:53] NOTICE[3303]: app_rpt.c:4008 function_cmd: cmd 
param = /tmp/ssz.sh, digitbuf =

On 01/22/2016 08:06 PM, Stephen - K1LNX wrote:
> Thanks Steve, followed your example and looks like I needed a space 
> between the DTMF definition, the = sign and the command itself to work 
> properly, and it ran, but I still can't get my script to run in the 
> /root/scripts directory. My scripts don't have to live there, but I 
> was setting it there temporarily for testing.
>
> I'm not sure why this isn't working.
>
> On Fri, Jan 22, 2016 at 7:34 PM, Steve Zingman <szingman at msgstor.com 
> <mailto:szingman at msgstor.com>> wrote:
>
>     Stephen,
>     Here is what I have:
>
>     In rpt.conf:
>     966 = cmd,/tmp/ssz.sh
>
>     in /tmp/ssz.sh:
>     #! /bin/bash
>     echo "Hello World" >/tmp/ssz.txt
>
>     from the asterisk cli:
>     *CLI> rpt debug level 0
>     app_rpt Debugging disabled
>     *CLI> rpt fun 2152 *966
>     *CLI> [Jan 22 19:29:53] NOTICE[3303]: app_rpt.c:4008 function_cmd:
>     cmd param = /tmp/ssz.sh, digitbuf =
>
>     script ran
>
>
>     Steve
>
>
>
>
>
>     On 01/22/2016 06:22 PM, Stephen - K1LNX wrote:
>>     I am trying to get a script to execute based on a DTMF sequence
>>     and it's not working for whatever reason.
>>
>>     I put the following in rpt.conf under the functions stanza:
>>
>>     [functions2376]
>>
>>     (default functions removed for readability)
>>
>>     ; testing script functions
>>
>>     123=cmd,/root/scripts/test.sh
>>
>>     The script is nothing more than a simple shell script for testing
>>     right now, I validated it worked:
>>
>>     #!/bin/bash
>>
>>     echo test1234 > test.out
>>
>>     Permissions are set 777 on it to ensure it's able to be executed
>>     by anything, but when I go to the Asterisk console and execute:
>>
>>     rpt fun 2376 *123
>>
>>     The script does not execute. What is it I could be missing here
>>     if anything?
>>
>>     tnx
>>
>>     Stephen
>>
>>     K1LNX
>>
>>
>>
>>     _______________________________________________
>>     App_rpt-users mailing list
>>     App_rpt-users at ohnosec.org <mailto:App_rpt-users at ohnosec.org>
>>     http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users
>>
>>     To unsubscribe from this list please visithttp://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.
>
>     -- 
>     "Anything is possible if you don't know what you are talking about."
>     1st Law of Logic
>
>

-- 
"Anything is possible if you don't know what you are talking about."
1st Law of Logic

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.keekles.org/pipermail/app_rpt-users/attachments/20160122/f6a05504/attachment.html>


More information about the App_rpt-users mailing list