Call management applications

Call management applications

Overview

The Call management blocks can be used to set the actions and steps of the IVR project from a Telephony perspective.

On this page, you will find a description of each IVR block, along with practical examples of the most commonly used ones, such as Queue and Callback.

For additional information please refer to the Asterisk Applications Guide

 

Answer

image-20240530-132632.png

The Answer block is used to pick up the incoming call and establish the voice channel.

Fields

  • Label: enter a short description for the block.

  • Timeout: set a timeout in seconds the customer will wait before the system picks up the call. During that period the customer will hear to the “Music On Hold” if it is configured on your server.

Exit Arrows

The Answer block provides just one arrow out to the next step

Hangup

image-20240530-132941.png

The Hangup block terminates the call by disconnecting the customer.

Fields

  • Label: enter a short description for the block

Exit Arrows

 The Hangup block has no exit arrow

Internal Dial

Schermata 2020-11-12 alle 14.20.41.png
image-20240530-133220.png

The Internal Dial block executes the standard Asterisk Dial command to connect the call to an internal phone (extension).

Fields

  • Label: enter a short description for the block

  • SIP: select the agent that you would like to call

  • Timeout: set the maximum dial time in seconds (default is 60 s). 

  • Options: here you can type the Asterisk dial options parameter (optional).

  • URL: this parameter will also be sent to the called party upon successful connection (optional)

Exit Arrows

The Internal Dial block provides just one arrow out to the next step

External Dial

image-20240530-133445.png

The External Dial block executes the standard Asterisk Dial command to connect the call to an external phone number.

Fields

  • Label: enter a short description for the block

  • Phone: type the number that you would like to call

  • Trunk: select the trunk from the dropdown list

  • Timeout: set the maximum dial time in seconds (default is 60 s). 

  • Options: here you can type the Asterisk dial options parameter (optional). Refer to the Asterisk wiki.

  • URL: this parameter will also be sent to the called party upon successful connection (optional)

Exit Arrows

The External Dial block provides just one arrow out to the next step

Queue

image-20240530-133930.png

 

The Queue block executes the standard Asterisk Queue command to manage calls directed to a call queue. This is especially useful in ACD (Automatic Call Distribution) or call center scenarios.

Fields

  • Label: enter a short description for the block

  • Queue: select the queue from the dropdown list

  • Options: queue command options.

See below some examples:

  • d: data-quality (modem) call (minimum delay)

  • h: it allows the callee to hang up by pressing *

  • H: it allows the caller to hang up by pressing *

  • n: no retries on the timeout: it exits this application and goes to the next step

  • r: ringing instead of playing MOH

  • R: stops moh and rings once an agent is ringing (Asterisk Trunk)

  • t: it allows the called user to transfer the calling user

  • T: it allows the calling user to transfer the call.

  • w: it allows the called user to write the conversation to disk via Monitor

  • W: it allows the calling user to write the conversation to disk via Monitor

  • c: continuing in the dialplan if the callee hangs up (Asterisk 1.6.0 and above)

  • i: it ignores the call forward requests from queue members and do nothing when they are requested (Asterisk 1.6.0 and above)

  • k: it allows the called party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf (Asterisk 1.6.0 and above)

  • K: it allows the calling party to enable parking of the call by sending the DTMF sequence defined for call parking in features.conf (Asterisk 1.6.0 and above).

  • x: it allows the called user to write the conversation to disk via MixMonitor (Asterisk 1.6.0 and above).

  • X: it allows the calling user to write the conversation to disk via MixMonitor (Asterisk 1.6.0 and above).

  • URL: external URL (when supported)

  • Audio: you can select the audio file from the dropdown list

  • Timeout: time in seconds a call will wait in the queue before it is routed to the next priority in the dialplan; it is mandatory to insert a value.

  • AGI: AGI script invoked when a queue member answers the call

  • Macro: run a macro on the called party's channel (the queue member) once the parties are connected

  • Gosub: run a gosub on the called party's channel (the queue member) once the parties are connected

  • Position: attempt to enter the caller into the queue at the numerical position specified (e.g.: 1 would attempt to enter the caller at the head of the queue, 3 would attempt to place the caller third in the queue, and so on)

Exit Arrows

The Queue block provides just one arrow out to the next step

Scenario 1: Random distribution between two queues

image-20250430-110038.png

In this example you want to assign 70% of inbound calls to the first queue and 30% of inbound calls to the second queue.

  1. Add START block

  2. Configure SET block:

    1. Label: type the block name, in our example Random number

    2. Variable: RANDOM

    3. Value: {RAND(1,100)}

image-20250430-110903.png

 

  1. Configure GOTOIF block:

    1. Label: type the block name, in our example Condition 0 to 30

    2. Condition: insert the percentage value of the second queue + 1. In our example {RANDOM}<31.

image-20250430-110738.png

 

  1. Configure the QUEUE blocks according to your needs.

  2. Ensure that all blocks are properly connected as follows: START → SET → GOTOIF → Queues → HANGUP (see the image)

    • If GOTOIF returns true: route to Queue1

    • If GOTOIF returns false: route to Queue2

    In this way interactions are directed correctly based on the condition.

 

Scenario 2: Random distribution between three queues

image-20250430-110706.png

In this example, we equally distribute inbound calls between three queues.

  1. Add START block

  2. Configure SET block:

    1. Label: type the block name, in our example Random Number

    2. Variable: RANDOM

    3. Value: {RAND(1,100)}

image-20250430-110903.png
  1. Configure first GOTOIF block:

    1. Label: type the block name, in our example Condition 0 to 33

    2. Condition: {RANDOM}<34

image-20250430-111042.png
  1. Configure first GOTOIF block:

    1. Label: type the block name, in our example Condition 34 to 66

    2. Condition: {RANDOM}<67

image-20250430-111130.png
  1. Configure the QUEUE blocks according to your needs

  2. Ensure that all blocks are properly connected as follows: START → SET → GOTOIF → Queues (see the image)

    • If the first GOTOIF block returns true: route to Queue1 block

    • If the first GOTOIF block returns false: route to second GOTOIF block

      • If the second GOTOIF block returns true: route to Queue2 block

      • If the second GOTOIF block returns false: route to Queue3 block

    In this way interactions are directed correctly based on the conditions.

 

Scenario 3: Round Robin Memory distribution between five queues

image-20250430-111258.png

The calls will be allocated following the Round Robin Memory strategy.

The first call will be sent to the queue 1, the second call to the queue 2 and so on.

1. Configure the GotoIf block

  • Label: GotoIfExist

  • Condition: {DB_EXISTS(calls/distr)}==1

image-20250430-111347.png

2. Configure the Custom App block for InitDB

  • Label: InitDB

  • Application: Set

  • Options: DB(calls/distr)=1 

image-20250430-111448.png

3. Configure the GotoIf block

  • Label: GotoIfMaxN

  • Condition: {DB(calls/distr)}==5

image-20250430-111511.png

4. Configure the SET block for the RESULT variable

  • Label: Init

  • Variable: RESULT

  • Value: 1

image-20250430-111546.png

5. Configure the MATH block

  • Label: Next

  • Operation: {DB(calls/distr)} +1

  • Variable: RESULT

image-20250430-111602.png

6. Configure the Custom App block to set the new value to the DB

  • Label: SetDB

  • Application: Set

  • Options: DB(calls/distr) = {RESULT}

image-20250430-111838.png

 

7. Set the Variable Switch block:

  • Label: Switch

  • Variable: RESULT

image-20250430-111914.png

 

8. Configure the five queue blocks according to your needs.

 

 

Queue Group

from VERSION 3.39.0

image-20240805-100954.png
image-20240829-091728.png

 

The Queue Group block allows you to add a queue group to your IVR project.

Fields

  • Label: enter a short description for the block

  • Queue Group: here you can select the queue group of interest from the dropdown list

  • Priority: define a global priority

  • Options: insert optional command options

  • Music on hold: select the audio file from the dropdown list

  • Timeout: time in seconds a call will wait in the queue group before it is routed to the next block in the dialplan

Exit Arrows

The Queue Group block provides just one arrow out to the next step

Voicemail

image-20240530-134339.png

The Voicemail block executes the standard Asterisk Voicemail command, routing the call flow to a specified voicemail box and its associated context.

Fields

  • Label: enter a short description for the block

  • Mailbox: here you can set the voicemail box (mailbox@context) you want to route the call to. You can specify the mailbox you have previously configured in the Voicemail section.

  • Options: Voicemail command options. Refer to the Asterisk wiki

Exit Arrows

The Voicemail block provides just one arrow out to the next step

Access to voicemail can be managed via an IVR project, where the caller is prompted to enter the mailbox number (extension) they wish to access. The VoiceMailMain custom application is then used to retrieve the voicemail messages for that account.

Step 1: Prerequisites

Before designing the IVR flow, you need to do the following in advance:

  1. Upload an audio file to ask the caller to enter the voicemail extension (Tools --> Sounds)

  2. Create a variable called EXT (Tools → Variables). 

 

Step 2: Design the IVR Project

  1. Create a Cally Square Project with the structure START → GETDIGITS → CUSTOM APP → HANGUP (see the image below)

  1. Configure GetDigits block

  • Label: type a label

  • Audio: select the Audio file you uploaded under Tools → Sounds

  • Response Timeout: 5

  • Minimum Digits: 4

  • Maximum Digits: 10

  • Retries: 3

  • Variable: select the variable “EXT” that you created under Tools → Variables

The audio file named vm-extension must be used in the GETDIGIT block GetVMExtension. First, retrieve the file from /var/lib/asterisk/sounds/en and then upload it to the XCALLY Motion GUI via Tools → Sounds.

Here, we provide the vm-extension audio file ready to be placed in the GetVMExtension GETDIGIT block.

  1. Configure Custom Application block

  • Label: type a label

  • Application: VoiceMailMain

  • Options: {EXT}@from-voicemail

Step 3: Set up the route

To route the calls to the IVR application follow the below steps:

  1. From the Voice menu, access to the Internal Routes section and go to the Actions section

  2. Add the Cally Square application in the Internal route

  3. Select the IVR project you created and click Save.

Your remote access to check the Voicemails is ready!

Here are the steps to be followed when hearing the IVR message:

  • 0 for mail options

  • 4 to record your message

  • 1 to accept

  • 2 to listen to it

 

Callback

image-20240530-134712.png

A Callback scenario allows customers waiting in a queue to request a callback instead of remaining on hold. Using the callback block in your IVR project, the customers can leave the queue, and the call center automatically attempts to contact them later during periods of lower traffic.

Fields

  • Label: enter a short description for the block

  • Name: Caller name. Default: {CALLERID(name)}

  • Last Name: Caller last name

  • Phone: the phone number of the customer that you want to call back. Default: {CALLERID(num)}.

  • List: selecth the contact manager list where the contact will be added.

  • Delay [min]: time in minutes from NOW (current time) to schedule a contact. Here you can insert a value that defines when the customer will be called. 

  • Priority: add a contact with a specific priority.

Exit Arrows

 The Callback block has one exit arrow

In this example, a Callback option is offered to the caller while waiting in the queue:

  1. After 20 seconds in the Queue, the caller hears a playback message configured in a Menu block. The message invites the caller to press “1” to request a callback instead of staying on hold.

  2. If the caller presses “1”, the flow routes to the Callback block.

  3. The Callback block adds the caller’s information to the Contact Manager list and schedules a callback after the delay specified in the Delay field (e.g., 20 minutes).

  4. The system will automatically attempt the callback, provided that at least one agent is available in the associated Queue Campaign.

⚠️ Important: The contact list must be associated with a Queue Campaign in Motion Bull. Otherwise, the contact will only be stored in the list but will not be called.

 

Step 1: Prerequisites

Before designing the IVR flow, you need to do the following steps in advance:

  • Create a queue (Voice →Queues)

  • Upload the sound files (Tools → Sounds)

  • Create a variable called TIME (Tools →Variables)

  • Create a list (Contact Manager → Lists)

  • Create a queue campaign (Motion Bull → Queue Campaign)

  • Add the list to the queue campaign

 

Step 2: Design the IVR Project

  1. Create a Cally Square Project with the structure START → QUEUE → MENU → CALLBACK → HANGUP (see the image below)

image-20250428-154737.png

Block details