[asterisk-users] [PHP-AGI] Problem executing script

2007-08-23 Thread Karim H
Hello,I have succeded in compiling and configuring My TDM Card and asterisk, all works fine. But I have a problem using the PHP Agi.The CLI tells me that when I call my number :-- Starting simple switch on 'Zap/4-1'-- Executing [EMAIL PROTECTED]:1] Answer(Zap/4-1, ) in new stack--

Re: [asterisk-users] [PHP-AGI] Problem executing script

2007-08-23 Thread Louis-Eric
Hey there, The file must be accessible by the process calling upon it. Try a chown using the Asterisk process user name. Cheers, Louis-Eric At 09:51 AM 8/23/2007, Karim H wrote: Hello, I have succeded in compiling and configuring My TDM Card and asterisk, all works fine. But I have a

Re: [asterisk-users] [PHP-AGI] Problem executing script

2007-08-23 Thread Mik Cheez
Did you confirm that the file exists? /var/lib/asterisk/agi-bin/rabot.agi Also, in your script (wherever it actually is), put a space between php and -q #!/usr/bin/php -q Karim H wrote: Hello, I have succeded in compiling and configuring My TDM Card and asterisk, all works fine. But I

Re: [asterisk-users] [PHP-AGI] Problem executing script

2007-08-23 Thread Karim H
there is an error in the script itself asterisk give back : No such file or directory even if the error is just that ; is missing...Thanks for the helpFrom: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Thu, 23 Aug 2007 14:51:27 +Subject: [asterisk-users] [PHP-AGI] Problem executing script Hello,I have

Re: [Asterisk-Users] php agi problem (perhaps problem..)

2005-12-22 Thread asterisk
Thank you for your answer. I tried your suggestion, but probably in the wrong way, and I had no success. I tried: asteriskge03:/etc/asterisk # cat phpagi.conf debug=false [festival] text2wave=/usr/src/festival/bin/text2wave tempdir=/var/lib/asterisk/sounds/tmp/

[Asterisk-Users] php agi problem (perhaps problem..)

2005-12-21 Thread asterisk
My /var/log/messages log is very full of a lot of line regarding php agi scripts, i.e Dec 21 10:36:00 asteriskge03 php: agi Object Dec 21 10:36:00 asteriskge03 php: ( Dec 21 10:36:00 asteriskge03 php: [request] = Array Dec 21 10:36:00 asteriskge03 php: ( Dec 21 10:36:00 asteriskge03

Re: [Asterisk-Users] php agi problem (perhaps problem..)

2005-12-21 Thread trixter aka Bret McDanel
On Wed, 2005-12-21 at 14:15 +0100, [EMAIL PROTECTED] wrote: My /var/log/messages log is very full of a lot of line regarding php agi scripts, i.e Dec 21 10:36:00 asteriskge03 php: agi Object Dec 21 10:36:00 asteriskge03 php: ( Dec 21 10:36:00 asteriskge03 php: [request] = Array Dec 21

[Asterisk-Users] PHP/AGI Problem

2005-06-06 Thread asterisklists
Hi folks, I thought I should jump in here. There appear to be a lot of PHPAGI gurus in this thread. I am running a prepaid application with Asterisk. When authentication has to be done by DTMF everything works fine. However when the user is authenticated directly from the sip phone, the channel

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-27 Thread Jon Farmer
Michael Stearne wrote: Jon, What version of PHPAGI are you using? I am starting a PHPAGI app and want to know whether to use 1.12 or 2.0CVS. I am using 1.12 Regards Jon ___ How much free photo storage do you

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-27 Thread Jon Farmer
Benjamin West wrote: Michael, The version, in the context of Jon's problem, was irrelevant. Jon's problem was due to a small bug in his code, and not related to PHPAGI. Hi Benjamin, Actually I would say it was more to do with my lack of understanding with how Asterisk AGI worked and my

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Jon Farmer
Moises Silva wrote: what version of asterisk you are using? i had some problems with agi until i upgrade to asterisk 1.0.7 I am also using version 1.0.7. I installed it from the Xorcom CD ISO if you run simple agi scripts works? try using this 2, one is php, the other one is C, that

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Jon Farmer
Matthew Boehm wrote: You using phpagi v2? Some of your functions are built in I believe. No, I am not using phpagi v2, I will take a look, None of my AGI's loop but if someone hangs up in the middle of script execution the script dies. I'm almost 99% sure of that. All of my

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Jon Farmer
Benjamin West wrote: So if the user stays on the line, the php script never blocks or hangs, and the phone call terminates correctly, including the php script. However, if the user hangs up the phone, your php script never times out because it gets stuck in a state that doesn't count towards

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Alex Barnes
-Original Message- From: Jon Farmer [mailto:[EMAIL PROTECTED] Sent: 26 May 2005 08:47 To: Moises Silva; Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] PHP/AGI Problem The numbers are read out continuously as expected but If the caller

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Jon Farmer
Alex Barnes wrote: Currently after: $res = $agi-agi_getdtmf(1,1,$term,$prompt=FALSE); You test for no DTMF and then simply return null. Instead you could call the other piece of code you have: $status = $agi-agi_channel_status($agi-request[agi_channel]); $agi-conlog(Status code: .

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Michael Stearne
On 5/26/05, Jon Farmer [EMAIL PROTECTED] wrote: Now the script loops forever while the user is connected and exits if the user hangs up. Thanks to everyone who helped me out, much appreciated. Jon, What version of PHPAGI are you using? I am starting a PHPAGI app and want to know

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Benjamin West
Michael, The version, in the context of Jon's problem, was irrelevant. Jon's problem was due to a small bug in his code, and not related to PHPAGI. Ben On 5/26/05, Michael Stearne [EMAIL PROTECTED] wrote: On 5/26/05, Jon Farmer [EMAIL PROTECTED] wrote: Now the script loops forever while

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Michael Stearne
On 5/26/05, Benjamin West [EMAIL PROTECTED] wrote: Michael, The version, in the context of Jon's problem, was irrelevant. Jon's problem was due to a small bug in his code, and not related to PHPAGI. Yeah. I was just wondering what version people were using since 2.0 hasn't been formally

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Matthew Asham
On Thu, 2005-26-05 at 17:59 -0400, Michael Stearne wrote: On 5/26/05, Benjamin West [EMAIL PROTECTED] wrote: Michael, The version, in the context of Jon's problem, was irrelevant. Jon's problem was due to a small bug in his code, and not related to PHPAGI. Yeah. I was just wondering

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Michael Stearne
On 5/26/05, Matthew Asham [EMAIL PROTECTED] wrote: On Thu, 2005-26-05 at 17:59 -0400, Michael Stearne wrote: On 5/26/05, Benjamin West [EMAIL PROTECTED] wrote: Michael, The version, in the context of Jon's problem, was irrelevant. Jon's problem was due to a small bug in his code, and

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-26 Thread Matthew Asham
On Thu, 2005-26-05 at 21:23 -0400, Michael Stearne wrote: Thanks for the efforts Matt. David Eder is the one who deserves the praise, he's done wonderful work on version 2. Matthew ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com

[Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
Hi I am currently developing a IVR application using PHP/AGI. I am using the PHPAGI class at http://phpagi.sourceforge.net/ to handle the commuication with my *. The application basically asks a caller to enter in some information which is then processed and a answer is read back out to them. I

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Thierry Wehr
Hello Did you tried a deadagi in place of agi A++ -Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Jon Farmer Envoyé : mercredi 25 mai 2005 11:40 À : asterisk-users@lists.digium.com Objet : [Asterisk-Users] PHP/AGI Problem The problem

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
--- Thierry Wehr [EMAIL PROTECTED] wrote: Hello Did you tried a deadagi in place of agi A++ I am calling the PHP app via deadagi. I believe what might be happening is that the application is going into a internal loop waiting for DTMF to know what to do next. I am going to investigate

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Alex Barnes
-Original Message- From: Jon Farmer [mailto:[EMAIL PROTECTED] Sent: 25 May 2005 11:14 To: [EMAIL PROTECTED]; Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] PHP/AGI Problem --- Thierry Wehr [EMAIL PROTECTED] wrote: Hello Did you

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Benjamin West
A quick hack would be to do something like exten = h, 1, system(kill the php) of course this would knock out all the calls in progress using php. Perhaps in the hangup extension you could send a message to your php script that would end it's blocking. I don't suppose SendDTMF would send to the

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
--- Alex Barnes [EMAIL PROTECTED] wrote: Although this isnt a substitute for a correctly terminating script, I would have thought that the PHP 'maximum script execution time' variable would kick-in and kill the script eventually. Well I have already tried that I have the first line of

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Matthew Boehm
I am calling the PHP app via deadagi. I believe what Well, that is your problem. Don't use deadagi. DeadAGI is for use if you want to continue processing after the call hangs up. That is why your scripts are continuing to run. Use regular AGI. -Matthew

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Alex Barnes
-Original Message- From: Jon Farmer [mailto:[EMAIL PROTECTED] Sent: 25 May 2005 14:09 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] PHP/AGI Problem I have also tested detecting the channel_status and that doesn't seem to work either

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
Well, that is your problem. Don't use deadagi. DeadAGI is for use if you want to continue processing after the call hangs up. That is why your scripts are continuing to run. Use regular AGI. I get the same behaviour if I use deadagi or just agi Regards Jon

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jay Milk
: [Asterisk-Users] PHP/AGI Problem --- Alex Barnes [EMAIL PROTECTED] wrote: Although this isnt a substitute for a correctly terminating script, I would have thought that the PHP 'maximum script execution time' variable would kick-in and kill the script eventually. Well I have already

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Matthew Boehm
Jon Farmer wrote: Well, that is your problem. Don't use deadagi. DeadAGI is for use if you want to continue processing after the call hangs up. That is why your scripts are continuing to run. Use regular AGI. I get the same behaviour if I use deadagi or just agi Regards Well then you

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Moises Silva
could you post the script, the output of the script in the asterisk console and which asterisk version are you working with? On 5/25/05, Jon Farmer [EMAIL PROTECTED] wrote: --- Alex Barnes [EMAIL PROTECTED] wrote: Although this isnt a substitute for a correctly terminating script, I

RE: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
--- Jay Milk [EMAIL PROTECTED] wrote: Why are you using DeadAGI? Use AGI or EAGI instead, unless you actually want to run on a dead-channel. I used DeadAGI just to see if it had any different behaviour in relation to my proplem. I get the same results with DeadAGI EAGI and AGI. Regards

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
Matthew Boehm wrote: Well then you got something screwed up somewhere. I've got many PHP AGI's and as soon as the caller hangs up the script terminates. This is what I use: exten = _80059974XX,1,AGI(line_counter.php) Works like a champ. And yes, I'm using phpagi.php as well. Matthew,

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Jon Farmer
Moises Silva wrote: could you post the script, the output of the script in the asterisk console and which asterisk version are you working with? See below This is just a proof of concept script so its a bit basic... #!/usr/bin/php -q ?php set_time_limit(30); require phpagi.php;

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Benjamin West
So if the user stays on the line, the php script never blocks or hangs, and the phone call terminates correctly, including the php script. However, if the user hangs up the phone, your php script never times out because it gets stuck in a state that doesn't count towards time out? That doesn't

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Hariharan Gopalan
I am having the same problem even with the example script with the phpagi version 2. When I use the dtmf.php, the script keeps running if the user hangs up in the middle. Hari On 5/25/05, Jon Farmer [EMAIL PROTECTED] wrote: --- Jay Milk [EMAIL PROTECTED] wrote: Why are you using DeadAGI?

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Matthew Boehm
You using phpagi v2? Some of your functions are built in I believe. None of my AGI's loop but if someone hangs up in the middle of script execution the script dies. I'm almost 99% sure of that. -Matthew Jon Farmer wrote: Moises Silva wrote: could you post the script, the output of the script

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Moises Silva
what version of asterisk you are using? i had some problems with agi until i upgrade to asterisk 1.0.7 if you run simple agi scripts works? try using this 2, one is php, the other one is C, that will tell us if the problem is the script you are using, php, or AGI itself... #!/usr/bin/php -q

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Benjamin West
First of all, I don't see where $y is initialised or used except in the test condition of the while loop. That's probably your problem. Why not move the logic of the top loop into the dialplan? exten = s, 1, Answer exten = s, 2, AGI(script) exten = s, 3, Hangup() exten = h, 4, DeadAGI(cleanup)

Re: [Asterisk-Users] PHP/AGI Problem

2005-05-25 Thread Benjamin West
I should have mentioned in my example, it will still loop forever. You'll have to insert a step before priority 2 (or in the script) that tests if the line is still up If it is, you skip over the agi call and proceed to hangup. On 5/25/05, Benjamin West [EMAIL PROTECTED] wrote: First of all, I