abbaddon223
Registered User.
- Local time
- Yesterday, 20:26
- Joined
- Mar 13, 2010
- Messages
- 162
Hi,
I'm hoping there is a Guru who can help please?
The below is some code I am using to pass the phone number from an MSDB into a VOIP switch. This then dials the agents SIP phone, when they answer this it then calls the phone number passed to the switch. All good.
What I'm trying to find is the code that would cancel the process. IE: if when the call to the customer is made it jsut rings out, rather than the agent hanging up from the SIP phone, they just click a command on screen. Likewise if the customer has answered and we need to terminate the call, we can do this.
Many thanks in advance for any help!!!
Private Sub Command87_Click()
Dim ie As New InternetExplorer
Dim htmldoc As HTMLDocument
Dim number As String
Dim res As String
Dim contact_name As String
Dim agent As String
Dim extension As String
Dim url As String
Dim acct, pass As String
agent = Form_Frm_User_Select.Combo_UserSelect.Value
Select Case agent
Case "Glenn Clarke"
extension = "001"
acct = "Business001"
pass = "abQH0CYbX"
Case "Aamir Faiz"
extension = "002"
acct = "Business002"
pass = "pzuQ3sTfT"
Case "Kieran Gilbert"
extension = "003"
acct = "Business003"
pass = "Ws6Ywf8rf"
Case "Jack Chafer"
extension = "006"
acct = "test006"
pass = "key123"
End Select
number = Replace(Me.ContactNumber, " ", "")
number = Replace(number, "-", "")
contact_name = Me.ContactName
url = "https://contact-pro6.co.uk/callapi/251/Call/MakeCall?" + _
"Account=" & acct & _
"&PassPlain=" & pass & _
"&ExtensionAccount=0367*" + extension + _
"&FromNumber[]=0367*" + extension + _
"&PhoneNumberToCall=" + number + _
"&CallerIDName=" + contact_name + _
"&CallerIDNumber=" + number
ie.Visible = False
ie.navigate url
Do
DoEvents
Loop Until ie.readyState = READYSTATE_COMPLETE
Set htmldoc = ie.Document
'do some debug with the result in the HTMLDoc.
'res = htmldoc.documentElement.innerHTML
'Debug.Print (res)
ie.Quit
[CallStart].Value = Time()
End Sub
I'm hoping there is a Guru who can help please?
The below is some code I am using to pass the phone number from an MSDB into a VOIP switch. This then dials the agents SIP phone, when they answer this it then calls the phone number passed to the switch. All good.
What I'm trying to find is the code that would cancel the process. IE: if when the call to the customer is made it jsut rings out, rather than the agent hanging up from the SIP phone, they just click a command on screen. Likewise if the customer has answered and we need to terminate the call, we can do this.
Many thanks in advance for any help!!!
Private Sub Command87_Click()
Dim ie As New InternetExplorer
Dim htmldoc As HTMLDocument
Dim number As String
Dim res As String
Dim contact_name As String
Dim agent As String
Dim extension As String
Dim url As String
Dim acct, pass As String
agent = Form_Frm_User_Select.Combo_UserSelect.Value
Select Case agent
Case "Glenn Clarke"
extension = "001"
acct = "Business001"
pass = "abQH0CYbX"
Case "Aamir Faiz"
extension = "002"
acct = "Business002"
pass = "pzuQ3sTfT"
Case "Kieran Gilbert"
extension = "003"
acct = "Business003"
pass = "Ws6Ywf8rf"
Case "Jack Chafer"
extension = "006"
acct = "test006"
pass = "key123"
End Select
number = Replace(Me.ContactNumber, " ", "")
number = Replace(number, "-", "")
contact_name = Me.ContactName
url = "https://contact-pro6.co.uk/callapi/251/Call/MakeCall?" + _
"Account=" & acct & _
"&PassPlain=" & pass & _
"&ExtensionAccount=0367*" + extension + _
"&FromNumber[]=0367*" + extension + _
"&PhoneNumberToCall=" + number + _
"&CallerIDName=" + contact_name + _
"&CallerIDNumber=" + number
ie.Visible = False
ie.navigate url
Do
DoEvents
Loop Until ie.readyState = READYSTATE_COMPLETE
Set htmldoc = ie.Document
'do some debug with the result in the HTMLDoc.
'res = htmldoc.documentElement.innerHTML
'Debug.Print (res)
ie.Quit
[CallStart].Value = Time()
End Sub