The Voicent Python IVR module contains the following functions:
callIvr(phoneno, appname, selfdelete)
reqId = callIvr("123-4567", "reminderApp", "0")Make a call to phone number '123-4567' and use 'reminderApp' on the gateway for call interaction. You can use CallStatus to get the call status and responses, or use CallRemove to remove the call record.
callStatus(reqId, responses)
status = callStatus("11234035434", responses)
import urllib
import time
class Voicent:
...
def callIvr(self, phoneno, appname, selfdelete):
urlstr = "/ocall/callreqHandler.jsp"
param = {'info' : 'simple text call',
'phoneno'
: phoneno,
'firstocc'
: 10,
'startapp' : appname,
'selfdelete'
: selfdelete}
rcstr = self.postToGateway(urlstr, param)
return self.getReqId(rcstr)
def callStatus(self, reqId, responses):
urlstr = "/ocall/callstatusHandler.jsp"
param = {'reqid' : reqId}
rcstr = self.postToGateway(urlstr, param)
// the responses is the 9th field
// the status is the 3rd field
...