Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below? #!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n"; // Wait sleep(5); // Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n"; fclose($in); ?>
This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get. -MC On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006@yahoo.com> wrote:
Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?
#!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n";
// Wait sleep(5);
// Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n";
fclose($in);
?>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
OK so if I were to use the ESL lib with PHP, can it still be used with the fs_ivrd daemon? I have not seen any ESL examples that is used with the fs_ivrd deamon, so I am not exactly to use the ESL lib. ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Monday, August 22, 2011 5:27 PM Subject: Re: [Freeswitch-users] freeswitch php This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get. -MC On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006@yahoo.com> wrote: Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?
#!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n"; // Wait sleep(5); // Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n"; fclose($in); ?>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Aha! fs_ivrd. I haven't tinkered w/ fs_ivrd outside of Perl, but it should work with anything that can read/write STDIN/STDOUT. Give me a few hours to work on some day job items and then I'll hop in here and take a look. Maybe you can help me wikify some of this knowledge. ;) -MC P.S. - If anyone else has or is using fs_ivrd and has some experience with it please let me know. I'd like to borrow some of your mental cycles so that we can document this better. On Mon, Aug 22, 2011 at 5:54 PM, Sam <lakersman2006@yahoo.com> wrote:
OK so if I were to use the ESL lib with PHP, can it still be used with the fs_ivrd daemon? I have not seen any ESL examples that is used with the fs_ivrd deamon, so I am not exactly to use the ESL lib.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Monday, August 22, 2011 5:27 PM *Subject:* Re: [Freeswitch-users] freeswitch php
This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get.
-MC
On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006@yahoo.com> wrote:
Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?
#!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n";
// Wait sleep(5);
// Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n";
fclose($in);
?>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
MC, Any luck with fs_ivrd with ESL? ________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Tuesday, August 23, 2011 10:06 AM Subject: Re: [Freeswitch-users] freeswitch php Aha! fs_ivrd. I haven't tinkered w/ fs_ivrd outside of Perl, but it should work with anything that can read/write STDIN/STDOUT. Give me a few hours to work on some day job items and then I'll hop in here and take a look. Maybe you can help me wikify some of this knowledge. ;) -MC P.S. - If anyone else has or is using fs_ivrd and has some experience with it please let me know. I'd like to borrow some of your mental cycles so that we can document this better. On Mon, Aug 22, 2011 at 5:54 PM, Sam <lakersman2006@yahoo.com> wrote: OK so if I were to use the ESL lib with PHP, can it still be used with the fs_ivrd daemon? I have not seen any ESL examples that is used with the fs_ivrd deamon, so I am not exactly to use the ESL lib.
________________________________ From: Michael Collins <msc@freeswitch.org> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Monday, August 22, 2011 5:27 PM Subject: Re: [Freeswitch-users] freeswitch php
This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get.
-MC
On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006@yahoo.com> wrote:
Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?
#!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n"; // Wait sleep(5); // Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n"; fclose($in); ?>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Sam, I got this to work without any issues. I think there may be two things for you to check: #1 - make sure that you set your script to be executable #2 - make sure that you have php-cli installed Other than that, as long as fs_ivrd is running then it should work. For the record, I copied the wiki exactly except I used port 9090 instead of 8084. -MC On Sat, Aug 27, 2011 at 9:26 AM, Sam <lakersman2006@yahoo.com> wrote:
MC,
Any luck with fs_ivrd with ESL?
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Tuesday, August 23, 2011 10:06 AM
*Subject:* Re: [Freeswitch-users] freeswitch php
Aha! fs_ivrd. I haven't tinkered w/ fs_ivrd outside of Perl, but it should work with anything that can read/write STDIN/STDOUT. Give me a few hours to work on some day job items and then I'll hop in here and take a look. Maybe you can help me wikify some of this knowledge. ;)
-MC
P.S. - If anyone else has or is using fs_ivrd and has some experience with it please let me know. I'd like to borrow some of your mental cycles so that we can document this better.
On Mon, Aug 22, 2011 at 5:54 PM, Sam <lakersman2006@yahoo.com> wrote:
OK so if I were to use the ESL lib with PHP, can it still be used with the fs_ivrd daemon? I have not seen any ESL examples that is used with the fs_ivrd deamon, so I am not exactly to use the ESL lib.
------------------------------ *From:* Michael Collins <msc@freeswitch.org> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Monday, August 22, 2011 5:27 PM *Subject:* Re: [Freeswitch-users] freeswitch php
This probably isn't the most efficient way of using the event socket. In fact, I'm not sure if this is anything more than a proof of concept. You are MUCH better off using the ESL lib with PHP and taking advantage of the abstraction you get.
-MC
On Sun, Aug 21, 2011 at 4:56 PM, Sam <lakersman2006@yahoo.com> wrote:
Does anyone know how to retrieve channel variables (ie. uuid, etc.) using the php example that was shown in the wiki below?
#!/usr/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: playback\n"; echo "execute-app-arg: /usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome_to_freeswitch.wav\n\n";
// Wait sleep(5);
// Hangup echo "sendmsg\n"; echo "call-command: hangup\n\n";
fclose($in);
?>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (2)
-
Michael Collins
-
Sam