Mod php
From FreeSWITCH Wiki
Current Status
This module has been put into the unmaintained category. Python was completly rewritten from scratch in C++ and its likely some of that code will be made available to the new mod_php project. This will also provide a more uniform object interface to FreeSWITCH™
from freeswitch-dev: The most I (Brian Fertig) can say right now is its coming. I am working on python, ruby, and php all at the same time so they can be released all at the same time. I wouldn't recommend using it right now as it shuts down FreeSwitch when you execute a php script. When I have it finally working. I will release a email on it.
Setup Guide
To call a PHP application you should probably be familiar with the Dialplan. However you simply call it as an application similar to:
* <action application="php" data="/path/to/some/script.php"/>
You would put this in your 'dialplan' if using the XML dialplan module with freeswitch. Dont forget your 'condition' tags and all that goodness.
Following are some functions:
* fs_channel_answer - Answer's the channel * fs_channel_pre_answer - Establish the media path and send early media * fs_channel_hangup - Hangup the channel * fs_channel_set_variable - Set a channel variable * fs_channel_get_variable - Retrieve a channel variable * fs_channel_set_state - Set a channel state * fs_ivr_play_file - Play a file * fs_switch_ivr_record_file - Record a file * fs_switch_ivr_sleep - Wait for some duration in milliseconds * fs_ivr_play_file2 - Play a file * fs_switch_ivr_collect_digits_callback - Collect Digits and call back * fs_switch_ivr_collect_digits_count - Call DTMF digits * fs_switch_ivr_multi_threaded_bridge - Bridge a call already in progress (3+way) * fs_switch_ivr_originate - Dial a call * fs_switch_ivr_session_transfer - Transfer a call * fs_switch_ivr_speak_text - Text to speech
