Hi, I want to call an extension like 88888 and invoke an external C program upon calling, pass an constant integer like 1 to the C program.
What I have done is: /etc/extensions.conf: exten => 88888,1,system(/usr/local/src/parallel/fire 1) exten => 88888,n, Dial(SIP/88888) exten => 88888,n,Hangup the C program under /usr/local/src/parallel/fire will wait for the input, if it's 1 external LED light will be on, if it's 0 LED light will be off. I have changed the file ownership and group since my asterisk user is asterisk (with freepbx): [EMAIL PROTECTED] parallel]# ls -l fire* -rwxrwxrwx 1 asterisk asterisk 5882 Oct 16 09:18 fire -rw-rw-rw- 1 asterisk asterisk 2793 Oct 15 22:25 fire.c If I run the program separately everything is fine: [EMAIL PROTECTED] parallel]# /usr/local/src/parallel/fire 1 buffer is 1 input1 value is 1 open port successfully Input1 is high, Pin 17 set to high Input1 is 1 [EMAIL PROTECTED] parallel]# /usr/local/src/parallel/fire 0 buffer is 0 input1 value is 0 open port successfully Input1 is low, Pin 17 set to low Input1 is 0 [EMAIL PROTECTED] parallel]# However if I call to 88888 I can see it execute the system command but it doesn't output an integer 1 to my 'fire' program. CLI: -- Executing System("SIP/10-09a63138", "/usr/local/src/parallel/fire 1") in new stack Any ideas on this or I shouldn't use System() at all? Thanks & Best Regards, Johnny Xing
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users