- Contents
Interaction Scripter Developer's Guide
IS_Action_Park
Definition
This call control action parks the current call, or a call identified
by callid
, on a user queue. The current call on the users'
queue is the default call that this action applies to. Syntactically,
IS_Action_Park is similar to IS_Action_Transfer. When a call is parked,
it is placed on hold and transferred to a local extension. IS_Action_Park
assumes the current dialer call by default. Scripter will recognize click
events from any HTML element whose name has an associated action documented
in this API (e.g.: "IS_Action_CallComplete"). If the script
needs to associate several buttons with the same action, then define the
action using a meta element and call the click event on the meta element
from the button(s).
Attributes
The IS_Action_Park element has the following attributes:
- [callid]
-
Optional. The
callid
to which this action applies (e.g. "89900001"). Dialer scripts use the current Dialercallid
by default. A "debug mode" error is logged for non-Dialer scripts if thecallid
attribute is not specified. - recipient
-
Set this attribute to the user id or phone number of the call is being parked on.
- [callback]
-
The callback property ensures that this action executes asynchronously in Interaction Connect. Starting with 2018 R3, all Interaction Scripter actions (IS_Actions) provide a callback property for use in Connect scripts only. In the example below, statements inside the highlighted callback function block execute only after the action completes. The callback will return an error if the action fails. See Writing custom scripts for Interaction Connect or Scripter .NET.
Here's how to use the .callback property in a script for Interaction Connect:
function IS_Action_Park() {
IS_Action_Park.recipient = "BillS";
IS_Action_Park.callback = function(error) { if (error) { console.error("IS_Action_Park failed."); } else { console.log("IS_Action_Park succeeded."); } } }
Example 1
<head> <meta name="IS_Action_Park"> <script language=javascript> function Park(userId) { IS_Action_Park.recipient = userId; IS_Action_Park.click(); } </script> </head>
<body> <input type=button value="Park Call on Ext. 101" onclick='Park("101")'> </body>
Example 2
Parks a call identified by its callid
.
<head> <meta name="IS_Action_Park"> <script language="javascript"> function IS_ParkCall(p_userId, p_page, p_CallId) { if (p_CallId != null) { IS_Action_Park.callid = p_CallId; } IS_Action_Park.recipient = p_userId; IS_Action_Park.click(); if (p_page != null) location.href = p_page; } </script> </head>
<body> <input type=button value="Park Call" onclick="IS_ParkCall(„101',null,null);"> </body>