Administration XML Developer Forums

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
VB.Net code needed
web dialer vb.net source code dial phone from the pc .net application dial from the pc call from browser
Answer
6/20/12 2:17 PM
Dear All,
 
   Thank in advance,
 
   I am developing an application on Vb.Net platform. this application has an option to dial number from the database. we are using Cisco telephone, I'll appriciate you If anybody can help to meet the requirement. I am wondering last few days to find  solution. I don't know How can I achieve it. please send me sample code or any documents to do the same.
 
  I am so tired because of searching solution. please help me.

If you're just concerned with the dialing part, there are several APIs available to do this (ordered approximately by complexityemoticon
 
Webdialer - http://developer.cisco.com/web/webdialer/home
IP Phone Services (Dial:xxx URI) - http://developer.cisco.com/web/ipps/home
TAPI/JTAPI - http://developer.cisco.com/web/tapi/home or http://developer.cisco.com/web/jtapi/home
 
Webdialer has SOAP-based API, which should be quite suitable for VB.net development.

I made a speed dial app that our employees use to store/read/modify contact telephone numbers in an sql database. You can find a contact and dial that number basically.

I used webdialer and it was pretttty simple for the most part. I had to make sure to use this block of code because of https and me not having a cert on the cucm:

Public Class MyPolicy
Implements ICertificatePolicy

Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, _
ByVal cert As X509Certificate, ByVal request As WebRequest, _
ByVal certificateProblem As Integer) _
As Boolean Implements ICertificatePolicy.CheckValidationResult
'Return True to force the certificate to be accepted.
Return True
End Function

Also some more code that makes the magic happen:

Public Function MakeCall(ByVal extToDial As String) As String

Dim wd As New wdialer.WebdialerSoap
Dim crd As New wdialer.Credential
Dim uf As New wdialer.UserProfile
Dim eUser As String
Dim ePass As String
Dim ueUser As String
Dim uePass As String
Dim eExt As String
Dim ePhoneName As String
Dim ueExt As String
Dim uePhoneName As String

Dim ioFile As New StreamReader("creds.cfg")

eUser = ioFile.ReadLine()
ePass = ioFile.ReadLine()
eExt = ioFile.ReadLine()
ePhoneName = ioFile.ReadLine()

ueUser = StringEncryption.SimpleEncrypt(eUser)
uePass = StringEncryption.SimpleEncrypt(ePass)
ueExt = StringEncryption.SimpleEncrypt(eExt)
uePhoneName = StringEncryption.SimpleEncrypt(ePhoneName)

crd.userID = ueUser
crd.password = uePass
uf.lineNumber = ueExt
uf.deviceName = uePhoneName
uf.user = ueUser
uf.locale = "English"
ioFile.Close()
System.Net.ServicePointManager.CertificatePolicy = New MyPolicy()

wd.makeCallSoap(crd, extToDial, uf)

Return True
End Function

The code isn't too pretty as I have never went back and cleaned it up much. I just keep adding on top of this functionality and it works just fine.

Given the time tomorrow (its 2am eastern) I will strip down the app to its roots and send it to you if you still need it. Some of the stuff that I have above (the creds.cfg stuff and the string encryption things can be done in better ways and are not required. I just didnt want to save their passwords locally in a file in plaintext.

I hope this helps at least in some small way.