Hi ysu,
Yes, basically I have some vb code that I need to convert to PHP. This vb code is for communicating with a call center basically so I can setup some outbound calls. I have to admit I haven't worked with SOAP before, but I've done this kind of setup before with XML. Below is some of the vb code, I don't know if it'll help at all, but any guidance on how to set this up in PHP would be a tremendous help. Thank you very much!
Login API
Dim Email, Pin, Token As String
Dim Tokencreatedtime, Tokenexpirationtime As String
Dim Response As New Outbound.loginResponse
Dim loginobject As New Outbound.login
Dim WebServiceCall As New Outbound.OutboundCallService
Email = “Enter your beta email here”
Pin = “Enter your account PIN”
loginobject.email = Email
loginobject.pin = Pin
Response = WebServiceCall.login(loginobject)
Token = Response.result.token
Tokencreatedtime = Response.result.createdTime
Tokenexpirationtime = Response.result.expirationTime
Place Call API
Dim SiteNumber As String
Dim MaxWait As Integer
Dim PhoneNumbers(2) As String
Dim GeneratedToken As String
SiteNumber = “Enter Your Voice Site Number”
MaxWait = 0
PhoneNumbers(0) = “1231231234”
PhoneNumbers(1) = “9876543210”
GeneratedToken = “Enter your token here which you got from the Login Response”
Dim WebServiceCall As New Outbound.OutboundCallService
Dim placecallresponse() As Outbound.CallIDentifier
Dim placecallobject As New Outbound.placeCall
Dim CallItemObject As New Outbound.CallItem
Dim myvariables(1) As Outbound.OutboundVariable
Dim v1 As New WSDL2.Outbound.OutboundVariable
v1.name = “Enter the variable name”
v1.value = “Enter the variable value
myvariables(0) = v1
CallItemObject.siteNumber = SiteNumber
CallItemObject.phoneNumbers = PhoneNumbers
CallItemObject.maxWaitTime = MaxWait
CallItemObject.variables = myvariables
placecallobject.callItem = CallItemObject
placecallobject.token = GeneratedToken
placecallresponse = WebServiceCall.placeCall(placecallobject)
Dim I As Integer
Dim Max As Integer
Dim phonetext As String
Dim GUIDtext, GUIDtext2 As String
Max = placecallresponse.Length - 1
For I = 0 To Max
phonetext = phonetext + placecallresponse(I).phoneNumber
GUIDtext = GUIDtext + placecallresponse(I).outboundCallGUID
Next
Get Status API
Dim GeneratedToken As String
Dim outcallguid(2) As String
Dim temp As String
Dim getstatusobject As New Outbound.getStatus
Dim getstatusresponse() As Outbound.OutboundCallStatus
Dim WebServiceCall As New Outbound.OutboundCallService
Outcallguid(0) = “First Outbound Call Guid that you want to get status of”
Outcallguid(1) = “Second Outbound Call Guid that you want to get status of”
GeneratedToken = “Enter the token which you got from Login API”
getstatusobject.callGUIDs = outcallguid
getstatusobject.token = GeneratedToken
Dim I, K As Integer
Dim Maxcallstatus, MaxStatusItem As Integer
Dim statustext As String
getstatusresponse = WebServiceCall.getStatus(getstatusobject)
Maxcallstatus = getstatusresponse.Length - 1
For I = 0 To Maxcallstatus
statustext = statustext + "outboundcallGUID : " + getstatusresponse(I).callIDentifier.outboundCallGUID + " "
statustext = statustext + "PhoneNumber : " + getstatusresponse(I).callIDentifier.phoneNumber + " "
MaxStatusItem = getstatusresponse(I).statusItems.Length - 1
For K = 0 To MaxStatusItem
statustext = statustext + "GUID : " + getstatusresponse(I).statusItems(K).callGUID + " "
statustext = statustext + "status : " + getstatusresponse(I).statusItems(K).status + " "
statustext = statustext + "message : " + getstatusresponse(I).statusItems(K).message + " "
statustext = statustext + "start time : " + getstatusresponse(I).statusItems(K).startTime + " "
statustext = statustext + "end time : " + getstatusresponse(I).statusItems(K).endTime + " "
Next
Next