The Voicent Visual Basic IVR module contains the following functions:
String CallIvr(ByVal phoneno As String, ByVal appname As String, ByVal selfdelete As Boolean)
Dim reqId As string = CallIvr("123-4567", "reminderApp", 1)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
String CallStatus(ByVal reqId As String, ByRef responses As)
Dim status As String = CallStatus("11234035434", responses)
----------------
File Voicent.vb:
----------------
Imports System
Imports System.Net
Imports System.IO
Public Class Voicent
...
Public Function CallIvr(ByVal
phoneno As String, ByVal appname As String, ByVal selfdelete As
Boolean)
Dim urlstr As String = "/ocall/callreqHandler.jsp"
' setting the http post string
Dim poststr As String = "info=Simple Text Call " + phoneno
poststr += "&phoneno=" + phoneno
poststr += "&firstocc=10"
poststr += "&selfdelete="
If (selfdelete) Then
poststr += "1"
Else
poststr += "0"
End If
poststr += "&startapp=" + appname
' Send Call Request
Dim rcstr As String = PostToGateway(urlstr, poststr)
Return GetRequestID(rcstr)
End Function
Public Function CallStatus(ByVal
reqID, ByRef responses)
' call status url
Dim urlstr As String = "/ocall/callstatusHandler.jsp"
Dim poststr As String
poststr = "reqid=" + reqID
' Send Call Request
Dim rcstr As String = PostToGateway(urlstr, poststr)
' the responses is the 9th field
' the call status is the 3rd field
...
End Function
...
End Class