Javascript functions

From SoftIVR

Jump to: navigation, search

Javascript functions

These are the functions which are used from Javascript to control the IVR.

  • answer - answer an inbound call
  • playFile - play a prompt to a caller
  • recordFile - record something from a caller
  • trimSilence - trim silence for the beginning and end of a recording
  • deleteFile - delete a recorded file
  • playTone - play a tone to the caller
  • playDTMF - play a DTMF string
  • onHangup - specify a Javascript function to call when the caller hangs up
  • sendMail - send e-mail
  • sendSMS - send SMS
  • getDTMF - get a DTMF tone from the caller
  • dial - make an outbound call
  • transcribe - transcribe audio in to text
  • parseXML - parse an XML structure
  • getXPath - get an element from a parsed XML structure
  • sleep - pause
  • getStatus - get the IVR's current status
  • stopIVR - stop whatever the IVR's currently doing
  • getLastError - get information about the last error encountered
  • bridge - bridge to another call leg

Database functions

  • queryDB - execute a database query
  • fetchRow - fetch a row from the latest query
  • getField - get a field from the most recently fetched row

Javascript objects

  • call - information about the current call

HTTP functions

  • httpGet - GET information from a web server
  • httpPost - POST information to a web server

IPC functions

  • sendMsg - send a message to another channel
  • getMsg - get an inbound message
Personal tools