Author Message
Kenji_Le
Joined: Nov 9, 2016
Messages: 3
Offline
My company have IPOCC 9.1. We installed WSC from iso package. WSCChecker run normally, then i want to build more functions based on that demo, i have some problems while calling WSC. I used AnswerTC method, and HoldTC method to pick up and hold the call. But it didn't run correctly.
  • Phone is still ring when call AnswerTC. MonDeviceState is still Alerting.

  • MonDeviceState changed to Held when call HoldTC, but it didn't held on the softphone.


  • Can I use WSC SDK with fully funtionality on IPOCC 9.1?
    Have anyone use WSC for building telephony functions on IPOCC 9.1 before? Can you give me any direction.

    Thanks for your help.
    Sadashiv
    Joined: Nov 29, 2016
    Messages: 27
    Offline
    Hello,

    I don't know which softphone version you are using. There was problem with particular sofphone version. You can try with hard phone as well OR ensure same softphone version is working with CCUI.

    Below are details and sequence about how to call WSC APIs. In IPOCC TTconsole, you should enable WSC_SOAP_Trace and WSC_SessionObjects log categories for TaskWS, sothat you can see the error messages.

    createSession must be the first call to WSC Web Service which returns sessionToken, which needs to be used to call other APIs of the same web service.

    1. createSession of task web service takes 3 input parameter as below,
    1. agentLoginId (login name of agent)
    2. password (password of agent)
    3. endpointObserverUrl (this is the URL of locally deployed application web service which will be called by WSC to send incoming events)

    This will create session with task web service and it will return the sessionToken

    Now openAgent api can be called

    2. openAgent API takes 4 input parameters as below,
    1. sessionToken (which is same, returned by createSession API)
    2. agentId (This is not login name. To get this id, you can call Directory web service API getAgentByName which will return AgentBasicInfo and this will have getId)
    3. taskType (it can be Voice, Chat OR Email as per requirement)
    4. surveilSession (it can be true or false as per requirement)

    This API will return endpointToken which needs to be used for loginAgent and all other Task web service APIs.

    Now you can call loginAgent api

    3. loginAgent API takes 3 input parameters as below,
    1. endpointToken ( which is same token returned by openAgent API)
    2. phoneId (This is phone id. To get phone id, you can call getAllPhones OR getPhoneByName of Directory web service and can get id for your phone number)
    3. initiatorId (This can be agent id which has used in openAgent API call)

    After successful call to this API, you are ready to call other APIs of Task Web Service.


    4. answerTC
    This API is to answer incoming call. If there is incoming call then WSC will call onEPTCAlerting observer API of your local application. It will send following data to your observer API method,
    endpointToken - This is the unique token. If multiple Agents are logged in to your application then there would be unique token associated with each agent. Using this token your app can identify, this incoming call is for which agent.
    taskId - Each task will have unique task id. You will need to use it for further calls like conference, dropTask etc.
    taskConnId - This is unique taskConnection ID. You will need to use it further to call APIs like holdTC, answerTC etc.
    originatorEpId - It provides information about who has initiated the call.
    callingAddress - This is calling address to know who is calling
    calledAddress - This is called address. It will be same as Agent logged in phone number.
    alertingAddress - This is alerting address.
    attributes - Attributes are like external, internal, routed, consult, conference etc. To know which type of incoming call it is.
    forceJobCode - To know whether jobcode is forced job code or not.
    cause - Cause of incoming call.
    otherConnections - This will be useful in case of conference to know other connections.

    Using above same taskconnection id, you will need to call answerTC API, API parameters are as below,
    endpointToken - This is the token you receive as output of openAgent API
    taskConnId - Task connection Id received during onEPTCAlerting event.

    After successful answerTC, your app will receive onEPTCConnected (this will receive once call is connected) event. This event is having taskId and taskConnectionId which can be used further to call holdTC, dropTC etc


    5.dropTask
    This API is used to drop task (end call). Once call is connected your app will receive onEPTCConnected event which contains taskId, taskConnectionId..
    Parameters are like below,

    endpointToken - This is the token you receive as output of openAgent API
    taskId - This is taskId received with onEPTCConnected event.



    For more API details, please check API dos under doc/api directory of zip file. Also you can have a look at sample application bundled with zip file. It shows how those APIs can be used.

    Thanks,
    Sadashiv
    Kenji_Le
    Joined: Nov 9, 2016
    Messages: 3
    Offline
    I used Avaya Comunicator for Windows Release: 2.1.4.84

    I give you some information from TTrace below :

    OpenAgent
    <openAgentResponse xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com" xmlns:ns3="http://umr.wsc.cc.comergo.com"><endpointToken>fb695cd2-bebc-485b-b4aa-6e18653d3da8</endpointToken></openAgentResponse>
    Login Agent
    <loginAgent xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com"><endpointToken>fb695cd2-bebc-485b-b4aa-6e18653d3da8</endpointToken><phoneId>8bd579574300ce00</phoneId><initiatorId>8dd579574200d000</initiatorId></loginAgent>

    <loginAgentResponse xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com" xmlns:ns3="http://umr.wsc.cc.comergo.com"/>

    OnEPTCAlerting


    <onEPTCAlerting xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com" xmlns:ns3="http://umr.wsc.cc.comergo.com"><endpointToken>fb695cd2-bebc-485b-b4aa-6e18653d3da8</endpointToken><taskId>eb3a1a5945004902</taskId><taskConnId>eb3a1a5945004b02</taskConnId><originatorEpId>8dd579574200d000</originatorEpId><callingAddress><Type>EPAddressIntern</Type><Address>1503</Address><EpId>8dd579574300d400</EpId></callingAddress><calledAddress><Type>EPAddressIntern</Type><Address>1501</Address><EpId>0000000051010000</EpId></calledAddress><alertingAddress>1501</alertingAddress><attributes><Attributes>Incoming</Attributes></attributes><forceJobCode>false</forceJobCode><cause>EPNull</cause><otherConnections><EPConnectionDescriptor><Ep><Type>EPAddressIntern</Type><Address>1503</Address><EpId>8dd579574300d400</EpId></Ep><TcId>eb3a1a5945004a02</TcId><Attributes/></EPConnectionDescriptor></otherConnections></onEPTCAlerting>

    AnswerTC
    <answerTC xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com"><endpointToken>fb695cd2-bebc-485b-b4aa-6e18653d3da8</endpointToken><taskConnId>eb3a1a5945004b02</taskConnId></answerTC>

    <answerTCResponse xmlns="http://task.wsc.cc.comergo.com" xmlns:ns2="http://types.wsc.cc.comergo.com" xmlns:ns3="http://umr.wsc.cc.comergo.com"/>


    Sadashiv
    Joined: Nov 29, 2016
    Messages: 27
    Offline

    From information provided, it looks like APIs are getting called correctly. There could be problem with Avaya communicator which you are using. Can you try to call same APIs with hard phone? What is the version of IP Office you are using?
    There are chances that particular softphone version is not compatible with IP Office.
    Kenji_Le
    Joined: Nov 9, 2016
    Messages: 3
    Offline
    Hi Sadashiv,

    I figured out my problem. I used Avaya Comunicator for Windows Release: 2.1.4.84 before, then i use Avaya Comunicator for Windows Release: 2.0.3.55. It worked fine now.

    Thanks for your support,
    Kenji
    Go to:   
    Mobile view