mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 14:58:34 +00:00
tcl example thanks Mark Mann
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16307 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
fceb1ffe82
commit
0d2d07d066
2 files changed
+33
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
lappend auto_path .
|
||||
package require esl
|
||||
|
||||
if { $argc < 1 } {
|
||||
puts "Usage: tclsh $argv0 command arg(s)"
|
||||
puts "Example: tclsh $argv0 status"
|
||||
exit
|
||||
}
|
||||
|
||||
#
|
||||
# Open connection to FreeSWITCH ESL
|
||||
# (FreeSWITCH must be running for this to work)
|
||||
#
|
||||
ESLconnection esl {127.0.0.1} 8021 {ClueCon}
|
||||
|
||||
#
|
||||
# Send request (given as args to sendRecv)
|
||||
# Get answer from FreeSWITCH (return value from sendRecv)
|
||||
# Translate reponse to text (getBody command)
|
||||
# Print it (puts)
|
||||
#
|
||||
puts [ESLevent_getBody [esl sendRecv {api status}]]
|
||||
Reference in new issue
Block a user