[commit] r2594 - freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php
Author: docelmo Date: Sat Sep 9 02:34:37 2006 New Revision: 2594 Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/test.php Log: Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php ============================================================================== --- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php (original) +++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/classFreeswitch.php Sat Sep 9 02:34:37 2006 @@ -1,3 +1,4 @@ +<? /* * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application * Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com> @@ -29,12 +30,15 @@ * php_freeswitch.c -- PHP Module Framework * */ - +require("freeswitch.php"); // Required for freeswitch driver to be loaded +global $session; class fs_class_api { - global $session; - $session = this->getSession($uuid); - function fs_class_api() { - require("php_freeswitch.php"); // Required for freeswitch driver to be loaded + function fs_class_api() { + /* if($session = $this->fs_getSession($uuid)){} + else{ + echo "Couldnt get session!\n"; + } + */ } function fs_start() { @@ -46,15 +50,15 @@ fs_core_destroy(); } - function fs_log(level_str, msg) { + function fs_log($level_str, $msg) { - fs_console_log(level_str, msg); + fs_console_log($level_str, $msg); } - function fs_log_clean(msg) { + function fs_log_clean($msg) { - fs_console_clean(msg); + fs_console_clean($msg); } @@ -138,7 +142,7 @@ function fs_dial($data, $timelimit){ - return fs_switch_ivr_originate(session, NULL, $data, $timelimit, NULL, NULL, NULL, NULL) + return fs_switch_ivr_originate(session, NULL, $data, $timelimit, NULL, NULL, NULL, NULL); } @@ -159,3 +163,4 @@ } +?> Modified: freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/test.php ============================================================================== --- freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/test.php (original) +++ freeswitch/branches/docelmo/trunk/src/mod/languages/mod_php/test.php Sat Sep 9 02:34:37 2006 @@ -1,10 +1,8 @@ <? +include("classFreeswitch.php"); -include("./freeswitch.php"); +$fs = new fs_class_api; -fs_core_set_globals(); -fs_core_init(""); -fs_loadable_module_init(); -fs_console_loop(); -fs_core_destroy(); +$fs->fs_start(); + ?>
participants (1)
-
Freeswitch SVN