cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2482
Views
0
Helpful
4
Replies

CISCO IP Telephony (Using ATAPI)

dtsdebajyoti
Level 1
Level 1

I need to create an app which will allow Supervisors to Monitor/Coach Agents on CISCO IP phone from server. The app will be in C#. I have tried using ATAPI wrapper, but it can't detect active call in the server. Please let me know what configuration or code is needed for me. Please provide sample code which will satisfy my requirements. Attached is the sample code used by me.

Also please provide sample project in JAVA using JTAPI for the same.

1 Accepted Solution

Accepted Solutions

to get the terminalConnections from an ongoing call, application needs to add a callObserver on the address/terminal.

  CiscoTerminal ciscoTerminal2 = (CiscoTerminal) ciscoAddress2.getTerminals()[0];

  //missing from code
ciscoTerminal2.addCallObserver( <instance of a callObserver>); 

  TerminalConnection terminalConnection = ciscoTerminal2.getTerminalConnections()[0];

  if (terminalConnection.getState() == TerminalConnection.ACTIVE)

  {

View solution in original post

4 Replies 4

amoherek
Cisco Employee
Cisco Employee

Yes I have gone through these links, but didn't find the solution I want. Can anyone modify my sample code for monitor and coach functionality?

Now I am using JTAPI to start a whisper call to the agent 201 from supervison 101. Agent (201) is engaged with 101. I am using the following jave code:

String providerString = "10.225.110.20;login=jtapi_login;passwd=cisco_pwd";

            CiscoJtapiPeer ciscoJtapiPeer = (CiscoJtapiPeer) JtapiPeerFactory.getJtapiPeer(null);

            CiscoProvider ciscoProvider = (CiscoProvider) ciscoJtapiPeer.getProvider(providerString);

           

            ciscoProvider.addObserver(this);

           

            CiscoAddress ciscoAddress = (CiscoAddress) ciscoProvider.getAddress(ExtFromCoach);

            CiscoTerminal ciscoTerminal = (CiscoTerminal) ciscoAddress.getTerminals()[0];

            CiscoAddress ciscoAddress2 = (CiscoAddress) ciscoProvider.getAddress(ExtToCoach);

            CiscoTerminal ciscoTerminal2 = (CiscoTerminal) ciscoAddress2.getTerminals()[0];

           

            TerminalConnection terminalConnection = ciscoTerminal2.getTerminalConnections()[0];

            if (terminalConnection.getState() == TerminalConnection.ACTIVE)

            {

                CiscoCall ciscoCall = (CiscoCall) ((CiscoProvider) ciscoAddress.getProvider()).createCall();

                Connection[] conntections = ciscoCall.startMonitor

                                            (

                                                    ciscoTerminal,

                                                    ciscoAddress,

                                                    terminalConnection,

                                                    CiscoCall.WHISPER_MONITOR,

                                                    CiscoCall.PLAYTONE_NOLOCAL_OR_REMOTE

                                            );

            }

I am not getting any active connections and also no monitoring starts. Please let me know where is the problem with my code.

to get the terminalConnections from an ongoing call, application needs to add a callObserver on the address/terminal.

  CiscoTerminal ciscoTerminal2 = (CiscoTerminal) ciscoAddress2.getTerminals()[0];

  //missing from code
ciscoTerminal2.addCallObserver( <instance of a callObserver>); 

  TerminalConnection terminalConnection = ciscoTerminal2.getTerminalConnections()[0];

  if (terminalConnection.getState() == TerminalConnection.ACTIVE)

  {