Also, I had to apply the following which did the final touch to get it fully working: chown -R asterisk.asterisk test chown -R asterisk.asterisk myscript -Bruce
---------------------------------------- > From: [email protected] > To: [email protected]; [email protected] > CC: [email protected] > Date: Thu, 26 Mar 2009 10:46:24 -0400 > Subject: RE: [on-asterisk] "Run After Record" tab in General Settings of > FreePBX > > > Hi Sachapan, > > Thanks for the input. > > I have previously tried /tmp/success and it didn't work but now that you > mentioned I added #!/bin/sh and it just did the charm. > > Amazing tip! > > -Bruce > > ---------------------------------------- >> To: [email protected]; [email protected] >> CC: [email protected] >> From: [email protected] >> Date: Thu, 26 Mar 2009 10:42:43 +0000 >> Subject: Re: [on-asterisk] "Run After Record" tab in General Settings of >> FreePBX >> >> Since your 'success' file has a relative path perhaps it is running just >> fine but not creating the output file in the directory you think it ought to. >> >> Maybe changing the script to something like: >> >> #!/bin/sh >> touch /tmp/success >> >> Will help with troubleshooting. >> >> >> >> >> Sent from my BlackBerry device on the Rogers Wireless Network >> >> -----Original Message----- >> From: Bruce N >> >> Date: Thu, 26 Mar 2009 00:35:37 >> To: >> Cc: asterisk Mailing >> Subject: RE: [on-asterisk] "Run After Record" tab in General Settings of >> FreePBX >> >> >> Yes, the following was done: >> >> chmod +x /var/lib/asterisk/myscript.sh >> >> I have run the script by ./myscript.sh and it works fine but it doesn't work >> when running from "Run After Record" field. >> >> Thanks for the input Llyod. >> >> -Bruce >> ________________________________ >>> Date: Thu, 26 Mar 2009 00:19:44 -0400 >>> Subject: Re: [on-asterisk] "Run After Record" tab in General Settings of >>> FreePBX >>> From: [email protected] >>> To: [email protected] >>> CC: [email protected] >>> >>> >>> Did you set the execute permission for the myscript.sh ? >>> >>> >>> >>> >>> On Thu, Mar 26, 2009 at 12:17 AM, Bruce N> wrote: >>> >>> >>> >>> Hello Everyone, >>> >>> >>> >>> Has anyone tried the field "Run After Record" which resides in General tab >>> of FreePBX 2.5? It supposed to allow to run a script after recording is >>> done. I have created a simple file and placed it in >>> /var/lib/asterisk/myscript.sh. The file contains the following: >>> >>> >>> >>> >>> touch success >>> >>> >>> >>> When a call comes in, recording is done just fine. When call hangs up, this >>> is what I get: >>> >>> >>> >>> -- SIP/600-0862bd20 is ringing >>> >>> -- SIP/600-0862bd20 answered SIP/602-0862ddc8 >>> >>> == Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/602-0862ddc8' >>> in macro 'dial' >>> >>> == Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/602-0862ddc8' >>> in macro 'exten-vm' >>> >>> == Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/602-0862ddc8' >>> >>> -- Executing [...@macro-dial:1] Macro("SIP/602-0862ddc8", "hangupcall") in >>> new stack >>> >>> -- Executing [...@macro-hangupcall:1] ResetCDR("SIP/602-0862ddc8", "vw") in >>> new stack >>> >>> -- Executing [...@macro-hangupcall:2] NoCDR("SIP/602-0862ddc8", "") in new >>> stack >>> >>> -- Executing [...@macro-hangupcall:3] GotoIf("SIP/602-0862ddc8", >>> "1?skiprg") in new stack >>> >>> -- Goto (macro-hangupcall,s,6) >>> >>> -- Executing [...@macro-hangupcall:6] GotoIf("SIP/602-0862ddc8", >>> "1?skipblkvm") in new stack >>> >>> -- Goto (macro-hangupcall,s,9) >>> >>> -- Executing [...@macro-hangupcall:9] GotoIf("SIP/602-0862ddc8", >>> "1?theend") in new stack >>> >>> -- Goto (macro-hangupcall,s,11) >>> >>> -- Executing [...@macro-hangupcall:11] Hangup("SIP/602-0862ddc8", "") in >>> new stack >>> >>> == Spawn extension (macro-hangupcall, s, 11) exited non-zero on >>> 'SIP/602-0862ddc8' in macro 'hangupcall' >>> >>> == Spawn extension (macro-hangupcall, s, 11) exited non-zero on >>> 'SIP/602-0862ddc8' >>> >>> == End MixMonitor Recording SIP/602-0862ddc8 >>> >>> == Executing [/var/lib/asterisk/myscript.sh] >>> >>> >>> >>> And that is it. This is stuck at the last line and the script is not run as >>> I do not see a "success" file. Am I doing something wrong or is the FreePBX >>> that is messed up? >>> >>> >>> >>> Thanks, >>> >>> Bruce >>> >>> >>> >>> >>> >>>_________________________________________________________________ >>> >>> Reunite with the people closest to you, chat face to face with Messenger. >>> >>> http://go.microsoft.com/?linkid=9650736 >>> >>> --------------------------------------------------------------------- >>> >>> To unsubscribe, e-mail: [email protected] >>> >>> For additional commands, e-mail: [email protected] >>> >>> >>> >>> >> _________________________________________________________________ >> Reinvent how you stay in touch with the new Windows Live Messenger. >> http://go.microsoft.com/?linkid=9650731 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > _________________________________________________________________ > Share photos with friends on Windows Live Messenger > http://go.microsoft.com/?linkid=9650734 > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > _________________________________________________________________ Experience all of the new features, and Reconnect with your life. http://go.microsoft.com/?linkid=9650730 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
