- Contents
Interaction Scripter Developer's Guide
Conference with Third Party then Locally Disconnect
The JaveScript function below demonstrates how an agent can call a third party, consult with that third. Then bring the third party in with the customer and the agent, then take themselves out of the conference, this way the third party is talking with the customer and the agent is free to take other calls.
function ConferenceWithThirdPartyLocalDisconnect(p_Number) { var p_mCallObj = scripter.createCallObject(); var p_ConferenceObject = scripter.createConferenceObject(); var iRes1 = confirm("Would you like to call the 3rd party?");// user selected OK, so let's call the 3rd party if (iRes1) { p_mCallObj.dial(p_Number, false); var iRes2 = confirm("Press OK when you are ready to conference in the 3rd party");// conference in the third party if (iRes2) { scripter.callObject.id = IS_ATTR_Callid.value;// create the conference object // add 3rd party p_ConferenceObject.Create(p_mCallObj);// pick up the call, it is probably on hold scripter.callObject.pickup();// add scripter call p_ConferenceObject.add(scripter.callObject);// pickup 3rd party just in case p_mCallObj.pickup(); var iRes3 = confirm("Press OK when you are ready to disconnect from this call"); if (iRes3) { scripter.callObject.disconnect(); } } else { // they did not want to transfer, so lets disconnect the 3rd party call and pick up the original call // disconnect 3rd party call p_mCallObj.disconnect();// pick up original call scripter.callObject.id = IS_ATTR_Callid.value; scripter.callObject.pickup(); } } }

