Genesys CTI User Forum
		Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: Franklin Garzón on October 25, 2007, 02:58:32 PM
		
			
			- 
				Hi people, I have a problem with the chain records, if you can helpme thanks.
I have the following recors on the database.
chain_id    chain_n  phone
1              0           1234 
1              1           1255
1              2           1266
2              3           9652
The campaign mode is preview.
This is the code for take the records.
***************** (this function perfect, and I get the phone)
                Dim OUTUD As CTKVList
                Set OUTUD = New CTKVList
                
                Dim OUTP As CTKVPair
                Set OUTP = New CTKVPair
                
                OUTP.key = "GSW_AGENT_REQ_TYPE"
                OUTP.Type = CKVTypeString
                OUTP.StringValue = "PreviewRecordRequest" 
                OUTUD.AddTail OUTP
                
                OUTP.key = "GSW_APPLICATION_ID"
                OUTP.Type = CKVTypeNum
                OUTP.NumValue = PublicCTKVList.Get(4).NumValue
                OUTUD.AddTail OUTP
                
                OUTP.key = "GSW_CAMPAIGN_NAME"
                OUTP.Type = CKVTypeString
                OUTP.StringValue = PublicCTKVList.Get(1).StringValue
                OUTUD.AddTail OUTP
                
                'OUTUD.Insert 0, OUTP
                Dim EVENI As TEventInfo
                Set EVENI = New TEventInfo
                EVENI.UserData = OUTUD
                Me.TExtension1.TSendUserEvent EVENI
*********** (this code take any problem, this code I use for the next chain phone, but no found, the firs request from ocs is the eventtype=138 but the second request from ocs es 96 and the description is: "Invalid Request Data")
   Dim OUTUD As CTKVList
    Set OUTUD = New CTKVList
    
    Dim OUTP As CTKVPair
    Set OUTP = New CTKVPair
    
    OUTP.key = "GSW_AGENT_REQ_TYPE"
    OUTP.Type = CKVTypeString
    OUTP.StringValue = "ChainedRecordRequest"
    OUTUD.AddTail OUTP
    
    OUTP.key = "GSW_APPLICATION_ID"
    OUTP.Type = CKVTypeNum
    OUTP.NumValue = 133
    OUTUD.AddTail OUTP
       
    OUTP.key = "GSW_CAMPAIGN_NAME"
    OUTP.Type = CKVTypeString
    OUTP.StringValue = "Campaign_outbound_test_115"
    OUTUD.AddTail OUTP 
       
    Dim i As Integer
    Dim gswRH As String
    For i = 0 To PublicCTKVListCallNow.GetCount()
        If PublicCTKVListCallNow.Get(i).key = "GSW_RECORD_HANDLE" Then
            gswRH = PublicCTKVListCallNow.Get(i).NumValue
        End If
        
    Next
       
    OUTP.key = "GSW_RECORD_HANDLE"
    OUTP.Type = CKVTypeNum
    OUTP.StringValue = gswRH
    OUTUD.AddTail OUTP
    
    Dim EVENI As TEventInfo
    Set EVENI = New TEventInfo
    EVENI.UserData = OUTUD
    Me.TExtension1.TSendUserEvent EVENI
You know if I need any code for a correct request from ocs? 
Thanks.