Open Interfaces CCT SDK_img_0

CCT Open Interfaces SDK

Tutorial 3 B - Create Contact Answer Hold Unhold

1. Introduction. 2

2. Create Contacts, Answer, Hold and UnHold. 2

Description of Tutorial 2

Notes about this tutorial 3

Step 1: Updating the local hosts file. 3

Step 2: Use soapUI to create the WSDL interface. 4

Step 3: Login to the CCT Server. 10

Step 4: Use Session Service to GetTerminals. 12

Step 5: Use Session Service to GetAddresses. 14

Step 6: Use Session Service to CreateContact 16

Step 7: Use Session Service to DropContact 18

Step 8: Use Address Service to Originate. 20

Step 9: Use Terminal Service to Originate, Session Service to HoldContact, UnHoldContact and dropContact 24

Step 10: Use Session Service to CreateContact, Answer and drop. 32

Step 11:  Use Session Service to logOffFromCCTServer. 38

Step 12:  Simple Test to Confirm that the ssoToken has expired. 39

 

 

1. Introduction

This tutorial will demonstrate how to create contacts, answer, hold and un-hold using different services. It uses SoapUI which is a free and open source cross-platform functional testing solution. Following on from the last tutorial which showed the user some of the xml packets that are being sent over the wire, SoapUI allows the user to send modified XML packets to the server and receive responses back without the need to program anything.

 

 

 

2. Create Contacts, Answer, Hold and UnHold

Description of Tutorial

 

This tutorial describes how to utilise the features provided by the SOA CCT Web Services. It demonstrates how to create a contact, answer, hold and unhold it.

The main procedures in this tutorial are:

Step1: Updating the local hosts file  

Step 2: Use soapUI to create the WSDL interface  

Step 3: Login to the CCT Server  

Step 4: Use Session Service to GetTerminals  

Step 5: Use Session Service to GetAddresses  

Step 6: Use Session Service to CreateContact  

Step 7: Use Session Service to DropContact

Step 8: Use Address Service to Originate

Step 9: Use Terminal Service to Originate, Session Service to HoldContact, UnHoldContact and dropContact

Step 10: Use Session Service to CreateContact, Answer and drop

Step 11: Use Session Service to logOffFromCCTServer

Step 12: Simple Test to Confirm that the ssoToken has expired

This tutorial utilises the Session Service, Address Service and the Terminal Service to demonstrate this functionality. We will use a program called soapUI to send and receive SOAP requests and responses.

Notes about this tutorial

The SOA Web Services must be installed and running on an available server

You must determine exactly where or how you want to implement the example code shown in these tutorials in your own application.

To instigate events being received by the consumers, CCT Ref client can be used to login and logout agents, agents going ready/not ready, creating contacts, answer, hold and unhold those contacts.

This tutorial uses a program called soapUI 4.5.1 2.05 to send and receive SOAP requests and responses.

 

 

 

 

Step 1: Updating the local hosts file

 

1.      Open up the hosts file and map the host name of your server to an IP address

 

 

 

Step 2: Use soapUI to create the WSDL interface

 

2.      Start soapUI

3.      Create a new soapUI project

 

 

4.      Enter in a project name.

5.      Enter in the Session service WSDL/WADL location.

6.      Click OK

7.      This will generate a WSDL interface for the Session Service

8.      Right click on the project you just created

9.      Add a WSDL

10.  Enter in the location for the Address service and click OK

11.  This will generate the WSDL interface for the Address service.

12.  Right click on the project again

13.  Add a WSDL again

14.  Enter in the location for the Terminal Service

 

15.  This will generate the WSDL interface for the Terminal Service.

 

 

 

Step 3: Login to the CCT Server

 

1.      Expand the Session Service WSDL interface

2.      Right Click on the function ‘LogInToCCTServer’

 

3.      Create a new request for the method LogInToCCTServer in the Session Service.

4.      Specify a name for the request

5.      A new XML template is generated

                       

6.      Replace the ‘?’ characters with the relevant information

7.      Click the green arrow button to send your request

8.      This will send and receive your request and response. You will be returned a LogInToCCTServerResponse.

9.      Take note of the returned ssoToken

 

 

 

 

Step 4: Use Session Service to GetTerminals

                       

1.      Create a new request for the method GetTerminals in the Session Service.     

2.      Populate the ssoToken field with the sooToken.

3.      Click the green arrow button to send your request. You will be returned a GetTerminalsResponse.

4.      Take note of the terminals with a PASSIVE provider name in the response. There are 2 passive terminals being returned with a PASSIVE provider in this response:

o    8381041 TerminalA

o    8381048 TerminalB

 

 

 

 

Step 5: Use Session Service to GetAddresses

                       

1.      Create a new request for the method GetAddresses in the Session Service.

2.      Populate the ssoToken field with the sooToken.

3.      Click the green arrow button to send your request. You will be returned a GetAddressesResponse.

4.      Take note of the addresses with a PASSIVE provider name in the response. There are 2 passive addresses being returned with a PASSIVE provider in this response:

o    Sip:8381041@sipccocs.com AddressA

o    Sip:8381048@sipccocs.com AddressB

 

 

 

Step 6: Use Session Service to CreateContact       

           

1.      Create a new request for the method CreateContact in the Session Service.

2.      Populate the ssoToken field with the sooToken

3.      Populate the terminal element with the details of TerminalA

4.      Populate the srcAddress element with the details of AddressA

5.      Populate the dstAddress element with the details of AddressB

6.      Click the green arrow button to send your request

7.      You will be returned a CreateContactResponse. Take note of the returned Contact1

 

 

 

 

Step 7: Use Session Service to DropContact

 

1.      Create a new request for the method DropContact in the Session Service.

2.      Populate the ssoToken field with the sooToken

3.      Populate the terminal element with the details of TerminalA

4.      Populate the contact element with the details of Contact1

5.      Click the green arrow button to send your request. Nothing is returned.

 

 

 

Step 8: Use Address Service to Originate

 

1.      Create a new request for the method Originate in the Address Service.

 

2.      Populate the ssoToken field with the sooToken

3.      Populate the address element with the details of AddressA

4.      Populate the terminal element with the details of TerminalA

5.      Populate the destinationAddress element with the addressName of AddressB

6.      Click the green arrow button to send your request

7.      You will be returned a OriginateResponse. Take note of the returned Contact2

 

 

8.      Create a new request for the method DropContact in the Session Service.

 

9.      Populate the ssoToken field with the sooToken

10.  Populate the terminal element with the details of TerminalA

11.  Populate the contact element with the details of Contact2

12.  Click the green arrow button to send your request. Nothing is returned.

 

 

 

 

Step 9: Use Terminal Service to Originate, Session Service to HoldContact, UnHoldContact and dropContact

 

1.      Create a new request for the method Originate in the Terminal Service.

 

2.      Populate the ssoToken field with the sooToken

3.      Populate the terminal element with the details of TerminalA

4.      Populate the address element with the details of AddressA

5.      Populate the destinationAddress element with the addressName of AddressB

6.      Click the green arrow button to send your request

7.      You will be returned a OriginateResponse. Take note of the returned Contact3

8.      Create a new request for the method HoldContact in the Session Service

9.      Populate the ssoToken field with the sooToken

10.  Populate the terminal element with the details of TerminalA

11.  Populate the contact element with the details of Contact3

12.  Click the green arrow button to send your request. Nothing is returned.

13.  Create a new request for the method UnHoldContact in the Session Service

 

14.  Populate the ssoToken field with the sooToken

15.  Populate the terminal element with the details of TerminalA

16.  Populate the contact element with the details of Contact3

17.  Click the green arrow button to send your request. Nothing is returned.

18.  Create a new request for the method DropContct in the Session Service

 

19.  Populate the ssoToken field with the sooToken

20.  Populate the terminal element with the details of TerminalA

21.  Populate the contact element with the details of Contact3

22.  Click the green arrow button to send your request. Nothing is returned.

 

 

 

 

Step 10: Use Session Service to CreateContact, Answer and drop

 

1.      Create a new request for the method CreateContact in the Session Service.

 

2.      Populate the ssoToken field with the sooToken

3.      Populate the terminal element with the details of TerminalA

4.      Populate the srcAddress element with the details of AddressA

5.      Populate the dstAddress element with the details of AddressB

6.      Click the green arrow button to send your request.

7.      You will be returned a CreateContactResponse. Take note of the returned Contact4

8.      Create a new request for the method AnswerContact in the Session Service.

 

9.      Populate the ssoToken field with the sooToken

10.  Populate the terminal element with the details of TerminalB

11.  Populate the contact element with the details of Contact4

12.  Click the green arrow button to send your request. Nothing is returned.

 

13.  Create a new request for the method DropContact in the Session Service.

 

14.  Populate the ssoToken field with the sooToken

15.  Populate the terminal element with the details of TerminalB

16.  Populate the contact element with the details of Contact4

17.  Click the green arrow button to send your request. Nothing is returned.

 

 

 

 

Step 11:  Use Session Service to logOffFromCCTServer

 

1.      Create a new request for the method LogOffFromCCTServer in the Session Service.

 

2.      Populate the ssoToken field with the sooToken

3.      Click the green arrow button to send your request. Nothing is returned.

 

 

 

 

 

Step 12:  Simple Test to Confirm that the ssoToken has expired

 

1.      Create a new request for the method C in the Session Service.

 

2.      Populate the ssoToken field with the sooToken

3.      Populate the terminal element with the details of TerminalA

4.      Populate the srcAddress element with the details of AddressA

5.      Populate the dstAddress element with the details of AddressB

6.      Click the green arrow button to send your request.

7.      You will be returned a Fault.