Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: cavagnaro on September 21, 2007, 10:13:13 PM
-
Hi guys,
One question,
I'm trying to implement the Cancel of a record from a Third Party App as this will be executed by a system guy who doesn't have a genesys DN or anything.
What do i need to create on CME for this? I say this because documentation asks for a AppID, can I use the OCS one?
Does anybody has a VB or C example that worked? I'm monitoring the COMMDN and i believe this should work.
Thanks
-
I have been testing this code:
My DN is COMMDN
GSW_CM_AttrOriginAppID is the AppID of the OCS
[code]
Dim myEventInfo1 As TEventInfo
Dim myList1 As CTKVList
Dim myPair1 As CTKVPair
Set myEventInfo1 = CreateObject("DesktopToolkitX.TEventInfo")
Set myList1 = CreateObject("TCommObj.CTKVList")
Set myPair1 = CreateObject("TCommObj.CTKVPair")
myPair1.Key = "GSW_CM_MessageType"
myPair1.Type = CKVTypeNum
myPair1.NumValue = 30
myList1.AddHead myPair1
myPair1.Key = "GSW_CM_AttrOriginAppID"
myPair1.Type = CKVTypeNum
myPair1.NumValue = appID
myList1.AddHead myPair1
myPair1.Key = "GSW_CM_AttrTargetAppID"
myPair1.Type = CKVTypeNum
myPair1.NumValue = 0
myList1.AddHead myPair1
Dim myList2 As CTKVList
Dim myPair2 As CTKVPair
Set myList2 = CreateObject("TCommObj.CTKVList")
Set myPair2 = CreateObject("TCommObj.CTKVPair")
myPair2.Key = "cancel_record"
myPair2.Type = CKVTypeList
Dim myList3 As CTKVList
Dim myPair3 As CTKVPair
Set myList3 = CreateObject("TCommObj.CTKVList")
Set myPair3 = CreateObject("TCommObj.CTKVPair")
myPair3.Key = "GSW_PHONE"
myPair3.Type = CKVTypeString
myPair3.StringValue = Trim(txtTelefono.Text)
myList3.AddHead myPair3
myPair3.Key = "GSW_CAMPAIGN_NAME"
myPair3.Type = CKVTypeString
myPair3.StringValue = txtCampana.Text
myList3.AddHead myPair3
myPair2.ListValue = myList3
myList2.AddHead myPair2
myPair1.Key = "GSW_CM_AttrProperties"
myPair1.Type = CKVTypeList
myPair1.ListValue = myList2
myList1.AddHead myPair1
Set myEventInfo1.UserData = myList1
myEventInfo1.ThisDN = TExtension1.TDN
TExtension1.TSendUserEvent myEventInfo1
Set myEventInfo1 = Nothing
Set myList1 = Nothing
Set myPair1 = Nothing
'Set myeventinfo2 = Nothing
Set myList2 = Nothing
Set myPair2 = Nothing
'Set myeventinfo3 = Nothing
Set myList3 = Nothing
Set myPair3 = Nothing
[/code]
But this doesn't seem to work at all...
Any ideas why? What am i missing?
-
Hi,
There is small excerpt in OCS documentation "OCS accepts only those API requests that come from the following sources:
• Third-party servers included in the OCS Connections tab
• Third-party applications that include the OCS application object in their
Connection tabs.
All other requests are omitted."
Try creating dummy application and connect it to OCS and use its (ThirdPartyApp id in OriginAppId) - this should work or try using appId of OCM ( not tested ).
Regards
Paul
-
Oh interesting. Thanks for the pointing. Will try ASAP and let you know :)
-
;D Just to let you know that the code worked perfectly after the creation of the application