Re: TAPI 3.0 call attached data

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Jul 12, 8:00 pm, "Matthias Moetje [MVP]"
<moetje@xxxxxxxxxxxxxxxxxxx> wrote:
Deepak,

which data do you want to fetch? Please clarifiy!
Actually i m building a "call center" application.

I want to fetch "call attached data".

Before you can fetch data you need to put some data into
CIB_CALLDATABUFFER...
What exactly does not work? Please show your code!

Best regards,

Matthias Moetje
-------------------------------------
TERASENS GmbH
Augustenstraße 24
80333 Munich, GERMANY
-------------------------------------
Fon: +49 89 143370-0
Fax: +49 89 143370-22
e-mail: moetje at terasens dot com
www: www.terasens.com
-------------------------------------





My TSP is sending data in xml format.

we are not capturing DTMF digits



<!-- XDT: CAD
v1.0 -->
<!-- Call Attached
Data -->
<!-- http://zultys.com/DTD/ADS_1-0.dtd
-->
<!-- File
"CAD_1-0.dtd" -->
<!-- Copyright 2006 Zultys
Technologies -->

<!ELEMENT CallAttachedData
(element*) >
<!ELEMENT element (#PCDATA|element|
error)* >
<!ELEMENT error
(code,description) >
<!ELEMENT code
(#PCDATA) >
<!ELEMENT description
(#PCDATA) >

<!ATTLIST CallAttachedData
version CDATA #FIXED "1.0"
callID CDATA #REQUIRED
timestamp CDATA
#REQUIRED >

<!ATTLIST element
key CDATA #REQUIRED
type (bool|byte|word|long|string|datalist)
"string" >





my CODE as below




Public Class Form1



Dim gobjTapi As TAPI3Lib.TAPI

Dim WithEvents TobjWithEvent As TAPI3Lib.TAPI

Dim pCall As TAPI3Lib.ITCallInfo

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

' Set error handling routine

' On Error GoTo MyErrorRoutine

'Usually declared globally

Dim gobjAddress As TAPI3Lib.ITAddress

Dim objCrtAddress As TAPI3Lib.ITAddress

Dim objMediaSupport As TAPI3Lib.ITAddress

Dim objAddressCapabilities As TAPI3Lib.ITAddress

Dim objCollAddresses As TAPI3Lib.ITCollection

Dim bFound As Boolean

Dim fowner As Boolean

Dim fmonitor As Boolean

Dim indexAddr As Integer

Dim selectedIndexAddr As Integer

Dim strDialableAddress As String

Dim strAddressName As String

Dim lcallbackinstance As Integer

Dim lmediaType As Integer

Dim objregistrationtoken As Integer

Const TAPI3_CALL_EVENTS As Integer =
TAPI3Lib.TAPI_EVENT.TE_CALLMEDIA Or
TAPI3Lib.TAPI_EVENT.TE_CALLNOTIFICATION Or
TAPI3Lib.TAPI_EVENT.TE_CALLSTATE



'Usually performed during form load


'Create the tapi object.

gobjTapi = New TAPI3Lib.TAPI



'Call Initialize before calling any other TAPI function.

Call gobjTapi.Initialize()


' Set error handling routine

' On Error GoTo MyErrorRoutine

'pick up the collection of Address objects

objCollAddresses = gobjTapi.Addresses



'find address that supports the desired type, nSelectedType

bFound = False

For indexAddr = 1 To objCollAddresses.Count

objCrtAddress = objCollAddresses.Item(indexAddr)

objMediaSupport = objCrtAddress

objAddressCapabilities = objCrtAddress

strAddressName = objMediaSupport.AddressName

'If objMediaSupport.ServiceProviderName = "MXTSP.tsp" Then

'If strAddressName = "TOSHIBA Software Modem" Then

If strAddressName = "Zultys MX Line" Then

strDialableAddress = objMediaSupport.DialableAddress

bFound = True

selectedIndexAddr = indexAddr

End If

objAddressCapabilities = Nothing

objMediaSupport = Nothing

objCrtAddress = Nothing

If bFound = True Then Exit For

Next indexAddr

gobjAddress = objCollAddresses.Item(selectedIndexAddr)

'If no errors occurred, gobjAddress is now a usable address.

'REGISTER

TobjWithEvent = gobjTapi

TobjWithEvent.EventFilter = TAPI3_CALL_EVENTS

fowner = True : fmonitor = True

lcallbackinstance = 1

lmediaType = TAPI3Lib.TapiConstants.TAPIMEDIATYPE_AUDIO



objregistrationtoken =
TobjWithEvent.RegisterCallNotifications(gobjAddress, fmonitor, fowner,
lmediaType, lcallbackinstance)

MsgBox("Registration Token: " & objregistrationtoken,
MsgBoxStyle.Information, "Registration Intimation")

End Sub

Private Sub TobjWithEvent_Event(ByVal TapiEvent As
TAPI3Lib.TAPI_EVENT, ByVal pEvent As Object) Handles
TobjWithEvent.Event



Dim objCallNotificationEvent As
TAPI3Lib.ITCallNotificationEvent

Dim objCallInfo As TAPI3Lib.ITCallInfo







Try

If TapiEvent = TAPI3Lib.TAPI_EVENT.TE_CALLNOTIFICATION
Then

MsgBox("There's an Incoming call", , "Incoming Call")
objCallNotificationEvent = CType(pEvent,
TAPI3Lib.ITCallNotificationEvent)


'ITCallInfo Object
objCallInfo = CType(objCallNotificationEvent.Call,
TAPI3Lib.ITCallInfo)
MsgBox("CallerID Name: " &
objCallInfo.CallInfoString(TAPI3Lib.CALLINFO_STRING.CIS_CALLERIDNUMBER), ,
"Call Notification")

End If

Catch ex As Exception

MsgBox(ex.ToString)

End Try

End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

End Sub


End Class



Please advice me.



.


Quantcast