mod_event_socket is a tcp based interface to control freeswitch.
the default values are to bind to 127.0.0.1 port 8021 The defualt password is ClueCon
all these settings can be easily changed in the freeswitch.xml config file:
To use manuall
telnet to port 8021
enter "auth ClueCon" to authenticate
from here you can do the following:
event [xml|plain]
- enable or disable events by class or all (plain or xml output format)
noevents
- disable all events that were previously enabled w/ event
nixevent
- command to allow 'events all' followed by 'nixevent ' to do all but 1 type scenerio
log
- Enable log output. Levels same as the console.conf values
nolog
- Disable log output previously enabled by the log command
api
- send an api command (blocking mode)
bgapi
- send an api command (non-blocking mode) this will let you execute a job in
the bg and the result will be sent as an event with an indicated uuid to match the reply to the command)
exit
- close the socket connection
sendevent
- send an event into the event system (multi line input for headers)
sendmsg
- send a message to the call of given uuid (call-command execute or hangup), see examples below
SendMsg
call-command: execute
execute-app-name: playback
execute-app-arg: /tmp/test.wav
SendMsg
call-command: hangup
hangup-cause: normal_clearing
you must follow these one line commands with 2 returns.
valid input:
-------------------------
[ ]
-------------------------
or
-------------------------
[ ]
Header1: Val
HeaderN: Val
-------------------------
In order to control calls using send message, the calls should be sent to the mod_park application, which just leaves the channel sitting
in limbo, allowing you to execute applications on the channel as described above in the SendMsg example.
originate a call directly to park by making an ext the ext part of the originate command &park()
API command reference, partial list
originate [] [] [] [] []
killchan
reloadxml
load
transfer [] []
pause
show [|codec|application|api|dialplan|file|timer|calls|channels]
status
uuid_bridge
fsctl [hupall|pause|resume|shutdown]
conference commands
conference list [delim ]
conference list [delim ]
conference energy []
conference volume_in []
conference volume_out []
conference play []
conference say
conference saymember
conference stop <[current|all]> []
conference kick
conference mute
conference unmute
conference deaf
conference undef
conference relate [nospeak|nohear]
conference lock
conference unlock
conference dial /
conference transfer