Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread Steve Edwards
> [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of mickael > ropars > > you seems to have a lot experience on asterisk ... On Fri, 20 Nov 2009, Danny Nicholas wrote: > Steve is quite the Guru. I'll second his advice about writing things in > C. I actually do Perl, but that's just

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread Danny Nicholas
.digium.com] On Behalf Of mickael ropars Sent: Friday, November 20, 2009 3:18 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] PHP AGI : handle Event /AGI session thanks a lot for your advice. In my side, I am using a PHP agi library you seem

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread mickael ropars
thanks a lot for your advice. In my side, I am using a PHP agi library you seems to have a lot experience on asterisk ... Regards Mickael 2009/11/20 Steve Edwards > >> On Fri, 20 Nov 2009, mickael ropars wrote: > >> > >>> someone send a URL to call someone a PHP script (script 1) is launch >

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread Steve Edwards
>> On Fri, 20 Nov 2009, mickael ropars wrote: >> >>> someone send a URL to call someone a PHP script (script 1) is launch >>> and in its I configure Astmanager in order to make an originating call >>> then my script stop running and Asterisk continue processing the call >>> in an extension when

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread mickael ropars
oupps sorry steve. thanks Mickael 2009/11/20 Steve Edwards > Un-top-posting... > > >> On Fri, 20 Nov 2009, mickael ropars wrote: > >> > >>> someone send a URL to call someone a PHP script (script 1) is launch > >>> and in its I configure Astmanager in order to make an originating call > >>> th

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread Steve Edwards
Un-top-posting... >> On Fri, 20 Nov 2009, mickael ropars wrote: >> >>> someone send a URL to call someone a PHP script (script 1) is launch >>> and in its I configure Astmanager in order to make an originating call >>> then my script stop running and Asterisk continue processing the call >>> in

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread mickael ropars
thanks a lot steve for your answer the script is launch by a web page so it's a AGI executable if it was your case which implementation will you choose ? regards Mickael 2009/11/20 Steve Edwards > On Fri, 20 Nov 2009, mickael ropars wrote: > > > someone send a URL to call someone a PHP scr

Re: [asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread Steve Edwards
On Fri, 20 Nov 2009, mickael ropars wrote: > someone send a URL to call someone a PHP script (script 1) is launch and > in its I configure Astmanager in order to make an originating call then > my script stop running and Asterisk continue processing the call in an > extension when hangup occurs

[asterisk-users] PHP AGI : handle Event /AGI session

2009-11-20 Thread mickael ropars
Hi all, I need some advice to know how to handle event in a PHP agi. do you have an exemple of how to it ? more over I need some advices. currently I have the following SW architecture someone send a URL to call someone a PHP script (script 1) is launch and in its I configure Astmanager in order

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-26 Thread Philipp Kempgen
Leah Newmark schrieb: > I'm running asterisk 1.4.22 on a debian server. > I have php5 installed and it works correctly command line. > When trying to run a php script via AGI, I get messages such as: > GI Tx >> I> > AGI Rx << #!/usr/bin/php5 -q > AGI Tx >> 510 Invalid or unknown command > > The sc

[asterisk-users] PHP, AGI, shebang, ? (was: Re: asterisk-users Digest, Vol 59, Issue 62)

2009-06-26 Thread Philipp Kempgen
Norm Heinen schrieb: > On Thu, Jun 25, 2009 at 11:08 AM, Leah Newmark wrote: >> Take a look at this: >> /var/lib/asterisk/agi-bin/olehphone# head incoming.php displays: >> #!/usr/bin/php >> > >> Running it shows this: >> /var/lib/asterisk/agi-bin/olehphone# ./incoming.php >> #!/usr/bin/php5 -q Tha

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-25 Thread David Quinton
>planning.customer.c...@west-lindsey.co.ukon Thu, 25 Jun 2009 15:11:04 +0800, >Andrew Furey wrote: >On 25/06/2009, David Quinton wrote: >> May be a total red herring (I'm using an old version of Trixbox) >> but if I edit my PHPs on a Windows machine and upload using FTP, they >> will only ru

[asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-25 Thread Leah Newmark
I think I found the part of my AGI the script is stuck at. The #!/usr/bin/php command was fine. What the agi debug I believe is displaying is the output of this: $in = fopen("php://stdin","r"); Which explains what I thought was "cached" -- the same #!/usr/bin/php5 -q command repeatedly failing

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-25 Thread Leah Newmark
Thanks for the suggestion, but I'm editing directly on the server I've been doing AGIs for, what, 4 years now? I have never been *this* stumped! __ On Wed, 24 Jun 2009 15:43:14 -0400, Leah Newmark http://lists.digium.com/mailman/listinfo/asteris

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-25 Thread Andrew Furey
On 25/06/2009, David Quinton wrote: > May be a total red herring (I'm using an old version of Trixbox) > but if I edit my PHPs on a Windows machine and upload using FTP, they > will only run if I fire up Nano and save the file on the Asterisk box. I haven't used TrixBox, but that sounds a lot

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-25 Thread David Quinton
On Wed, 24 Jun 2009 15:43:14 -0400, Leah Newmark wrote: >I also have noticed odd behavior. When I edit an AGI, the changes aren't >always showing up in the running of the script via asterisk. May be a total red herring (I'm using an old version of Trixbox) but if I edit my PHPs on a Windows ma

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-24 Thread Danny Nicholas
List - Non-Commercial Discussion Subject: Re: [asterisk-users] PHP AGI Not Working and Odd Behavior Try running your script with /usr/bin/php5 script.php to test it Or changing #!/usr/bin/php5 -q to #!/usr/bin/php -q Leah Newmark wrote: Thanks. I didn't change anything in my dialplan

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-24 Thread Juan E. Rodríguez
Try running your script with /usr/bin/php5 script.php to test it Or changing #!/usr/bin/php5 -q to #!/usr/bin/php -q Leah Newmark wrote: Thanks. I didn't change anything in my dialplan. I am aware of reloading configuration :) My AGIs are copied from a working asterisk install -- the sheba

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-24 Thread Leah Newmark
Thanks. I didn't change anything in my dialplan. I am aware of reloading configuration :) My AGIs are copied from a working asterisk install -- the shebang argument is how I've always done it. Either way, I have tried it without the -q as well, and that also didn't succeed. I just tried your t

Re: [asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-24 Thread David Backeberg
On Wed, Jun 24, 2009 at 3:43 PM, Leah Newmark wrote: > Hi, > > I'm running asterisk 1.4.22 on a debian server. > I have php5 installed and it works correctly command line. > When trying to run a php script via AGI, I get messages such as: > GI Tx >> I> > AGI Rx << #!/usr/bin/php5 -q > AGI Tx >> 510

[asterisk-users] PHP AGI Not Working and Odd Behavior

2009-06-24 Thread Leah Newmark
Hi, I'm running asterisk 1.4.22 on a debian server. I have php5 installed and it works correctly command line. When trying to run a php script via AGI, I get messages such as: GI Tx >> I> AGI Rx << #!/usr/bin/php5 -q AGI Tx >> 510 Invalid or unknown command The scripts are completely executable a

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-06 Thread Philipp Kempgen
Steve Edwards schrieb: > If I follow the protocol: > > printf("STREAM FILE \"hit\" \"\"\n"); > fflush(stdout); > fgets(response, sizeof(response), stdin); > > printf("STREAM FILE \"hit\" \"\"\n"); > fflush(stdout); > fgets(response, sizeof(re

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread David Backeberg
On Fri, Jun 5, 2009 at 3:13 PM, Steve Edwards wrote: > All the "steps" are stored in the database. > > When a call comes in, an AGI looks up the steps for the DNIS and loads all > the variables of the form: > >        STEP-01-DATA -- name of variable, branch targets, etc >        STEP-01-MAX-LENGT

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Steve Edwards
On Fri, 5 Jun 2009, Peder wrote: > Of course I just figured it out. If I send a print with \n, it works > now. Not really sure why though: Because you are communicating with another process (Asterisk) over a pair of pipes. One you write to, one you read from. If you don't "terminate" your req

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Philipp Kempgen
Steve Edwards schrieb: > On Fri, 5 Jun 2009, Philipp Kempgen wrote: >> Steve Edwards schrieb: >>> >>> One of my AGIs sets almost 600 channel variables. >> >> Wow that's a lot. Why would you do that? > > Why? That's always a tough question :) > > It's a "survey" system. Ask a question, record (voi

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Steve Edwards
On Fri, 5 Jun 2009, Philipp Kempgen wrote: > Steve Edwards schrieb: >> >> One of my AGIs sets almost 600 channel variables. > > Wow that's a lot. Why would you do that? Why? That's always a tough question :) It's a "survey" system. Ask a question, record (voice or DTMF) a response, maybe branch

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Philipp Kempgen
Peder schrieb: > I've tried all of that and it still doesn't work right. I'm sure it's > something dumb, but I just can't figure it out. I've even made it simpler: > > echo 'SET VARIABLE ISLOCALCONTEXT CONTEXT3\n'; > echo 'SET VARIABLE ISLOCALDID \n'; > > and this produces the following: >

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Philipp Kempgen
> > -Original Message- > From: asterisk-users-boun...@lists.digium.com > [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Philipp > Kempgen > Sent: Friday, June 05, 2009 6:51 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [as

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Peder
009 11:20 AM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: Re: [asterisk-users] PHP/AGI/SetVar Issue The \n tells * that end-of-line has been reached. The documentation I read suggests \r\n, but that is perhaps redundant. -Original Message- From: asteri

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Danny Nicholas
AM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: Re: [asterisk-users] PHP/AGI/SetVar Issue Of course I just figured it out. If I send a print with \n, it works now. Not really sure why though: echo 'SET VARIABLE ISLOCALCONTEXT CONTEXT3'; print &quo

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Jeff LaCoursiere
sk-users-boun...@lists.digium.com] On Behalf Of Philipp > Kempgen > Sent: Friday, June 05, 2009 7:15 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] PHP/AGI/SetVar Issue > > Steve Edwards schrieb: >> On Thu, 4 Jun 2009, Peder

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Peder
2009 6:51 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] PHP/AGI/SetVar Issue Peder schrieb: > Here is the part from the agi that sets the variables: > > echo ' EXEC SetVar ISLOCALCONTEXT="'.$row['context'].'&quo

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Peder
erisk-users-boun...@lists.digium.com] On Behalf Of Philipp Kempgen Sent: Friday, June 05, 2009 7:15 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] PHP/AGI/SetVar Issue Steve Edwards schrieb: > On Thu, 4 Jun 2009, Peder wrote: > >> Is there a limita

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Philipp Kempgen
Steve Edwards schrieb: > On Thu, 4 Jun 2009, Peder wrote: > >> Is there a limitation to the number of variables you can set from a PHP >> agi script? > > Not that I've found yet :) > > One of my AGIs sets almost 600 channel variables. Wow that's a lot. Why would you do that? >> echo ' EXEC Se

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-05 Thread Philipp Kempgen
Peder schrieb: > Here is the part from the agi that sets the variables: > > echo ' EXEC SetVar ISLOCALCONTEXT="'.$row['context'].'"'; > echo ' EXEC SetVar ISLOCALDID="'.$row['did'].'"'; > > If I run it is as, ISLOCALCONTEXT gets set, but not ISLOCALDID: > > -- Executing NoOp("SIP/-081d2c38

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-04 Thread Steve Edwards
On Thu, 4 Jun 2009, Peder wrote: > Is there a limitation to the number of variables you can set from a PHP > agi script? Not that I've found yet :) One of my AGIs sets almost 600 channel variables. It (written in C) takes all of 1/100 of a second to lookup the variables from 2 tables in a MyS

Re: [asterisk-users] PHP/AGI/SetVar Issue

2009-06-04 Thread Jeff LaCoursiere
On Thu, 4 Jun 2009, Peder wrote: > Is there a limitation to the number of variables you can set from a PHP agi > script? I have a simple example and I can't get it to let me set more than > 1. I am pretty sure I am just missing something, but I've searched all over > an can't find the answer.

[asterisk-users] PHP/AGI/SetVar Issue

2009-06-04 Thread Peder
Is there a limitation to the number of variables you can set from a PHP agi script? I have a simple example and I can't get it to let me set more than 1. I am pretty sure I am just missing something, but I've searched all over an can't find the answer. Here is the extensions.conf part: exten =>

Re: [asterisk-users] PHP AGI Problems

2009-05-27 Thread D Tucny
2009/5/27 Atlanticnynex > (Accidentally posted this to asterisk-dev, should be here) > > fgets is only returning one character... either when run as an AGI or > run as a test on PHP on CLI... > Example, enter , then fgets returns '3'. > It's not... There are problems with the way you are han

[asterisk-users] PHP AGI Problems

2009-05-26 Thread Atlanticnynex
(Accidentally posted this to asterisk-dev, should be here) fgets is only returning one character... either when run as an AGI or run as a test on PHP on CLI... Example, enter , then fgets returns '3'. Also, GET DATA seems to be returning early and the loop keeps prompting 'invalid'... Any sug

Re: [asterisk-users] php agi and get_data errors.

2009-03-01 Thread Steve Edwards
On Sun, 1 Mar 2009, Luca Gervasi wrote: > Hallo, > I'm using a self-made script to get the code a user enters on my applications. > Sadly, the code doesn't work, i push the digits, but the result is > always an empty data. > (code=200, result=1, data= ''). Try "agi debug" at the Asterisk console.

[asterisk-users] php agi and get_data errors.

2009-03-01 Thread Luca Gervasi
Hallo, I'm using a self-made script to get the code a user enters on my applications. Sadly, the code doesn't work, i push the digits, but the result is always an empty data. (code=200, result=1, data= ''). Here is the code: set_time_limit(99); require('phpagi.php'); $agi = new AGI(

Re: [asterisk-users] PHP AGI script

2007-12-07 Thread Steve Edwards
On Thu, 6 Dec 2007, Nicholas Blasgen wrote: > I've got a very nice PHP AGI script but I want to be able to do some > database cleanup when the user hangs up the phone. I wish everyone would > hang up when they were suposed to, but some people don't. So what does > Asterisk send to an AGI file wh

Re: [asterisk-users] PHP AGI script

2007-12-07 Thread Tilghman Lesher
On Friday 07 December 2007 04:42:34 Andreas Brodmann wrote: > Nicholas Blasgen wrote: > > I've got a very nice PHP AGI script but I want to be able to do some > > database cleanup when the user hangs up the phone. I wish everyone would > > hang up when they were suposed to, but some people don't.

Re: [asterisk-users] PHP AGI script

2007-12-07 Thread Andreas Brodmann
Nicholas Blasgen wrote: > I've got a very nice PHP AGI script but I want to be able to do some > database cleanup when the user hangs up the phone. I wish everyone would > hang up when they were suposed to, but some people don't. So what does > Asterisk send to an AGI file when the line has been

Re: [asterisk-users] PHP AGI script

2007-12-07 Thread Philipp Kempgen
Nicholas Blasgen wrote: > I've got a very nice PHP AGI script but I want to be able to do some > database cleanup when the user hangs up the phone. I wish everyone would > hang up when they were suposed to, but some people don't. So what does > Asterisk send to an AGI file when the line has been

[asterisk-users] PHP AGI script

2007-12-06 Thread Nicholas Blasgen
I've got a very nice PHP AGI script but I want to be able to do some database cleanup when the user hangs up the phone. I wish everyone would hang up when they were suposed to, but some people don't. So what does Asterisk send to an AGI file when the line has been disconnected? If I remember rea

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

2007-08-23 Thread Karim H
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 He

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 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 p

[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-- Ex

Re: [asterisk-users] PHP AGI script callerid question

2007-02-01 Thread Trevor Peirce
Michelle Dupuis wrote: I am trying to set callerid from a PHP script, using one of two functions as shown below (setid1 and setid2). The first function works great with regular names and numbers, BUT, if I call the function with ("Test","UnknownNumber"), the cid number gets set to "asterisk".

Re: [asterisk-users] PHP AGI script callerid question

2007-02-01 Thread Jon Farmer
Have you tried phpagi http://phpagi.sourceforge.net/ Jon Farmer Telford, Shropshire, UK - Original Message From: Michelle Dupuis <[EMAIL PROTECTED]> To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Friday, 26 January, 2007 5:52:27 PM Subject: [asterisk

[asterisk-users] PHP AGI script callerid question

2007-01-26 Thread Michelle Dupuis
I am trying to set callerid from a PHP script, using one of two functions as shown below (setid1 and setid2). The first function works great with regular names and numbers, BUT, if I call the function with ("Test","UnknownNumber"), the cid number gets set to "asterisk". Why is my passed number pa

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-17 Thread john beaman
Greetings, I have never done any agi programming, but my first thought is maybe you need a wait statement after answering? John Beaman Telecom Specialist Voice Telecommunications Services Department. Good Samaritan National Campus 605-362-3331 >>> [EMAIL PROTECTED] 1/15/2007 10:53:51 AM >>>

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread blackwater dev
Thanks all, I'll give this a shot. On 1/15/07, Yuan LIU <[EMAIL PROTECTED]> wrote: From: *"blackwater dev" [EMAIL PROTECTED] Yes, the wav file is fine. For some reason it's just getting cut off. Whatever I type there seems to get cut off, strange. With plain dialplan (no AGI), I notice tha

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread Yuan LIU
From:  "blackwater dev" [EMAIL PROTECTED] Yes, the wav file is fine.  For some reason it's just getting cut off.  Whatever I type there seems to get cut off, strange. With plain dialplan (no AGI), I notice that the first few syllables from Playback() or Background() could be eaten up, sometimes

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread Trevor Peirce
blackwater dev wrote: I have the following code. When I call the extension, it either ignores the first "Hello there everyone", or says "hello" and moves on sometime stoping before it finishes hello. The rest of the text reads fine. Anyone else have this issue?? Try adding this... requir

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread Paul
Looking at the phpagi 2.14 source that I have I see that right after creating the file it does this: $ret = $this->stream_file($fname, $escape_digits); So if the swift-generated wav file sounds right the stream_file is where the problem lies. copy the wav file to a file named test.wav and create

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread blackwater dev
Yes, the wav file is fine. For some reason it's just getting cut off. Whatever I type there seems to get cut off, strange. On 1/15/07, Paul <[EMAIL PROTECTED]> wrote: Are you creating a temporary wav file? If so, look at that first. If the wav file is truncated at least you know the problem is

Re: [asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread Paul
Are you creating a temporary wav file? If so, look at that first. If the wav file is truncated at least you know the problem is related to the way swift gets invoked and passed the text argument. If the file is okay you need to look at the way it gets handled afterwards. blackwater dev wrote: > I

[asterisk-users] php agi - first phrase truncated, all others fine

2007-01-15 Thread blackwater dev
I have the following code. When I call the extension, it either ignores the first "Hello there everyone", or says "hello" and moves on sometime stoping before it finishes hello. The rest of the text reads fine. Anyone else have this issue?? Thanks! require('/var/lib/asterisk/agi-bin/phpagi.ph

[asterisk-users] php agi trixbox help

2006-12-27 Thread blackwater dev
I have this code which was taken from the phpagi project page along with the following in extensions_conf and the output from the asterisk CLI. When I call the 311 extension, I does nothing then hangs up. What am I doing wrong?? php code #!/usr/local/bin/php -q answer(); $cid

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Kevin Smith
I agree, that's what every example I saw was using. But ya, it's working now so I'm a happy camper :D Time Bandit wrote: Hey guys, thanks for the suggestions, I finally figured it out. I need to run the script using the CGI version of php or "#!/usr/bin/php-cgi -q"...not really sure why, but

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Time Bandit
Hey guys, thanks for the suggestions, I finally figured it out. I need to run the script using the CGI version of php or "#!/usr/bin/php-cgi -q"...not really sure why, but it all started working, AGI classes and all. Strange, I run it with standard PHP #!/usr/bin/php -q Well, if it works, then

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Kevin Smith
Hey guys, thanks for the suggestions, I finally figured it out. I need to run the script using the CGI version of php or "#!/usr/bin/php-cgi -q"...not really sure why, but it all started working, AGI classes and all. Thanks again, Kevin Time Bandit wrote: I have tried both ways (with PHPAGI

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Time Bandit
I have tried both ways (with PHPAGI and without), and neither works I went back to a real simple test, and that doesn't even work. Here is the CLI: - Executing AGI("SIP/9897943713-9e04", "VoiceMail.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/VoiceMail.php -- AGI S

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Michiel van Baak
On 18:41, Sat 08 Jul 06, Kevin Smith wrote: > Any ideas? On the asterisk CLI type: agi debug Try again -- Michiel van Baak [EMAIL PROTECTED] http://michiel.vanbaak.eu GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD "Why is it drug addicts and computer afficionados are bot

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Kevin Smith
I have tried both ways (with PHPAGI and without), and neither works I went back to a real simple test, and that doesn't even work. Here is the CLI: - Executing AGI("SIP/9897943713-9e04", "VoiceMail.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/VoiceMail.php -- AGI Scr

Re: [asterisk-users] PHP AGI

2006-07-08 Thread Time Bandit
Can someone post an example of how you read in a channel variable from asterisk through PHP. I tried the ones voip-info.org but none of them seem to work, or at least I am not doing something write, but I have no problem setting variables and other functions, just reading variables into my script.

[asterisk-users] PHP AGI

2006-07-08 Thread Kevin Smith
Hi everyone, Can someone post an example of how you read in a channel variable from asterisk through PHP. I tried the ones voip-info.org but none of them seem to work, or at least I am not doing something write, but I have no problem setting variables and other functions, just reading variable

Re: [Asterisk-Users] PHP-AGI help

2006-06-05 Thread Lewis Agosta
command line I got syntax error, unexpected '[', expecting ']' in test.php on line 33Jon FarmerTelford, Shropshire, UK- Original Message From: Matthew Warren <[EMAIL PROTECTED] >To: asterisk-users@lists.digium.comSent: Friday, 2 June, 2006 3:32:10 PMSubject: [Aster

Re: [Asterisk-Users] PHP-AGI help

2006-06-02 Thread Jon Farmer
ED]> To: asterisk-users@lists.digium.com Sent: Friday, 2 June, 2006 3:32:10 PM Subject: [Asterisk-Users] PHP-AGI help Can someone help me with this AGI script to send an email. It just isn't working. The file is being called in the dialplan and is saved as em.agi but it isn't se

[Asterisk-Users] PHP-AGI help

2006-06-02 Thread Matthew Warren
Can someone help me with this AGI script to send an email. It just isn't working. The file is being called in the dialplan and is saved as em.agi but it isn't sending the email. #!/usr/bin/php4 -q ___ --Bandwidth and Colocation provided by Easynews.

Re:[Asterisk-Users] php agi configuration issue SOLVED

2006-02-07 Thread asterisk
07/02/2006 10.35 Subject Re: R: [Asterisk-Users] php agi configuration issue Please respond to

Re: R: [Asterisk-Users] php agi configuration issue

2006-02-07 Thread asterisk
Subject 06/02/2006 18.08 R: [Asterisk-Users] php agi configuration issue Please respond to

R: [Asterisk-Users] php agi configuration issue

2006-02-06 Thread Phone Dev
-Commercial Discussion Oggetto: [Asterisk-Users] php agi configuration issue Hi all, I would like to eliminate about 150 lines in log /var/log/messages) every time a call is placed/received If I type, on the asterisk console, set verbose 0 the lines in the log disappear, but it appears to me too

[Asterisk-Users] php agi configuration issue

2006-02-06 Thread asterisk
Hi all, I would like to eliminate about 150 lines in log /var/log/messages) every time a call is placed/received If I type, on the asterisk console, set verbose 0 the lines in the log disappear, but it appears to me too drastic as a method The lines shown in the log don't appear (at least t

[Asterisk-Users] php+agi

2006-02-03 Thread Ever Zalazar
Hello, I want to know if someone made a script in php(with agi) to call some voip number, and when the user answer the call, he hears a message with an advertisement. I want to input the number directly from cli or read the numbers from a file(ex.8021,8022,8023).   Thanks in advantage     Eve

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

2005-12-22 Thread asterisk
m.com Subject Re: [Asterisk-Users] php agi 21/12/2005 14.44 problem (perhaps p

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 >

[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 p

[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 v

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 r

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 get

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

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

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 wo

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 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

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 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 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 continuo

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 tim

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 non-loop

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 wil

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

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(cleanu

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 #i

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 scr

  1   2   >