Kaleb L. Kunzler
2006-Jan-12 11:43 UTC
[Asterisk-Users] Using an extension to send a linux command
I am a newbie to asterisk and am trying to send a linux command using extensions in asterisk, for example when I dial 1111 I want to run the linux command "/usr/local/bin/br -c -n 1" (obviously without the quotes). If I SSH into my asterisk box and enter that command, it works, however I can't seem to get it to work from asterisk. I am running Asterisk@home2.2 (I know, I am a sucker for a GUI). Below is what I have in my dialplan. Watching the CLI output it seems to be running the priorities correctly, and even "assumedly" sending the command, however the script (br) never is actually executed. Any ideas? (no I don't want to convert the script into an agi or php yet, I like it as it is) exten => 1111,1,Goto(custom-command,s,1) [custom-command] exten => s,1,System(/usr/local/bin/br -c C -n 1) exten => s,n,Hangup() Kaleb L. Kunzler
Alexander Lopez
2006-Jan-12 11:58 UTC
[Asterisk-Users] Using an extension to send a linux command
What user is yoru asterisk service running as? It is probably a permissions or path issue.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Kaleb L. Kunzler > Sent: Thursday, January 12, 2006 1:43 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Using an extension to send a linux command > > I am a newbie to asterisk and am trying to send a linux > command using extensions in asterisk, for example when I dial > 1111 I want to run the linux > command "/usr/local/bin/br -c -n 1" (obviously without the > quotes). If I > SSH into my asterisk box and enter that command, it works, > however I can't seem to get it to work from asterisk. I am > running Asterisk@home2.2 (I know, I am a sucker for a GUI). > Below is what I have in my dialplan. > Watching the CLI output it seems to be running the priorities > correctly, and even "assumedly" sending the command, however > the script (br) never is actually executed. Any ideas? (no I > don't want to convert the script into an agi or php yet, I > like it as it is) > > exten => 1111,1,Goto(custom-command,s,1) > > [custom-command] > exten => s,1,System(/usr/local/bin/br -c C -n 1) exten => s,n,Hangup() > > > Kaleb L. Kunzler > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Kaleb L. Kunzler
2006-Jan-12 12:11 UTC
[Asterisk-Users] Using an extension to send a linux command
It is running as asterisk (Asterisk@home default). I have tried 'chown asterisk:asterisk br' as well as 'chmod 775 br' but nothing seems to help. Kaleb -----Original Message----- From: Alexander Lopez Sent: Thursday, January 12, 2006 11:59 AM Subject: RE: [Asterisk-Users] Using an extension to send a linux command What user is yoru asterisk service running as? It is probably a permissions or path issue.
Alexander Lopez
2006-Jan-12 12:25 UTC
[Asterisk-Users] Using an extension to send a linux command
You may be having an issue with the arguments. Try 'wraping the script within another (ie runbr) Also login as asterisk user, you may need to change /etc/passwd to give asterisk a shell, I am not sure as I don't do @ Home.> -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Kaleb L. Kunzler > Sent: Thursday, January 12, 2006 2:12 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Using an extension to send a linux command > > > It is running as asterisk (Asterisk@home default). I have > tried 'chown asterisk:asterisk br' as well as 'chmod 775 br' > but nothing seems to help. > > Kaleb > > > -----Original Message----- > From: Alexander Lopez > Sent: Thursday, January 12, 2006 11:59 AM > Subject: RE: [Asterisk-Users] Using an extension to send a > linux command > > What user is yoru asterisk service running as? > > It is probably a permissions or path issue. > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >