[asterisk-users] php script in h context makes channel hang : solution ?

2014-03-20 Thread Jonas Kellens
Hello, I execute the following php script when a call ends and the h-context is executed : /exten = h,n,System(/usr/bin/php /var/log/asterisk/loggingAST/loggingAST.php /var/log/asterisk/loggingAST/${CHANNEL:4}.csv)/ The script loggingAST.php writes some information in a MySQL database on

Re: [asterisk-users] php script in h context makes channel hang : solution ?

2014-03-20 Thread Eric Wieling
: Thursday, March 20, 2014 10:27 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] php script in h context makes channel hang : solution ? Hello, I execute the following php script when a call ends and the h-context is executed : exten = h,n,System(/usr/bin/php

Re: [asterisk-users] php programming for working with asterisk

2013-01-14 Thread Muhammad
*thanks to replay Sammy! But excatly I don't know how can do it! connecting to DB via dialplan. ** * On Mon, Jan 14, 2013 at 11:08 AM, SamyGo govoi...@gmail.com wrote: Hi, If your caller is using softphone then you can create a simple dialplan which consults a DB and verifies that the

Re: [asterisk-users] php programming for working with asterisk

2013-01-14 Thread Johan Wilfer
2013-01-14 09:43, Muhammad skrev: /thanks to replay Sammy! But excatly I don't know how can do it! connecting to DB via dialplan. Here is a good example explaining this: http://astbook.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/getting_funky.html It's written for asterisk 1.4,

Re: [asterisk-users] php programming for working with asterisk

2013-01-14 Thread SamyGo
Hi, Johan has referred you to a very good resource for doing that. Alternatively you can achieve this all by making an AGI in your preferred language. Thanks, Sammy On Mon, Jan 14, 2013 at 2:01 PM, Johan Wilfer li...@jttech.se wrote: It's written for asterisk 1.4, but I think that will get

[asterisk-users] php programming for working with asterisk

2013-01-13 Thread Muhammad
Hi, I write some php code in AMI to working with asterisk command. I don't know exactly what is the different between AMI and AGI and witch one is better for my planning. Im planning to call party users that their number is is my panel on web. We have some operator and they can call party users

Re: [asterisk-users] php programming for working with asterisk

2013-01-13 Thread SamyGo
Hi, If your caller is using softphone then you can create a simple dialplan which consults a DB and verifies that the dialled number is in the allowed-caller-list and if the result is OK just let the call dial through. Use Mixmonitor() application in your dialplan to record this call at some

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-12 Thread Gerald A
Hi Bruce, On Sat, Jul 10, 2010 at 2:17 PM, bruce bruce bruceb...@gmail.com wrote: I have my html/php file set so that the input field only takes 3 digit 3 digit 4 digit (NPA, NXX, Block) so your purposal of: *'201,0); drop database YOUR_DATABASE'; *would fail due to big length and also I

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-11 Thread Matthew J. Roth
Bruce, These two links may be helpful to you: PHP: SQL Injection - Manual http://www.php.net/manual/en/security.database.sql-injection.php PHP: mysql_real_escape_string - Manual http://www.php.net/manual/en/function.mysql-real-escape-string.php Regards, Matthew Roth InterMedia

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread Zeeshan Zakaria
Its not wise to haste in posting for help without first spending sometime thinking yourself. Your mysql syntax is not right, you can clearly see the missing single quotes starting from 'ext-local. I would also suggest to use a different syntax for this mysql statement, i.e. using SET instead of

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread bruce bruce
Thank you for the amazing reply. First few lines of your e-mail was EXACTLY getting me to where I made a mistake. I guess I didn't take the () and ' ' at their face value and was looking somewhere else for the problem. For sanatizing you mean checking the numbers to make sure they are valid

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread bruce bruce
Further to my last post, I added this to santize. I also created a new mysql user with access to only findmefollow portion of the asterisk table for limited access and assigned only two simultaneous connections with only 10 changes queries per hour (as I know that no more queries will be put

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread Gerald A
Hi Bruce, On Sat, Jul 10, 2010 at 11:12 AM, bruce bruce bruceb...@gmail.com wrote: Further to my last post, I added this to santize. I also created a new mysql user with access to only findmefollow portion of the asterisk table for limited access and assigned only two simultaneous connections

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread bruce bruce
Thanks again. Apparently all POST variables come through as strings. The function you pointed out is I think already built in php as is_numeric() http://www.php.net/manual/en/function.is-numeric.php. http://php.net/manual/en/function.is-int.php

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread bruce bruce
Here is the steel strong sanitizer: $npaa = $_POST[anpa]; $nxxa = $_POST[anxx]; $blocka = $_POST[ablock]; # Sanitize $blocka_san = strspn($blocka, 0123456789); *if ($blocka_san==4 is_numeric($npaa) is_numeric($nxxa) is_numeric($blocka) $npaa=200 $nxxa=200 $npaa!=900 $npaa!=911) * * * *

Re: [asterisk-users] PHP can't insert - Can someone please help

2010-07-10 Thread Steve Edwards
On Sat, 10 Jul 2010, bruce bruce wrote: Here is the steel strong sanitizer: $npaa = $_POST[anpa]; $nxxa = $_POST[anxx]; $blocka = $_POST[ablock]; # Sanitize $blocka_san = strspn($blocka, 0123456789); if ($blocka_san==4 is_numeric($npaa) is_numeric($nxxa) is_numeric($blocka) $npaa=200

[asterisk-users] PHP can't insert - Can someone please help

2010-07-09 Thread bruce bruce
Hi Guys, I am making another module for Voicemail. I have three fields in a POST form that have to be connected together to make it a single 10 digit number but there is something wrong in my syntax probably. $npaa = ('$_POST[anpa]'); $nxxa = ('$_POST[anxx]'); $blocka = ('$_POST[ablock]');

[asterisk-users] PHP-Script (AGI) doesn't finish after upgrading to 1.6.0.15

2010-01-10 Thread Stefan-Michael Guenther
Hi, I recently upgraded our asterisk server from some 1.4 version to version 1.6.0.15. From this point on my AGI scripts aren't working anymore, here is a simple example: [isdin] exten = 83086921,1,AGI(test.php) exten = 83086921,2,NOOP(MARKE1) exten = 83086921,3,WAIT(2) exten =

[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

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 I

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 asterisk@sedwards.com On Fri, 20 Nov 2009, mickael ropars wrote: someone send a URL to

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

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 asterisk@sedwards.com 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

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 I

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 asterisk@sedwards.com On Fri, 20 Nov 2009, mickael ropars wrote: someone send a URL to call someone a PHP script (script

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

2009-11-20 Thread Danny Nicholas
] 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 seems to have a lot

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 Not Working and Odd Behavior

2009-06-26 Thread David Quinton
planning.customer.c...@west-lindsey.co.ukon Thu, 25 Jun 2009 15:11:04 +0800, Andrew Furey andrew.fu...@gmail.com wrote: On 25/06/2009, David Quinton gna...@bizorg.co.uk 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

[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 Newmarklnewm...@capalon.com 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

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

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 lnewm...@capalon.com 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

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

2009-06-25 Thread Andrew Furey
On 25/06/2009, David Quinton gna...@bizorg.co.uk 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

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 lnewmark at capalon.com

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

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

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 Newmarklnewm...@capalon.com 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

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

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

2009-06-24 Thread Danny Nicholas
-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. I am aware

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

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(response), stdin);

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, CONTEXT2)

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 SetVar

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

2009-06-05 Thread Peder
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 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

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

2009-06-05 Thread Peder
: [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'].''; echo ' EXEC SetVar ISLOCALDID='.$row['did'].''; If I run it is as, ISLOCALCONTEXT gets set, but not ISLOCALDID: -- Executing

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

2009-06-05 Thread Jeff LaCoursiere
a library. j -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 7:15 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] PHP

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 \n; echo 'SET VARIABLE

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

2009-06-05 Thread Peder
- 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: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users

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

2009-06-05 Thread Philipp Kempgen
Of Philipp Kempgen Sent: Friday, June 05, 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

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

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 (voice or DTMF) a

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

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

2009-06-05 Thread David Backeberg
On Fri, Jun 5, 2009 at 3:13 PM, Steve Edwards asterisk@sedwards.com 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        

[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/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.

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

[asterisk-users] PHP AGI Problems

2009-05-27 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

Re: [asterisk-users] PHP AGI Problems

2009-05-27 Thread D Tucny
2009/5/27 Atlanticnynex atlanticny...@gmail.com (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

[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

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

Re: [asterisk-users] php web chat + asterisk - callcenter

2008-03-18 Thread Marco Mouta
I would recommend you Asterisk for Voice and Video and XMPP for Chat. Asterisk in parallel with Jabberd2 (XMPP server) may feet your requirements, and if you use a XMPP MSN Transport Gateway you can do even more. On Mon, Mar 17, 2008 at 5:50 PM, Carlos Carvalhar [EMAIL PROTECTED] wrote:

[asterisk-users] php web chat + asterisk - callcenter

2008-03-17 Thread Carlos Carvalhar
Hello, How can I make a live chat (mainly text, but with voice/video chat if possible) interacting with asterisk? Can asterisk control simultaneously the queue between people calling by phone and people by web chat? At my work, there is a call center using asterisk to control the queue of

Re: [asterisk-users] php web chat + asterisk - callcenter

2008-03-17 Thread Faraz Khan
Obviously asterisk has nothing to do with your web-chat component. Are you writing this 'chat' application yourself? If you are, then when the person is IN chat, simply make a LDAP or a Mysql entry somewhere. Asterisk can simply read that entry to decide whether the user is on web chat or

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

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

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 when

[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

[asterisk-users] PHP - Queues - etc.

2007-11-10 Thread Marcelo Freitas
Hello, I'm trying to understand the AMI and use the PHPAGI library to extend and to easy my work ... I'm still trying to figure out how things works, but I haven't found enough resources to make me sure about certain things ... So, I'd like to know if somebody can give me a hand ;) My

Re: [asterisk-users] PHP - Queues - etc.

2007-11-10 Thread Atis Lezdins
On 11/10/07, Marcelo Freitas [EMAIL PROTECTED] wrote: Hello, I'm trying to understand the AMI and use the PHPAGI library to extend and to easy my work ... I'm still trying to figure out how things works, but I haven't found enough resources to make me sure about certain things ... So, I'd

[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 script callerid question

2007-02-01 Thread Jon Farmer
PM Subject: [asterisk-users] PHP AGI script callerid question 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

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

[asterisk-users] PHP sip client

2007-01-28 Thread Enrico Pasqualotto
Hi all, I want to write a simit sip client in PHP with asterisk API, in this moment I'm able to compose a number on my browser and call between 2 hw sip phone. I digit a number, my phone ring and after hanging up the cornet the second phone ring. But I want to add a features I want to

[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

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

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

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

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

[asterisk-users] PHP C Extension to connect to manager interface

2006-12-31 Thread Moises Silva
Hi, I have written a small PHP extension to connect to the manager interface. Im not sure about the advantages of using my extension instead of creating a PHP script that opens the TCP connection itself, but I think it can be usefull. The code can be found at svn://moy.ivsol.net/php-ami/trunk

[asterisk-users] PHP to call script

2006-12-29 Thread zero massive
Using the php script below. I am able to enter my number and the number to call, however I get the following error: -- AGI Script cid-spoof.agi completed, returning 0 == Parsing '/etc/asterisk/manager.conf': Found == Parsing '/etc/asterisk/manager_custom.conf': Found == Manager 'admin'

[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 ?php

Re: [asterisk-users] PHP to .call file

2006-11-30 Thread Moises Silva
If the call is generated, the problem has nothing to do with the PHP file. By the way, instead of looking into GET and POST, you may want to use REQUEST global variable. Regards On 11/19/06, zero massive [EMAIL PROTECTED] wrote: Hi all! Can anyone shed some light on a problem with a php to

Re: [asterisk-users] PHP to .call file

2006-11-19 Thread zero massive
Hi all! Can anyone shed some light on a problem with a php to .call file. I am trying to input the number I would like to call, as well as the current phone number where im located. I am able to generate a call to each number, but I am unable to hear or say anything on either phone.any ideas

[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

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

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 Script

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=getsearch=0x71C946BD Why is it drug addicts and computer afficionados are both

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

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

[Asterisk-Users] php-snmp

2006-06-22 Thread Matthew Warren
Has anyone been able to get PHP-SNMP working on an asterisk box. I have downloaded the net-snmp, utils,libs, perl and php-snmp but unable to get the php to work wit it. It works via command line // without php. This is set up on an AAH box. ___

  1   2   3   >