Re: [Freeswitch-users] FreeSWITCH-users Digest, Vol 76, Issue 108
Hi guys, I'm trying to use the fs_ivrd daemon, to execute a php script, that is called by the dialplan. It works like a charm, if not for the fact that the daemon (fs_ivrd) ends once the script (php) ends. In a system, I'll have to execute this script many times, and the daemon have to stay up. I think that it is wrong, right? I've already tryed to connect direct to a nc, simulating the deamon, and worked fine. I've already executed the script direct from de shell, and there's no sintax errors. *Here is my dialplan extension:* <extension name="outbound-socket"> <condition field="destination_number" expression="^55(522)$"> <action application="set" data="ivr_path=/usr/local/eox/programas/freeswitch/scripts/teste.php"/> <action application="socket" data="127.0.0.1:9099 async full"/> </condition> </extension> *Here is how I call the deamon:* (from the freeswitch bin dir) ./fs_ivrd -h 127.0.0.1 -p 9099 *Here is my PHP script:* #!/usr/local/eox/programas/php/bin/php -q <?php // set a couple of things so we dont kill the system ob_implicit_flush(true); set_time_limit(30); // Open stdin so we can read the data in $in = fopen("php://stdin", "r"); // Connect echo "connect\n\n"; // Answer echo "sendmsg\n"; echo "call-command: execute\n"; echo "execute-app-name: answer\n\n"; // Play a prompt echo "sendmsg\n"; echo "call-command: execute\n"; echo "execute-app-name: log\n"; echo "execute-app-arg: CRIT Testing text...\n\n"; // Wait sleep(2); // Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n"; fclose($in); ?> I'll be grateful for any help. Thanks, and sorry for any error in my english. -- Jeferson Rodrigo Almeida Engenheiro de Computação jefersonparanaense@gmail.com
On Wed, Oct 17, 2012 at 8:38 AM, Jeferson Rodrigo Almeida <jefersonparanaense@gmail.com> wrote:
I'll be grateful for any help.
You'll get more help if you use a proper subject in your emails (rather than replying to an existing email thread with an existing subject).
Thanks, and sorry for any error in my english.
Your English was pretty good! Best, Gabe
participants (2)
-
Gabriel Gunderson
-
Jeferson Rodrigo Almeida