Hi Nathan, Thanks very much! Could you please provide the 'require "/local/freeswitch/bin/hook-libs.pl";' file to me for review? For PHP or Perl, it's similar for me. much more guidline is much helpful. Thanks! 2014-04-17 sparklezou 发件人:Nathan Neulinger <nneul@mst.edu> 发送时间:2014-04-15 20:48 主题:Re: [Freeswitch-users] [Freeswitch-dev] How to check the "fax_result_code" in the script? such as php script? 收件人:"FreeSWITCH Users Help"<freeswitch-users@lists.freeswitch.org> 抄送: Can't help you on the PHP side, but I do this with sending a fax with perl based web page. If you're wanting to do it inline, I think you'd have to listen for events as you've described... ... push( @args, "fax_notify_address='" . $ENV{REMOTE_USER} . "\@mst.edu'" ); push( @args, "api_hangup_hook='perl /local/freeswitch/bin/notify-fax-status-hook.pl'" ); ... and then the attached script. Key parts: our $env; our $session; my $addr = $session->getVariable("fax_notify_address"); my $to = $session->getVariable("destination_number"); ... my $fax_status = $session->getVariable("fax_success"); my $status_msg = "Sent OK"; if ( $fax_status != 1 ) { $status_msg = "Failed"; } my $result = $session->getVariable("fax_result_text"); On 04/15/2014 01:00 AM, sparklezou wrote:
Hi All, I checked and find two possible solution. But still NOT clear. 1. Run "fs_cli" in PHP script. But NOT find to correct command to show the channel variables. Nor the data for Mod_spandsp. https://wiki.freeswitch.org/wiki/Fs_cli#Simple 2. get info from "Mod event socket". But still NOT very clear how to get the Mod_spandsp event. https://wiki.freeswitch.org/wiki/Mod_event_socket#api https://wiki.freeswitch.org/wiki/Event_Socket_Library#events https://wiki.freeswitch.org/wiki/Event_List#Event-Name https://wiki.freeswitch.org/wiki/Mod_spandsp Please share your idea, how to handle such issue? Hope there is direct way to get the result code, then it will be easy to handle fax step in the script. Thanks! 2014-04-15 ------------------------------------------------------------------------------------------------------------------------ sparklezou ------------------------------------------------------------------------------------------------------------------------ *发件人:*Michael Jerris <mike@jerris.com> *发送时间:*2014-04-14 20:08 *主题:*Re: [Freeswitch-users] How to check the "fax_result_code" in the script? such as php script? *收件人:*"FreeSWITCH Users Help"<freeswitch-users@lists.freeswitch.org> *抄送:* you could use an api hangup hook, or possibly do it in cdr processing.
On Apr 10, 2014, at 10:39 PM, sparklezou <sparklezou@163.com <mailto:sparklezou@163.com>> wrote:
Hi Buddies, Reviewed the wiki,https://wiki.freeswitch.org/wiki/Mod_spandsp How to check the "fax_result_code" in the php script? Also other result info, such as*fax_result_text,*then could provide more detail response info to the client. Thanks! 2014-03-03 ------------------------------------------------------------------------------------------------------------------------ sparklezou _________________________________________________________________________
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect