Skip to Content
0

Outbound call CTI - any examples?

Jun 29, 2017 at 12:04 PM

76

avatar image

Hi team,

we are having an opportunity that needs CTI adapter for Outbound calls, but throughout all the ducuments I've seen, there is no example of how is the dialout class coded.

Is there any example so I can understand how "the logic" is turning into code?

I do have a coding background, but I do not know what the class needs to be declared, before the call goes out of C4C.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Christoforos Verras
Jul 05, 2017 at 10:12 AM
0

Wow, thank you for this !

So, I will contact you to tell me what are the necessary information that the customer needs to provide me for the implementation.

BR,
.CV

Show 1 Share
10 |10000 characters needed characters left characters exceeded

You are Welcome. My email is zoran.galijanic@glagolitico.hr

If you find this answer helpful please mark this answer as accepted.

0
Zoran Galijanic Jul 05, 2017 at 08:42 AM
0

Hi,

You should download CODCTCON1405SP00_0-20012367.EXE from sap support area. This is C# solution where you should implement "dialOut" method.

Please contact me again (linkedin or email) if you have any questions with CTI outbound since I have experience with this and know all issues that you may face during this implementation of outbound call.

br,

Zoran

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Zoran,

what I am asking here is an example of how is this outbound method is implemented.
I need that, so I can estimate the effort.

I searched all over, but I couldn't find a sample of code

BR,
.CV

0
Zoran Galijanic Jul 05, 2017 at 10:06 AM
0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
using System.Runtime.InteropServices;

namespace SAP.COD.CTI.Connector
{
    public class OutboundCallHandler
    {
        Logger logUtil;
//Add constructor to initiate logging
        public OutboundCallHandler()
        {
            logUtil = new Logger();
        }
        //Destructor
        ~OutboundCallHandler()
        {
            logUtil.Close(); 
        }
        public bool dialOut(string dialData)
        {
        logUtil.writeLog("Dialed number: " + dialData);
	logUtil.writeLog("I am here in CTI outbound call " );
	sendInboundCall(dialData);
	return true;
        }
	public void sendInboundCall(string firstNumber)
		{
	var url = $<a href="http://localhost:36726/?CID=CISCO9876∾tion_code=CALL_CONNECTED&ANI={firstNumber}">http://localhost:36726/?CID=CISCO9876∾tion_code=CALL_CONNECTED&ANI={firstNumber}</a>;			HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
	myReq.BeginGetResponse(new AsyncCallback(FinishWebRequest), myReq);
		}
	static void FinishWebRequest(IAsyncResult result)
		{
		try
		{
HttpWebResponse response = (HttpWebResponse)(result.AsyncState as HttpWebRequest).EndGetResponse(result);
using (StreamReader SR = new StreamReader(response.GetResponseStream()))
				{
				var responseString = SR.ReadToEnd();
				Console.WriteLine(responseString);

				Console.WriteLine("Success!!!");
				}
			}
			catch
			{
				Console.WriteLine("Communication error!!!");
			}
		}
	}
}

Logger class is part of solution which I mention above.

As I mention there are a lots of things to make outbound call work. Please contact me directly if you need some help for this.

This example is sending data to CISCO custom listener

Share
10 |10000 characters needed characters left characters exceeded