Step 20. IVR (Interactive Voice Response)
Case: A subscriber calls a number followed by an IVR auto service (subscriber function code). The service greets the subscriber, asks him/her questions, the subscriber enters DTMF, and the service performs actions configured by the administrator, for example: plays files, records the subscriber’s voice and places it in the mailbox, transfers the subscriber to the number specified by him/her, etc.
The auto service is SIP-UA, respectively the nature of interaction with it is completely similar to the case of a call to the conference at step 19.
In order for an autoservice to run, the domain must exist:
-
Code of subscriber function of "IVR" type referring to the script code IVR.
-
IVR script created by the administrator.
-
Routing rules per subscriber function code.
The IVRScript role maintains the IVRScript instance of the IVR script. It is redundant and scalable in Active-Active mode. Similar to a conference, service is performed at the site closest to the call initiator, serving the domain in which routing is applied to the caller function code and the script itself. The IVRScript role uses its own media context, in which players and recorders are added in addition to the caller. IVRScript supports all kinds and directions of transfers.
As soon as the call reaches the IVRScript role, a script handler is immediately activated there and the specified script is loaded into it IVR.
Each scenario IVR is an algorithm created by the administrator in the visual editor. The administrator adds abstract scenario components to the script, parameterizes them, and links them in the execution sequence. The scenario is executed until the subscriber hangs up, until the scenario is terminated (STOP components, transferring the subscriber to a specified number, terminating the connection). There are also various error situations that also interrupt the script handler.

Each scenario component is responsible for abstract functionality that the administrator uses at his discretion. To transfer data between components, scenario variables are used, or other data areas located on disk in the database or other external resources.
Any call to the IVR auto service starts with the START component and requires a response from the IVR server - the SIP-response component. In addition to a successful response (code 200), which establishes a communication session, any unsuccessful response can be sent, effectively terminating the connection.
A special feature is the ability to configure a post-processing branch in the script that is activated by a particular scenario completion code.
Some components of scenarios:
-
Start
-
Response
-
Pause
-
Comparison
-
Assignment
-
Playing a file
-
Reproduction of a number
-
Recording
-
Reception DTMF
-
Generation DTMF
-
Transfer to a number
-
Accompanied transfer
-
Outgoing call with service in a scenario IVR
-
Running a script (nested or asynchronous)
-
Database query
-
A request to an external URL (e.g, http)
-
File storage request S3
-
Request/event to websocket connection
-
Operation (different types of entities)
-
Monitoring (different types of entities)
-
File operation
-
Sending mail (SMTP)
-
Receiving mail (POP3)
-
Sending/receiving a fax (T.30, T.38)
-
Text parser (xml, json, regex)
-
Ending a call
-
Starting an OS process
-
Putting in/taking out of the parking lot
-
Voicemail management
-
Speech-to-text recognition
-
Synthesizing speech from text
-
Mutex (critical section)
-
External management
-
Label
-
Transferring control to the tag
-
Calling a function on a label
-
Return control from a function
The data for components are parameters that the administrator defines using arguments. The arguments can be constants (numeric, string and date/time), scenario variables, arbitrary expressions using standard syntax, a large list of scenario functions, and extended syntax Erlang.
term | Determination |
---|---|
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
|
! |
-
Next chapter: Product schema
-
Previous step: Step 19. Conference