This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public long numberOfRedirects = 1; | |
private string redirectHost = "192.168.100.57"; | |
private int hostPort = 9999; | |
private string destinationOne = "192.168.100.57"; | |
private int destOnePort = 8100; | |
private string destinationTwo = "192.168.100.57"; | |
private int destTwoPort = 8101; | |
public void AutoTamperRequestBefore(Session oSession) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: "2010-09-09" | |
Description: "CloudFormation sample template with Lambda function for OpenWeatherMap API" | |
Parameters: | |
# Parameters let users input custom values into template when creating a stack | |
OpenWeatherMapApiKey: | |
Type: "String" | |
Description: "The API key for your OpenWeatherMap account, i.e. 8b2b9..." | |
TriggerRateMinutes: | |
Type: "Number" | |
Description: "How often the Lambda functions are invoked to keep them warm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the CCP iframe and append it to the container div. | |
var iframe = document.createElement('iframe'); | |
iframe.src = params.ccpUrl; | |
iframe.style = "width: 100%; height: 100%"; | |
iframe.allow = "microphone"; | |
containerDiv.appendChild(iframe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Agent.prototype.onMuteToggle = function(f) { | |
var bus = connect.core.getEventBus(); | |
bus.subscribe(connect.AgentEvents.MUTE_TOGGLE, f); | |
}; | |
Agent.prototype.mute = function() { | |
connect.core.getUpstream().sendUpstream(connect.EventType.BROADCAST, | |
{ | |
event: connect.EventType.MUTE, | |
data: {mute: true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bind events for mute | |
var handleSoftPhoneMuteToggle = function() { | |
var bus = connect.core.getEventBus(); | |
bus.subscribe(connect.EventType.MUTE, muteToggle); | |
}; | |
// Make sure once we disconnected we get the mute state back to normal | |
var deleteLocalMediaStream = function(connectionId) { | |
delete localMediaStream[connectionId]; | |
connect.core.getUpstream().sendUpstream(connect.EventType.BROADCAST, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SoftphoneManager code | |
connect.contact(function(contact) { | |
... | |
contact.onRefresh(function() { | |
... | |
session.remoteAudioElement = document.getElementById('remote-audio'); | |
session.connect(); | |
// new code | |
contact.session = session; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect.contact(function(contact) { | |
... | |
contact.onRefresh(function() { | |
... | |
session.remoteAudioElement = document.getElementById('remote-audio'); | |
session.connect(); | |
// new code | |
var bus = connect.core.getEventBus(); | |
bus.trigger(contact.getEventName(connect.ContactEvents.SESSION), session); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// api.js | |
Contact.prototype.onSession = function(f) { | |
var bus = connect.core.getEventBus(); | |
bus.subscribe(this.getEventName(connect.ContactEvents.SESSION), f); | |
}; | |
... | |
// application code | |
function subscribeToContactEvents(contact) { | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var agent = new lily.Agent(); | |
agent.getEndpoints(agent.getAllQueueARNs(), { | |
success: function(data){ | |
console.log("valid_queue_phone_agent_endpoints", data.endpoints, "You can transfer the call to any of these endpoints"); | |
}, | |
failure:function(){ | |
console.log("failed") | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**------------------------------------------------------------------------- | |
* Uninitialize Connect. | |
*/ | |
connect.core.terminate = function() { | |
connect.core.client = new connect.NullClient(); | |
connect.core.masterClient = new connect.NullClient(); | |
var bus = connect.core.getEventBus(); | |
if(bus) bus.unsubscribeAll(); | |
connect.core.bus = new connect.EventBus(); | |
connect.core.agentDataProvider = null; |
OlderNewer