Reputation: 1067
I would like understand the data format of Freeswitch ESL library method getBody and also from the ESl how to get the media bugs list on channel issuing the command api uuid_buglist .
My concern is that I can issue the command but how to read the data that comes out is my problem.
Please help.
Upvotes: 2
Views: 911
Reputation: 65
you can see my open source project, it is a auto dial project:
https://github.com/nwaycn/nway_ac
here is plain the message of hangup
con = ESLconnection(fs_ip, fs_esl_port, fs_esl_auth)
if con.connected():
thread.start_new_thread(AutoCall,(1,1))
e = con.events('plain','CHANNEL_HANGUP_COMPLETE')
while True:
ee = con.recvEvent()
#print ee
if ee:
my_number = ee.getHeader('Caller-Caller-ID-Number')
dest_number = ee.getHeader('Caller-Destination-Number')
SetNumberIdle(dest_number)
con.disconnect();
here is to call a phone
def CallOut(dial_string,call_number):
con = ESLconnection(fs_ip, fs_esl_port, fs_esl_auth)
if con.connected():
e = con.api(dial_string)
SetNumberBusy(call_number)
print e.getBody()
else:
print 'not Connected'
con.disconnect();
Upvotes: 0
Reputation: 1198
esl_event_get_body() is a very simple wrapper function that returns event->body
from an event.
To get the reply from your cmd you should use handle.last_sr_event->body
after using esl_send_recv(&handle, cmd)
Upvotes: 0