freeswitch/libs/esl/python/single_command.py
Anthony Minessale c015af04d3 LIBDING-13
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12612 d0543943-73ff-0310-b7d9-9358b9ac24b2
2009-03-15 16:56:15 +00:00

23 lines
326 B
Python

#!/usr/bin/env python
import string
import sys
from ESL import *
con = ESLconnection("localhost","8021","rad1ance")
#are we connected?
if con.connected:
#get argument passed to script
command = string.join(sys.argv[1:])
#run command
e=con.sendRecv("api "+ command)
print e.getBody()
else:
print "Not Connected"