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
onServerStartup () { | |
const { serverId, ip } = getServerInfo() // serverId does not change across restarts | |
this.serverId = serverId | |
// We don't have any routers or producers (yet). Clear any value that exists in the DB related to our serverId | |
clearSharedDB(serverId, 'routers') | |
clearSharedDB(serverId, 'producers') | |
// Update the DB with our serverId and ip so that others will know how to reach us | |
registerServerInDB(serverId, ip) | |
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
// This will have to be hosted by you elsewhere, maybe as a cloud function..! | |
const checkIfSessionHasARecentFlightBooking = (sessionId) => { | |
// ... | |
} | |
export const checkStatus = (req, res) => { | |
const { sessionId } = req.body | |
return res.json({ | |
set: { |
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
require(Modules.AI) | |
var debug = true | |
// Agent settings | |
var agentId = YOUR_DIALOGFLOW_AGENT_ID_IN_VOXIMPLANT // Should be a number, for example 2600. Check the Dialogflow Connector menu in Voximplant | |
var CALLER_ID = "YOUR_REAL_VOXIMPLANT_PHONE_NUMBER" // Cannot be a virtual number. Format should be for example 46701231212 for +46701231212 | |
var lang = DialogflowLanguage.SWEDISH | |
// Other variables |
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
val IT_HAPPENED = "ItHappened" | |
onButton("Make it happen") { | |
raise(IT_HAPPENED) | |
} | |
onResponse<ItHappenedIntent> { | |
raise(IT_HAPPENED) | |
} |