search for: ob_implicit_flush

Displaying 20 results from an estimated 24 matches for "ob_implicit_flush".

2006 Dec 18
2
AGI Help Please
...("SIP/216-0baa", "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() {...
2003 Nov 05
1
First AGI help..
...whole new ball game for me.. 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, &q...
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() { gl...
2009 May 29
1
how to detect dtmf in meetme
...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',fopen('php://stder...
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
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
...o be aware of your php environment; 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 ma...
2003 Nov 13
0
2 AGI questions..
..." on a console and also 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 scri...
2003 Dec 10
0
Trouble with AGI and SAY DIGITS and WAIT FOR DIGIT using PHP
...-- user pressed 4, but we 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...
2004 Jul 14
0
Having serious problems with AGI
...ile my-file". 3) All Asterisk application commands run through "EXEC <application> <options> seem to properly run and play their sound files (if applicable), but return "510" to stdin. 4) (For people familiar with PHP) I have tried all of the following to no avail: ob_implicit_flush(true/false); accessing stdout with $out = fopen("php://stdout", "w"), writing to it with fputs($out, $str . "\n"), and then flusing it with fflush($out), instead of my original attempt to do it with echo() followed by flush(). Hopefully this is not misleading since bot...
2005 Mar 05
1
SAY DIGITS problem
..."SAY DIGITS". For some 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 */ $stdlo...
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
2010 Jan 11
0
PHP-Script (AGI) doesn't finish after upgrading to 1.6.0.15
...rking anymore, here is a 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 =...
2008 Feb 06
0
Problem forwarding a call with an AGI script
...exten => 96,1,Dial(SIP/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&qu...
2007 Aug 24
0
MYSQL problem and configuration
Hello,I am new to asterisk but i have vbeen scriptinh PHP SQL and webLanguages for a long time.I can Give you a solution but using php AGI:extensions.con-----> AGI(connect.agi);/var/lib/asterisk/agi-bin/connect.agi :#!/usr/bin/php -q<?phpset_time_limit(0);ob_implicit_flush();error_reporting(0);//Initialisation des entr?e-sortiefunction init() {#create file handles if neededif(!defined('STDIN')){ define('STDIN',fopen('php://stdin','r'));}if(!defined('STDOUT')){ define('STDOUT',fopen('php://stdout','w...
2003 Jul 07
5
Direct entry to your own voice mailbox
Hi, There is any possibility to dial a specific extension and then enter in your own mailbox (the one defined for that specific SIP phone) without asking for the exxtension number but only for the password? I want to be the same extension for all phones, not a specific one for each of them. It is possible to have a time stamp in the recorded message? I want to know when the message has been
2007 Nov 06
2
Recording just first part of call?
I know that I can record the contents of a call by calling Monitor() or MixMonitor() from the dialplan just before invoking Dial(). I have a potential customer who wants only the first minute of each call recorded (for identification purposes, without the storage overhead of keeping the complete call). Can anyone here think of the easiest way to do this? The only possibilities I can think of
2010 Jun 15
4
can't seem to register, status unmonitored
Hi everybody, I am trying to register my softphone(twinkle) on an asterisk server. Everything seems to be fine. Here is the output on show registrations in twinkle: Tue 18:57:51 nikhil: you have the following registrations <sip:2001 at 172.26.48.208 <sip%3A2001 at 172.26.48.208>>;expires=3013 208 is ip of the asterisk server. on the server on doing 'sip show peers' , it
2005 Mar 27
6
pass caller ID to another application or machine.
I would like to have asterisk pass along the caller ID phone number to a database server on a my local network (the same network that the * server resides on ) so that our customer service app. can pull up customer data automatially. Asterisk passes along caller ID to the phones fine, can someone tell me how to make it pass this info to my database server? Any suggestions would be greatly
2012 Aug 26
1
One leg in a conference and adjusting stream volume of other leg
Hi all, I'm looking for some serious help. :) I couldn't find a better description for my problem... I think it is quite complex! Here's what I would like to achieve: A SIP caller dials into to my Asterisk 10. He will automatically listen to a specific MP3 stream. Other SIP callers dial also into my Asterisk. They all will automatically listen to the same MP3 stream. All