cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
974
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Arul Selvan on 08-08-2013 08:12:15 AM
We facing issue when updating the call data in Finesse, “Invalid Action – Update_Call_Data”

 Request:

httpMethod PUT
numEntries 3
postData <Dialog><mediaProperties><callvariables><CallVariable><name>callVariable1</name>­<value>test CV1</value></CallVariable></callvariables></mediaProperties><requestedAction>UPD­ATE_CALL_DATA</requestedAction></Dialog>

Exception in Response:

throw 1; < don't be evil' >{"http://localhost/finesse/api/Dialog/16866076":{"headers":{"content-type":["ap­plication/xml; charset=UTF-8"],"cache-control":["no-cache"],"expires":["Thu, 01 Jan 1970 05:30:00 IST"],"set-cookie":["JSESSIONIDSSO=5DEA380978B4AF504AD1D9CD11FA21AE; Path=/","JSESSIONID=30092C548C43570E9368035611841C3B; Path=/finesse"],"content-length":["0"],"server":[""],"requestid":["c738b9c1-6ec3­-4608-b482-abb8041750ff"],"date":["Thu, 08 Aug 2013 10:47:47 GMT"],"pragma":["No-cache"]},"body":"","DataHash":"qgeopmcf02p09qc016cepu22fo","­rc":202}}

16:21:30: Header : MasterPublisher._eventHandler() - Received event on node '/finesse/api/User/4003/Dialogs': <Update>
<data>
<apiErrors>
<apiError>
<errorData>4047</errorData>
<errorMessage>INVALID_ACTION UPDATE_CALL_DATA on extension 4105</errorMessage>
<errorType>Generic Error</errorType>
</apiError>
</apiErrors>
</data>
<event>put</event>
<requestId>619238fc-990e-4721-95e4-39d4dd3e5ab1</requestId>
<source>/finesse/api/Dialog/16866076</source>
</Update>

Below is the method which I used to set call data:

updateCallVariable1 : function (callVariable1, options) {

this.isLoaded();
alert (callVariable1); 
var callvar1 = { 
"name" : "callVariable1",
"value" : callVariable1
};
var callvariable = { "CallVariable" : callvar1 };


var mediaProperties =
{
"callvariables": callvariable
};

options = options || {};
options.content = {};
options.content[this.getRestType()] =
{
"mediaProperties": mediaProperties,
"requestedAction": "UPDATE_CALL_DATA"
};
options.method = "PUT";
this.restRequest(this.getRestUrl(), options);

return this;
}

//This is how the above method is called from another js,

var options = {};
dialog.updateCallVariable1("test CV1", options);
 
 
 

Subject: RE: Error on Update Call Data
Replied by: David Lender on 08-08-2013 08:33:26 AM
, You need to check the agent’s participant actions of the Dialog and only submit a UPDATE_CALL_DATA request when it is allowed by the current state of the dialog:
 
<Update>
  <data>
    <dialog>
      <associatedDialogUri></associatedDialogUri>
      <fromAddress>41006</fromAddress>
      <id>16790189</id>
      <mediaProperties>
        <DNIS>41005</DNIS>
        <callType>AGENT_INSIDE</callType>
        <callvariables>
          <CallVariable>
            <name>callVariable1</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable2</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable3</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable4</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable5</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable6</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable7</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable8</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable9</name>
           <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable10</name>
            <value></value>
          </CallVariable>
        </callvariables>
        <dialedNumber>41005</dialedNumber>
      </mediaProperties>
      <mediaType>Voice</mediaType>
      <participants>
        <Participant>
          <actions>
            <action>TRANSFER_SST</action>
            <action>CONSULT_CALL</action>
            <action>HOLD</action>
            <action>UPDATE_CALL_DATA</action>
            <action>SEND_DTMF</action>
            <action>DROP</action>
          </actions>
          <mediaAddress>41005</mediaAddress>
          <mediaAddressType>AGENT_DEVICE</mediaAddressType>
          <state>ACTIVE</state>
          <stateCause></stateCause>
        </Participant>
        <Participant>
          <actions>
            <action>TRANSFER_SST</action>
            <action>CONSULT_CALL</action>
            <action>HOLD</action>
            <action>UPDATE_CALL_DATA</action>
            <action>SEND_DTMF</action>
            <action>DROP</action>
          </actions>
          <mediaAddress>41006</mediaAddress>
          <mediaAddressType>AGENT_DEVICE</mediaAddressType>
          <state>ACTIVE</state>
          <stateCause></stateCause>
        </Participant>
      </participants>
      <state>ACTIVE</state>
      <toAddress>41005</toAddress>
      <uri>/finesse/api/Dialog/16790189</uri>
    </dialog>
  </data>
  <event>PUT</event>
  <requestId></requestId>
  <source>/finesse/api/Dialog/16790189</source>
</Update>

Subject: RE: Error on Update Call Data
Replied by: Daniel Inbaraj on 09-08-2013 01:45:58 AM
Hi Lender,

Still I am facing the same issue after checking the agent’s participant actions of the Dialog. Below is the dialog.

11:48:11: Header :  MasterPublisher._eventHandler() - Received event on node '/finesse/api/User/4003/Dialogs': <Update>
  <data>
    <dialog>
      <associatedDialogUri></associatedDialogUri>
      <fromAddress>4579</fromAddress>
      <id>16866485</id>
      <mediaProperties>
        <DNIS>4105</DNIS>
        <callType>PREROUTE_ACD_IN</callType>
        <callvariables>
          <CallVariable>
            <name>callVariable1</name>
            <value>testing CV1</value>
          </CallVariable>
          <CallVariable>
            <name>callVariable2</name>
            <value>en-us</value>
          </CallVariable>
          <CallVariable>
            <name>callVariable3</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable4</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable5</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable6</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable7</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable8</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable9</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>callVariable10</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.ToExtVXML[0]</name>
            <value>application=DHS_CHANGE_REPLINE</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.FromExtVXML[0]</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.error_code</name>
            <value>0</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.media_server</name>
            <value>http://192.168.10.73:7000/CVP</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.ToExtVXML[2]</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.FromExtVXML[3]</name>
            <value>en-us</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.ToExtVXML[1]</name>
            <value>BUSINESS_FLAG=0;ADHOC_FLAG=0;HOLIDAY_FLAG=0;EMER_FLAG=1</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.ToExtVXML[4]</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.app_media_lib</name>
            <value>..</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.ToExtVXML[3]</name>
            <value></value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.FromExtVXML[1]</name>
            <value>en-us</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.caller_input</name>
            <value>T</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.FromExtVXML[2]</name>
            <value>en-us</value>
          </CallVariable>
          <CallVariable>
            <name>user.microapp.UseVXMLParams</name>
            <value>N</value>
          </CallVariable>
        </callvariables>
        <dialedNumber>3023</dialedNumber>
      </mediaProperties>
      <mediaType>Voice</mediaType>
      <participants>
        <Participant>
          <actions>
            <action>TRANSFER_SST</action>
            <action>CONSULT_CALL</action>
            <action>HOLD</action>
            <action>UPDATE_CALL_DATA</action>
            <action>SEND_DTMF</action>
            <action>DROP</action>
          </actions>
          <mediaAddress>4105</mediaAddress>
          <mediaAddressType>AGENT_DEVICE</mediaAddressType>
          <state>ACTIVE</state>
          <stateCause></stateCause>
        </Participant>
        <Participant>
          <actions>
            <action>TRANSFER_SST</action>
            <action>CONSULT_CALL</action>
            <action>HOLD</action>
            <action>UPDATE_CALL_DATA</action>
            <action>SEND_DTMF</action>
            <action>DROP</action>
          </actions>
          <mediaAddress>4579</mediaAddress>
          <mediaAddressType></mediaAddressType>
          <state>ACTIVE</state>
          <stateCause></stateCause>
        </Participant>
      </participants>
      <state>ACTIVE</state>
      <toAddress>4105</toAddress>
      <uri>/finesse/api/Dialog/16866485</uri>
    </dialog>
  </data>
  <event>PUT</event>
  <requestId></requestId>
  <source>/finesse/api/Dialog/16866485</source>
</Update>


Request:
getFullHeaders    true
getSummaries    false
headers    requestId=4a977aa3-2a08-40cb-875d-462ecc0771cb&Content-Type=application%2Fxml&Authorization=Basic%20NDAwMzo0MDAz&locale=undefined
httpMethod    PUT
numEntries    3
postData    <Dialog><mediaProperties><callvariables><CallVariable><name>callVariable1</name><value>testing CV1</value></CallVariable></callvariables></mediaProperties><requestedAction>UPDATE_CALL_DATA</requestedAction></Dialog>

Exception:
throw 1; < don't be evil' >{"http://localhost/finesse/api/Dialog/16866485":{"headers":{"content-type":["application/xml; charset=UTF-8"],"cache-control":["no-cache"],"expires":["Thu, 01 Jan 1970 05:30:00 IST"],"set-cookie":["JSESSIONIDSSO=EB561F178EA3F70D39ECA2B8B5DC73F3; Path=/","JSESSIONID=8CCBACBDCCECC02515DE55322D85F794; Path=/finesse"],"content-length":["0"],"server":[""],"requestid":["4a977aa3-2a08-40cb-875d-462ecc0771cb"],"date":["Fri, 09 Aug 2013 06:14:25 GMT"],"pragma":["No-cache"]},"body":"","DataHash":"qgeopmcf02p09qc016cepu22fo","rc":202}}


Thanks,
Daniel Inbaraj J.

Subject: RE: New Message from Daniel Inbaraj in Finesse - General Questions: RE: Err
Replied by: David Lender on 12-08-2013 09:01:39 AM
I do not know why you are receiving an error, your UPDATE_CALL_DATA looks correct.  I suggest you examine the Finesse websevices logs to see the request and response going to UCCE CTI Server from Finesse.  To obtain logs use:  file get activelog desktop recurs compress

Subject: RE: Error on Update Call Data
Replied by: Daniel Inbaraj on 12-08-2013 08:45:59 AM
Hi Lender,
could you please update on this.

Thanks,
Daniel

Subject: RE: New Message from Daniel Inbaraj in Finesse - General Questions: RE: Err
Replied by: Daniel Inbaraj on 13-08-2013 08:10:59 AM
Hi Lender,

Today I have tested again as per your suggestion. Now I could set the call data during an Active state of an Agent and the call variables are getting updated on the TCD. But I could not find the actual root cause of the problem earlier.

Thanks for your support given on this thread.

--Daniel Inbaraj

Subject: RE: New Message from Daniel Inbaraj in Finesse - General Questions: RE: Err
Replied by: Arul Selvan on 24-09-2013 08:31:16 AM
Hi

I am loading the list of users in a team on the onload event using Finesse API. Now i couldn't get the onchange event of the team whenever a user on the team changes their states. Could you please guide on how it can be achieved

Thanks,
Daniel

Subject: RE: New Message from Arul Selvan in Finesse - General Questions: RE: New Me
Replied by: David Lender on 24-09-2013 09:58:50 AM
Set up the  _onTeamUsersLoad handler which is triggered by the team.getUsers( {onLoad: _onTeamUsersLoad, onError: _onTeamError});

In _onTeamUsersLoad  Get the users collection using usersCollection = users.getCollection()

Then for each userid in the usersCollection, add a change handler to the usersCollection like:

1usersCollection[userID].addHandler(‘change’, _onTeamUserChange);

then in the _onTeamUserChange(user) handler you can check the user.getState();  and display it.

For an example of this you can look at the TeamPerformance.jsp gadget in the debugger.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links