FreeSWITCH includes a built-in web server that allows you to access data and issue commands. It also allows for the building of browser-based applications, such as the sample voicemail and telecast applications. (See Sample Applications below.)
By default the server listens on port 8080. The authentication parameters are specified in xml_rpc.conf.xml and the listening port can be changed as well.
Allows user to view his or her voicemails. Log in to web page with same username and password as the phone. The built-in MP3 player only works if the voicemail messages are recorded at 11kHz. Otherwise the user can click to download or play each message.
The telecast interface shows a list of calls currently in progress. Links allow the user to click-and-listen in MP3 or M3U (e.g. iTunes) formats.
You can use one of three methods to call the web server:
- webapi - "webbish" way of getting data
- txtapi - raw text return
- api - somewhere in between
- xmlapi - return XML doc instead of HTML
The best way to see the differences between each is to try them with the help command.
Try each of these with your browser. Replace "fs.ip" with your FreeSWITCH IP or host name:
http://18.104.22.168:8080/webapi/command?arg1 arg2 arg3
http://22.214.171.124:8080/txtapi/command?arg1 arg2 arg3
http://126.96.36.199:8080/api/command?arg1 arg2 arg3
http://188.8.131.52:8080/xmlapi/command?arg1 arg2 arg3