Displaying 20 results from an estimated 32 matches for "set_time_limit".
2006 Dec 18
2
AGI Help Please
..."test.php") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/test.php
-- AGI Script test.php completed, returning 0
-- Executing Hangup("SIP/216-0baa", "") in new stack
Here is the script:
#!/usr/bin/php -q
<?php
ob_implicit_flush(false);
set_time_limit(6);
$stdin = fopen("php://stdin","r");
$stdout = fopen('php://stdout', 'w');
function read() {
global $stdin, $debug;
$input = str_replace("\n", "", fgets($stdin, 4096));
return $input;
}
function connect_db() {
$database="asteris...
2003 Nov 05
1
First AGI help..
...e..
Thanks for any help.. and any samples (even offlist) would be greatly
appreciated..
I have setup in extensions.conf like this for testing..
exten => 7000,1,agi(test1.php)
exten => 7001,1,agi(test2.pl)
test1.php script..
<?php
// From Kapjod's sample..
ob_implicit_flush(true);
set_time_limit(0);
$err = fopen("php://stderr","w");
$in = fopen("php://stdin","r");
$out = fopen("php://stdout","w");
//This works..
fputs($out, "Verbose \"Calling phone"\n");
// This doesn't
fputs($out, "exec(Dial(sip/2012...
2006 Jun 02
1
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 sending the email.
#!/usr/bin/php4 -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
$in = fopen("php://stdin","r");
$stdlog = fopen("/var/log/asterisk/my_agi.log", "w");
// toggle debugging output (more verbose)
$debug = false;
// Do function definitions before we start the main loop
function read() {
global $in, $debug, $stdl...
2006 Dec 27
1
php agi trixbox help
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
set_time_limit(30);
require('phpagi.php');
$agi = new AGI();
$agi->answer();
$cid = $agi->parse_callerid();
$agi->text2wav("Hello, {$cid['name']}. Let's enter some text.");
$text = $agi->text_input('UPPERCASE');
$agi->text2wav("You entered...
2009 May 29
1
how to detect dtmf in meetme
...${CONFCOUNT}<10]?3:100)
exten =>121,3,Authenticate(123456)
exten =>121,4,MeetMe(900,MDbF)
exten =>121,5,MeetMe(900,MD)
exten =>121,100,Playback(demo-moreinfo)
#!/usr/bin/php -q
<?php
//include("phpagi.php");
//include("phpagi-asmanager.php");
//$agi = new AGI;
set_time_limit(60);
ob_implicit_flush(false);
if(!defined('STDIN'))
{
define('STDIN',fopen('php://stdin','r'));
}
if(!defined('STDOUT'))
{
define('STDOUT',fopen('php://stdout','w'));
}
if(!defined('STDERR'))
{
define('STDERR'...
2003 Dec 29
1
Agent setup
Dear Group,
I have been successful in setting up the Agents, queues and getting agents
to log in.
Is there a way that I could configure the system so that the agent is called
back. i.e. the agent logs into the system, a call is destined for them and
their phone rings.
If some one has this setup I would be very interested in hearing from them.
Warm Regards and Thanks
---------------
Shad
2012 Jan 12
1
how to set callerid in php AGI file.
Hi,
I am using phpagi for agi scripting. and want to update callerid number but
didn't get any success. please help me how to update PHPAGI is new for me.
Below is the code which I write.
#!/usr/bin/php -q
<?php
set_time_limit(30);
//require(.phpagi.php.);
include("phpagi.php");
$agi = new AGI();
//answer the call
$agi-> answer();
$agi->verbose("------------------------------------------");
$agi-> exec('Set',"CALLERID(num)=01133200274");
$ani = $agi->request['agi_ca...
2005 Oct 12
3
AGI and set_callerid for number and name
Hi,
I've been trying to use the set_callerid function in the AGI. It sets
the CallerIDname properly but I can't figure out how to set the
CallerIDnumber.
Is it at at possible ?
Cheers.
SL
2003 Nov 10
3
AGI and PHP
...ment; i m
NOT saying you should change anything but you should be aware
of it as it may spare you some frustration along the way especially
when you are in the thick of things. look in your php config file
(usually in /etc/php.ini) for the following:
ob_implicit_flush(false);
set_time_limit(5);
; error_log = filename
the first item shows whether php should buffer output; in the case
of * agi, if you buffer your output, * will not get your instruction
for a
long time unless you flush the buffer manually (see below)
the second item is the max. allowable time to run yo...
2003 Nov 13
0
2 AGI questions..
...lso on the agi pages I have
looked at..
Question 2..
Can an AGI script be executed on the "h" extension so that is will run
at the end of each call?
This is basically the script now so there can't be a problem with the
script..
#/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(15);
exit();
?>
Thats it..
But I get this..
-- Executing AGI("SIP/2010-a826", "end1.php") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/end1.php
== Spawn extension (local, h, 1) exited non-zero on 'SIP/2010-a826'
My other script ends like this..
--...
2003 Dec 10
0
Trouble with AGI and SAY DIGITS and WAIT FOR DIGIT using PHP
...get result=1
-- [extensions.conf] --
exten => _104[013-9],1,Answer
exten => _104[013-9],2,Playback(beep)
exten => _104[013-9],3,AGI(demo.agi)
exten => _104[013-9],4,Playback(beep)
exten => _104[013-9],5,Hangup
-- [demo.agi] --
#!/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(0);
$in = fopen("php://stdin","r");
...
function __read__() {
global $in, $debug;
$input = str_replace("\n", "", fgets($in, 4096));
return $input;
}
function __write__($line) {
print $line."\n";
}
...
__write__("ANSWER");...
2004 Dec 12
1
I'm stumped
...The values never get entered in the database. Here are
the files: I have asterisk running as the user asterisk also.
---cid-store.php----
<HTML>
<HEAD>
<TITLE>Storing Asterisk CID data</TITLE>
</HEAD>
<BODY>
<h1>Asterisk phone book</h1>
<?php
set_time_limit(5);
if ($PhoneNumber <> "" && $PhoneName <> "") {
system("sudo -u asterisk /usr/sbin/asterisk -rx " .
escapeshellarg("database put cidname $PhoneNumber \"$PhoneName\"") . " &>
/tmp/error");
print &qu...
2005 Mar 05
1
SAY DIGITS problem
...e reason I cannot
here any thing when the script got executed. However if I use the cmd
"SAY NUMBER" I can here * reading the number fine.
I am running asterisk-1.0.6 and below is my PHP script.
Help please.
- Natt
#!/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(10);
/* Standard Input file descriptor */
$stdin = fopen('php://stdin', 'r');
/* Standard Output file descriptor */
$stdout = fopen('php://stdout', 'w');
/* Standard Log output */
$stdlog = fopen('/var/log/asteri...
2005 Aug 04
1
Callback question
Hi,
I'm interested in a callback feature where I can dial my Asterisk, then
hangup and Asterisk will call me back and I can then place phone calls or
whatever I want to do. And also, if I've got voicemail I want Asterisk to
call me back as well. Are there any scripts for this available?
Any help would be apreciated!
Best regards,
Christian
2007 Jan 15
1
phpagi transfer example
Hi, i want to to this thing with php AGI:
#!/usr/local/bin/php -q
<?php
set_time_limit(30);
require('phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$cid = $agi->parse_callerid();
$agi->text2wav("Hello, {$cid['name']}.");
$agi->text2wav('Enter some numbers and then press the pound key. Press
1 1 1 followed by the p...
2009 Mar 01
1
php agi and get_data errors.
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(99999999999999);
require('phpagi.php');
$agi = new AGI();
$agi->answer();
function printdebug($a) {
global $agi;
$agi->conlog(print_r($a, true));
}
// Prendo Badge
$isokbadge = false;
$tries = 1;
do {
$result = array();
$agi->exec('PLAYBACK',$audiofiles['insertb...
2009 Sep 02
0
problem with agi script not getting variable
...1.2.
I hve written a simple script that reads out the callerid using flite. My
problem is that I seems the script is not getting the callerID.
Bellow is the script
_________________
#!/usr/bin/php -q
<?php
/**
* @package phpAGI_examples
* @version 2.0
*/
set_time_limit(30);
require('phpagi.php');
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
$cid = $agi->parse_callerid();
$agi->exec("Flite","\"Hello, {$cid['name']}.\"");
$agi->exec("flite"...
2010 Jan 11
0
PHP-Script (AGI) doesn't finish after upgrading to 1.6.0.15
...simple example:
[isdin]
exten => 83086921,1,AGI(test.php)
exten => 83086921,2,NOOP("MARKE1")
exten => 83086921,3,WAIT(2)
exten => 83086921,4,Hangup()
/var/lib/asterisk/agi-bin/test.php
-----------------------------------
#! /usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
error_reporting(0);
$stdin=fopen("php://stdin","r");
while(!feof($stdin)){
$temp = fgets($stdin);
if (preg_match("/agi_/",$temp)){
$temp = str_replace("\n","",$temp);
$s = explode(":"...
2008 Feb 06
0
Problem forwarding a call with an AGI script
...IP/user4,10,tr)
exten => 96,2,AGI(transfer.php)
exten => 97,1,NoOp("MARKE1------------")
exten => 97,2,DIAL(SIP/user1,20,tr)
exten => 97,3,NoOp("MARKE2-------------")
exten => 97,4,BUSY()
transfer.php:
#! /usr/bin/php -q
<?php
$i=0;
ob_implicit_flush(true);
set_time_limit(6);
error_reporting(0);
$stdin=fopen("php://stdin","r");
while(!feof($stdin)){
$temp = fgets($stdin);
$temp = str_replace("\n","",$temp);
$s = explode(":",$temp);
if( $s[0]=="agi_dnid"){
// $s[1] contain...
2008 Sep 18
4
OT - How to stream a A-Law/wav file to a browser ?
Hi,
How can I create a web page allowing people to listen (with their own PC) a
couple of .wav/a-law files stored on a Linux server ?
Chances are users would access this web page from Internet Explorer but if I
could make it available to other browsers, that would be better.
I googled a bit and couldn't find a tag such as media://myaudiofile.wav that
would fulfill this spec.
As much as