Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

  

...

Scroll export button
scopecurrent
template-id0fa09813-8b86-460a-aa1d-ef450a80e9ce
quick-starttrue
add-onScroll PDF Exporter

Info

Smart Dialplan explains how to use Custom Applications in Wildix Dialplan to interact with external software and databases.

Updated: October 2023

Permalink: https://

confluence

wildix.

wildix

atlassian.

com/x/swBuAQ" data-layout="button_count" data-action="recommend" data-size="large" data-show-faces="true" data-share="true"></div>
Html
 <div class="lang-box-pdf">
	<div>
		<div class="google-lang">
			<div id="google_translate_element">
			</div>
			<script type="text/javascript">
					function googleTranslateElementInit() {
						new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'de,es,fr,it,nl', autoDisplay: false}, 'google_translate_element');
						}
			</script>
			<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
		</div>
		
		<div class="pdf-button">
			<a href="https://confluence.wildix.com/spaces/flyingpdf/pdfpageexport.action?pageId=23986355" alt="Convert to .pdf" title="Convert to .pdf"><img src="https://confluence.wildix.com/download/attachments/14549012/pdf-button-download-wildix-documentation.png"></a>
		</div>
	</div>
</div>
Info

Smart Dialplan explains how to use Custom Applications in Wildix Dialplan to interact with external software and databases.

Updated: November 2021

Permalink: https://confluence.wildix.com/x/swBuAQ

Table of Contents

AGI in “Custom Application”

Variables in Dialplan

Variables are needed to store the information necessary to execute the application.

...

Syntax used to call a variable:  ${variablename}

Example:

Set a variable: set(foo=123456789)

Call a variable: ${foo:offset:length}

Where:
foo: is the name of the variable
offset: optional offset in starting to read a variable
length: optional number of characters to read

...

Dialplan example:

  • set(FOO=101) - sets the name of the variable as FOO and the value as 101
  • Dial(SIP/${FOO}) - dials 101

Here are some useful variables:

${CALLERID(all)}: The current Caller ID name and number

${CALLERID(name)}: The current Caller ID name

${CALLERID(num)}: The current Caller ID number ${ANSWEREDTIME}: Elapsed time since the call has been answered

${EXTEN}: Extension

${CONTEXT}: Name of Dialplan procedure

...

Example:

This Dialplan is assigned to user 102.
NoOp function serves to display the variable value in logs:

Conditions in Dialplan

You can use execute a conditional jump to another Dialplan procedure, based on the boolean result (true or false) of the Gotoif function.

Syntax to execute a jump: GotoIf(condition?label1:label2)

Where:

label1:label2 are the destinations of the jump, consisting of: context, extension, priority

  • context: name of Dialplan procedure

  • extension: extension or called number present in this Dialplan procedure

  • priority: line number, usually 1

condition: the choice of Gotoif depends on the boolean result of this expression: true or false, in Dialplan True = 1 and False = 0.

The condition syntax is the following one: $[expr1 operator expr2], where

  • expr can be a variable, a value, a function, an expression (expressions can be nested)

  • operator as a rule it is relational (comparison) operator ( =, <>..); for nested expressions it’s possible to use logical operators AND, OR, NOT (explained below)

Logical operators:

expr1 | expr2 → OR

expr1 & expr2 → AND

!expr → NOT

Relational operators:

expr1 = expr2 → equal

expr1 != expr2 → inequal

expr1 < expr2 → less than

expr1 > expr2 → greater than

expr1 <= expr2 → less than or equal

expr1 >= expr2 → greater than or equal

Example:  

In this example:

set(FOO=1) - we introduce FOO variable with the value 1.

GotoIf($[${FOO} = 1]?users,101,1:users,102,1) - if FOO variable = 1, then jump to “users” procedure with extension 101; else - jump to “users” procedure with extension 102

GotoIf(condition?label1:label2) is introduced in our example in the following format:

GotoIf($[${FOO} = 1]?users,101,1:users,102,1), where:

  • condition: $[${FOO} = 1]

  • label1: users,101,1

  • label2: users,102,1

Example 1: Check  if a device is INUSE before sending a call  

...

The function DEVICE_STATE(SIP/100) returns the state of the device, results can be:
UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID |UNAVAILABLE | RINGING | RINGINUSE | ONHOLD

...

GotoIf($[ ${QUEUE_MEMBER(2,ready)} == 0 ]?context,101,1)

The function QUEUE_MEMBER(2,ready) counts the number of ready members of a call group 

...

With the help of QUEUE_MEMBER function it is possible to configure CG strategy to execute another Dialplan procedure. The function counts the number of free members of a Call group. When there are no available CG members, an incoming call is routed according to another Dialplan procedure.

  • Jump to if -> "${QUEUE_MEMBER(<call_group_id>,free)}"="0"

where

"free" - returns the number of not paused / busy members for a specified queue that can answer calls or are currently paused for the duration of wrap up time after a previous call (free CG members).

Note: Wrap up time and ringing state are not considered when using the function.

For example: All Call group members are put on pause for the duration period of wrap up time -> the incoming call stays in a queue until wrap up time doesn't expire

Warning

Limitation: the system recognizes unregistered (offline) CG members as available for answering calls. In case unregistered members are present in CG -> QUEUE_MEMBER = 0 performance is false.

...

GotoIf($[${REGEX("^0[6-7][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$" ${CALLERID(number)})}]?noanswer,01,1)

The function REGEX("<regular expression>" <data>) returns true if the regular expression matches the data.  

In the example above we check  if the caller is a French mobile phone:
Start by 0 then a 6 or 7 then followed by 8 digits => ^0[6-7][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$

Example 4: Check if the call arriving in the system is from a caller that has called in recently and not been answered - example of sqlite query using SHELL COMMAND

The variable helps to recognize that a call entering the system was from a caller that had recently called in and not been answered. In this case, the call can be routed differently, for instance, to a Call Group.

What it does:
Gets a count of calls from the caller ID number of the current call that:

  • had called in in the past 5 minutes
  • was NOT answered 

For this purpose, a query to CDR is made to get a count of unanswered calls from the Caller ID number over the previous X minutes.

...

net/wiki/x/1Q3OAQ

Table of Contents

AGI in “Custom Application”

Variables in Dialplan

Variables are needed to store the information necessary to execute the application.

Syntax used to set a variable: set(variablename=value)

Where:
variablename: is the name of the variable, it is insensitive to the variables defined by users
value: is the value attributed to the variable; value can be a function.

Syntax used to call a variable:  ${variablename}

Example:

Set a variable: set(foo=123456789)

Call a variable: ${foo:offset:length}

Where:
foo: is the name of the variable
offset: optional offset in starting to read a variable
length: optional number of characters to read


${foo} → 123456789
${foO:1} → 23456789
${Foo:-4:3} → 678

Dialplan example:


Image Added

  • set(FOO=101) - sets the name of the variable as FOO and the value as 101
  • Dial(SIP/${FOO}) - dials 101

Here are some useful variables:

${CALLERID(all)}: The current Caller ID name and number

${CALLERID(name)}: The current Caller ID name

${CALLERID(num)}: The current Caller ID number ${ANSWEREDTIME}: Elapsed time since the call has been answered

${EXTEN}: Extension

${CONTEXT}: Name of Dialplan procedure

${CHANNEL}: The channel (the called number present in the Dialplan procedure)

Example:


Image Added


This Dialplan is assigned to user 102.
NoOp function serves to display the variable value in logs:


Image Added

Conditions in Dialplan

You can use execute a conditional jump to another Dialplan procedure, based on the boolean result (true or false) of the Gotoif function.

Syntax to execute a jump: GotoIf(condition?label1:label2)

Where:

label1:label2 are the destinations of the jump, consisting of: context, extension, priority

  • context: name of Dialplan procedure

  • extension: extension or called number present in this Dialplan procedure

  • priority: line number, usually 1


condition: the choice of Gotoif depends on the boolean result of this expression: true or false, in Dialplan True = 1 and False = 0.

The condition syntax is the following one: $[expr1 operator expr2], where

  • expr can be a variable, a value, a function, an expression (expressions can be nested)

  • operator as a rule it is relational (comparison) operator ( =, <>..); for nested expressions it’s possible to use logical operators AND, OR, NOT (explained below)


Logical operators:

expr1 | expr2 → OR

expr1 & expr2 → AND

!expr → NOT

Relational operators:

expr1 = expr2 → equal

expr1 != expr2 → inequal

expr1 < expr2 → less than

expr1 > expr2 → greater than

expr1 <= expr2 → less than or equal

expr1 >= expr2 → greater than or equal


Example:  

Image Added

In this example:

set(FOO=1) - we introduce FOO variable with the value 1.

GotoIf($[${FOO} = 1]?users,101,1:users,102,1) - if FOO variable = 1, then jump to “users” procedure with extension 101; else - jump to “users” procedure with extension 102

GotoIf(condition?label1:label2) is introduced in our example in the following format:

GotoIf($[${FOO} = 1]?users,101,1:users,102,1), where:

  • condition: $[${FOO} = 1]

  • label1: users,101,1

  • label2: users,102,1

Example 1: Check  if a device is INUSE before sending a call  

GotoIf($[ ${DEVICE_STATE(SIP/100)} == NOT_INUSE ]?context,101,1)

The function DEVICE_STATE(SIP/100) returns the state of the device, results can be:
UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID |UNAVAILABLE | RINGING | RINGINUSE | ONHOLD

Example 2: Check  if there are available users in a call group before sending a call 
Anchor
QUEUEMEMBER
QUEUEMEMBER

GotoIf($[ ${QUEUE_MEMBER(2,ready)} == 0 ]?context,101,1)

The function QUEUE_MEMBER(2,ready) counts the number of ready members of a call group 


Note

With the help of QUEUE_MEMBER function it is possible to configure CG strategy to execute another Dialplan procedure. The function counts the number of free members of a Call group. When there are no available CG members, an incoming call is routed according to another Dialplan procedure.


Image Added
  • Jump to if -> "${QUEUE_MEMBER(<call_group_id>,free)}"="0"

where

"free" - returns the number of not paused / busy members for a specified queue that can answer calls or are currently paused for the duration of wrap up time after a previous call (free CG members).

Note: Wrap up time and ringing state are not considered when using the function.

For example: All Call group members are put on pause for the duration period of wrap up time -> the incoming call stays in a queue until wrap up time doesn't expire

Warning

Limitation: the system recognizes unregistered (offline) CG members as available for answering calls. In case unregistered members are present in CG -> QUEUE_MEMBER = 0 performance is false.



Example 3: Check  if the CALLERID(number) matches a regular expression

GotoIf($[${REGEX("^0[6-7][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$" ${CALLERID(number)})}]?noanswer,01,1)

The function REGEX("<regular expression>" <data>) returns true if the regular expression matches the data.  

In the example above we check  if the caller is a French mobile phone:
Start by 0 then a 6 or 7 then followed by 8 digits => ^0[6-7][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$

Example 4: Check if the call arriving in the system is from a caller that has called in recently and not been answered - example of sqlite query using SHELL COMMAND

The variable helps to recognize that a call entering the system was from a caller that had recently called in and not been answered. In this case, the call can be routed differently, for instance, to a Call Group.

What it does:
Gets a count of calls from the caller ID number of the current call that:

  • had called in in the past 5 minutes
  • was NOT answered 

For this purpose, a query to CDR is made to get a count of unanswered calls from the Caller ID number over the previous X minutes.


Image Added


NoOp(FromNumber is ${CALLERID(num)}) - 
detects the Caller ID.

Set(CallCount=${SHELL(value=`sqlite3 /mnt/cdr/cdrdb "select count() from cdr where c_from = '+1${CALLERID(num)}' and answer = '' and start > Datetime('now' ,'localtime','-5 minutes');"` && echo $value)}):

  • Set(CallCount= - sets the value of a variable called "CallCount" (can then be used to check later with the 'jump to if' application
  • ${SHELL(value=`sqlite3 /mnt/cdr/cdrdb  - executes a Linux SHELL command (sqlite query in this case)
  • "select count() from cdr where - gets count of calls from cdrdb
  • c_from = '+1${CALLERID(num)}' - checks cdrdb c_from field (contains caller ID numbers; note that +1 in our example is a prefix – change it with your country's prefix or remove it)
  • answer = '' - checks cdrdb answer field (contains answer timestamps of previous calls; blank if call was not answered)
  • start > Datetime('now' ,'localtime','-5 minutes');"

...

  • Set(CallCount= - sets the value of a variable called "CallCount" (can then be used to check later with the 'jump to if' application
  • ${SHELL(value=`sqlite3 /mnt/cdr/cdrdb  - executes a Linux SHELL command (sqlite query in this case)
  • "select count() from cdr where - gets count of calls from cdrdb
  • c_from = '+1${CALLERID(num)}' - checks cdrdb c_from field (contains caller ID numbers; note that +1 in our example is a prefix – change it with your country's prefix or remove it)
  • answer = '' - checks cdrdb answer field (contains answer timestamps of previous calls; blank if call was not answered)
  • start > Datetime('now' ,'localtime','-5 minutes');"` - checks start field in cdrdb for a date/timestamp within the past 5 minutes (notice the -5 minutes portion)
  • && echo $value - syntax required by the SHELL command to return the value of the linux shell command that is being executed

NoOp(CallCount is ${CallCount}) - detects a count of calls.

${CallCount} > 0 - If a count of calls is greater than 0, a call will be routed to the Dialplan procedure.

Note

Note: The same scenario can be set up for checking outgoing calls, refer to the Article: How to check if a missed call has been called back.

In case of using MySQL or MSSQL DB, apply one of these custom applications:

...

  • - checks start field in cdrdb for a date/timestamp within the past 5 minutes (notice the -5 minutes portion)
  • && echo $value - syntax required by the SHELL command to return the value of the linux shell command that is being executed

NoOp(CallCount is ${CallCount}) - detects a count of calls.

${CallCount} > 0 - If a count of calls is greater than 0, a call will be routed to the Dialplan procedure.

Note

Note: The same scenario can be set up for checking outgoing calls, refer to the Article: How to check if a missed call has been called back.


In case of using MySQL or MSSQL DB, apply one of these custom applications:

MySQL:
Set(CallCount=${SHELL(value=`echo "select count(*) from <TABLE> where c_from = '${CALLERID(num)}' and start = answer and start > date_add(LOCALTIME(),INTERVAL - 5 MINUTE);" | mysql -s --raw -h <DB_HOST> -P 3306 <DATABASE> -u <USER> -p <PASSWORD>` && echo $value)})

MSSQL:
Set(CallCount=${SHELL(value=`echo -e "select count(*) from <TABLE> where c_from = '${CALLERID(num)}' and answer = '1900-01-01 00:00:00.000' and start > dateadd(MI,-5,GETDATE());\nGO\nEXIT\n" | tsql -S <DB_HOST> -p 1433 -U <USER> -P <PASSWORD> -D <DATABASE> | sed '6!d'` && echo $value)})

MSSQLwhere:
Set(CallCount=${SHELL(value=`echo -e "select count(*) from <TABLE> where c_from = '${CALLERID(num)}' and answer = '1900-01-01 00:00:00.000' and start > dateadd(MI,-5,GETDATE());\nGO\nEXIT\n" | tsql -S <DB_HOST> -p 1433 -U <USER> -P <PASSWORD> -D <DATABASE> | sed '6!d'` && echo $value)})

where:
<DATABASE> - database name
<TABLE> - table name 
<DB_HOST> - hostname
<USER> - user
<PASSWORD> - password

Warning

Important: Time zone of the PBX and the DB server should match!

Example 5. Check if a user/ users are registered 

  • Jump to if -> ${REGUSERS(152)}=0 - if user 152 has a registered device (excluding push), the execution result will be "1", otherwise "0"
  • Jump to if -> ${REGUSERS(200,201,202)}=0 - if at least one of the users has at least one registered device (excluding push), the execution result will be "1", otherwise "0"

Request to remote server: CURL

CURL allows sending a request to a web page. As a rule, a CURL(url) is used together with Set() in order to write a value received from a web page into a variable:

Set(variablename=${CURL(URL)})

or

Set(variablename=${FILTER(1234567890,${CURL(URL)})
It is recommended to use the second request so that you escape the unwanted characters.

...

Set(foo=${FILTER(1234567890,${CURL(http://myexample.wildix.com/smartdialplan/echo101.php)})})

In this example the value returned is 101.
In this way we can pass the caller number to a web page using ${CALLERID(num)} as an URL parameter:
Set(foo=${CURL(http://192.168.1.1/callernum.php?callernum=${CALLERID(num)})})To keep it simple<DATABASE> - database name
<TABLE> - table name 
<DB_HOST> - hostname
<USER> - user
<PASSWORD> - password

Warning

Important: Time zone of the PBX and the DB server should match!

Example 5. Check if a user/ users are registered 

  • Jump to if -> ${REGUSERS(152)}=0 - if user 152 has a registered device (excluding push), the execution result will be "1", otherwise "0"
  • Jump to if -> ${REGUSERS(200,201,202)}=0 - if at least one of the users has at least one registered device (excluding push), the execution result will be "1", otherwise "0"

Request to remote server: CURL

CURL allows sending a request to a web page. As a rule, a CURL(url) is used together with Set() in order to write a value received from a web page into a variable:

Set(variablename=${CURL(URL)})

or

Set(variablename=${FILTER(1234567890,${CURL(URL)})
It is recommended to use the second request so that you escape the unwanted characters.


Example:

Set(foo=${FILTER(1234567890,${CURL(http://myexample.wildix.com/smartdialplan/echo101.php)})})

In this example the value returned is 101.

In this way we can pass the caller number to a web page using ${CALLERID(num)} as an URL parameter:
Set(foo=${CURL(http://192.168.1.1/callernum.php?callernum=${CALLERID(num)})})

To keep it simple, a remote script must return a string or a character. The url string that can integrate variables or functions.

...

Code Block
<?php
echo 101;
?>

Image Added


Set(foo=${CURL(http://192.168.1.1/echo.php)})

...

Code Block
<?php
if (isset($_GET['callernum']))
{
     $callernum = $_GET['callernum'];
}
Else
{
     $callernum="UNKOWN ID";
}
if ($callernum === "0612345678") {
echo 102;
}
Else
{
echo 101;
}
?>


Image Added


Set(foo=${CURL(http://192.168.1.1/callernum.php?callernum=${CALLERID(num)})})

...

A database request requires several steps, here is an example:


Image Added



MYSQL(Connect connid 192.168.1.1 smartdialplan Wil01diX@@ smartdialplan)
MYSQL(Query resultid ${connid} SELECT ext FROM callernum WHERE callernum=${CALLERID(num)})
MYSQL(Fetch fetchid ${resultid} FOO)
MYSQL(Clear ${resultid})
MYSQL(Disconnect ${connid})

Connect: Establishing connection to the BDD
Query:  Request execution
Fetch: Reading the result
Clear: Memory cleaning
Disconnect: Disconnection from the BDD

...

SayDigits(digits)
Says the digits, one by one, digits can be a variable.

SayNumber(number, gender)
Says number
gender is "f" for female voice; "m" - for male ;"c" - for neutral

Example:


Image Added


Read(FOO,00000/smartdialplan/numcommande,3,,,10)

SayNumber(${FOO},f)

Dial(SIP/${FOO})

Implementation of Smart Dialplan: limited access to the phone based on the amount of credits purchased

...

You need to:

  • Upload PHP AGI (phpagi.sourceforge.net) to /var/www/agi/phpagi/phpagi.php

  • Upload test script to /var/www/scripts/test.php

...

Then you can use “remote script” in dialplan, example: Remote script

Microsoft SQL Integration

Create /rw2/var/www/scripts/sqllookup.php

...

Call Remote script it in Dialplan:


Image Added

Call file directory to generate a call

...

  • Specify the call destination and the channel to use:

    • Channel: <channel>: Channel to use for the call.

    • CallerID: "name" <number> Caller ID, please note: it may not work if you do not respect the format: CallerID: "Some Name" <1234>

    • MaxRetries: <number> Number of retries before failing (not including the initial attempt, e.g. 0 = total of 1 attempt to make the call). Default is 0.

    • RetryTime: <number> Seconds between retries. Default is 300 (5 min).

    • WaitTime: <number> Seconds to wait for an answer. Default is 45.

  • If the call answers, connect it here:

    • Context: <context-name> Context in extensions.conf

    • Extension: <ext> Extension definition in extensions.conf

    • Priority: <priority> Priority of extension to start with

    • Set: Set a variable to be used in the extension logic (example: file1=/tmp/to)

    • Application: Application to run (use it instead of specifying context, extension and priority)

    • Data: The options to be passed to the application

Use Callfile in dialplan

Create a script file in /var/www/scripts dir.

This script will be executed by dialplan.

Copy a template file and move the duplicated file to /var/spool/callweaver/outgoing/

callfile.sh

Code Block
------------------------------------------------------
#! /bin/sh
cp /var/www/scripts/test.call /var/www/scripts/temp.call
mv /var/www/scripts/temp.call /var/spool/callweaver/outgoing/
------------------------------------------------------
Give permissions to execute the script.
#chmod +x /var/www/scripts/callfile.sh
Create a template file in /var/www/scripts dir.
Test.call
------------------------------------------------------
Channel: SIP/0276510950/0970720101
Application: Playback
Data: 00000/callfile/message
---------------------------------------------------------

Call a remote script in dialplan.

Use device comment field for customize CID of outgoing call

Set comment in WMS -> Devices for devices:

  • Double click on a device to edit it

  • Fill out the “Comment” field and click Save

In users dialplan add the following Custom apps:

...

Set(Macaddr=${Useragent:-12:12})”
set(Descript=${SHELL(echo -n `/usr/bin/sqlite3 /rw2/var/lib/wmsdb.d/devdb "SELECT value FROM autoprov WHERE param = 'description' and mac = '${Macaddr}' COLLATE NOCASE"`)})

Then add these apps:

GotoIF "${Descript}"="Trento" users_Trento
Goto users_default

...

External outgoing call with audio file playback

Here is our scenario: outgoing call to urban line is placed; this call is being recorded, once it is answered, an audio file is played back automatically informing the called party that this call is being recorded.

This scenario can be carried out using Custom Application Dial:

Dial(SIP/pri1_0_0/${CalledID},30,A(00000/Messages/Recording) where pri1_0_0 is the channel used (PRI in this case), 00000 is the folder that contains the audio messages to be played back.

To remove digits from the called number, you can use function: 

Dial(SIP/0123456789/${EXTEN:3},30,A(00000/Message/Recording) - in this example SIP trunk is used and ${EXTEN:3} removes 3 first digits from the called number.

What else can you do with Custom Dialplan Apps?

Automatically generate a call and play a voice message

Read the docAutomatically Generate a Call and Play a Recording

Block outgoing calls from hotel rooms

Read the doc: How to block outgoing calls from hotel rooms

Callback feature for Call groups

Read the docHow to enable Callback feature for Call groups

Change Voicemail PIN from a phone

Read the docHow to change Voicemail PIN from a phone

Director-Secretary configuration

Read the docDirector - Secretary configuration

Initiate an audio conference using API Originate

Read the doc: How to automatically initiate an audio conference using API Originate

Notify callers of call recording

Read the doc: How to notify callers of call recording

Record multiple answers from a caller and combine them into one file

Read the docRecording multiple answers from a caller and combining them into one file

Set a sound before a message broadcasted to a Paging group 

Read the doc: Paging Guide

Set up Delayed Paging

Read the doc: Delayed Paging

Handle JSON documents inside Dialplan

...


Application: Playback
Data: 00000/callfile/message
---------------------------------------------------------


Call a remote script in dialplan.


Image Added

Use device comment field for customize CID of outgoing call

Set comment in WMS -> Devices for devices:

  • Double click on a device to edit it

  • Fill out the “Comment” field and click Save



Image Added


In users dialplan add the following Custom apps:


Image Added


Set(Useragent=${SIPCHANINFO(useragent)})

Set(Macaddr=${Useragent:-12:12})”
set(Descript=${SHELL(echo -n `/usr/bin/sqlite3 /rw2/var/lib/wmsdb.d/devdb "SELECT value FROM autoprov WHERE param = 'description' and mac = '${Macaddr}' COLLATE NOCASE"`)})

Then add these apps:

GotoIF "${Descript}"="Trento" users_Trento
Goto users_default


Prior to this, you should create  dialplans named like this users_${Descript} and another one -- users_default in our example -- for calls don’t match to a device with comment field.


Image Added


Image Added

External outgoing call with audio file playback

Here is our scenario: outgoing call to urban line is placed; this call is being recorded, once it is answered, an audio file is played back automatically informing the called party that this call is being recorded.

This scenario can be carried out using Custom Application Dial:

Dial(SIP/pri1_0_0/${CalledID},30,A(00000/Messages/Recording) where pri1_0_0 is the channel used (PRI in this case), 00000 is the folder that contains the audio messages to be played back.

To remove digits from the called number, you can use function: 

Dial(SIP/0123456789/${EXTEN:3},30,A(00000/Message/Recording) - in this example SIP trunk is used and ${EXTEN:3} removes 3 first digits from the called number.

What else can you do with Custom Dialplan Apps?

Automatically generate a call and play a voice message

Read the docAutomatically Generate a Call and Play a Recording

Block outgoing calls from hotel rooms

Read the doc: How to block outgoing calls from hotel rooms

Callback feature for Call groups

Read the docHow to enable Callback feature for Call groups

Change Voicemail PIN from a phone

Read the docHow to change Voicemail PIN from a phone

Director-Secretary configuration

Read the docDirector - Secretary configuration

Initiate an audio conference using API Originate

Read the doc: How to automatically initiate an audio conference using API Originate

Notify callers of call recording

Read the doc: How to notify callers of call recording

Record multiple answers from a caller and combine them into one file

Read the docRecording multiple answers from a caller and combining them into one file

Set a sound before a message broadcasted to a Paging group 

Read the doc: Paging Guide

Set up Delayed Paging

Read the doc: Delayed Paging

Handle JSON documents inside Dialplan

Read the doc: How to handle JSON inside Diaplan in WMS

Configure email sending via Dialplan

Read the doc: How to send email from Dialplan



Macrosuite divider macro
dividerTypetext
dividerWidth70
emoji{"id":"smile","name":"Smiling Face with Open Mouth and Smiling Eyes","short_names":["smile"],"colons":":smile:","emoticons":["C:","c:",":D",":-D"],"unified":"1f604","skin":null,"native":"😄"}
textColor#000000
dividerWeight2
labelPositionmiddle
textAlignmentcenter
iconColor#0052CC
fontSizemedium
textNot finding the help you need? Join the Facebook group to ask a question!
emojiEnabledfalse
dividerColor#DFE1E6
dividerIconbootstrap/CloudsFill

Button macro
buttonTextFacebook
isButtonShadowOntrue
emoji{"id":"smile","name":"Smiling Face with Open Mouth and Smiling Eyes","short_names":["smile"],"colons":":smile:","emoticons":["C:","c:",":D",":-D"],"unified":"1f604","skin":null,"native":"😄"}
buttonBorderColor#4267b2ff
buttonColor#4267b2ff
buttonNewTabfalse
buttonFontColor#ffffff
buttonSizemedium
buttonIconColor#ffffff
buttonWidthDetection46
buttonHoverColor#ffffff
buttonIconfont-awesome/FacebookSquare
buttonTypeicon_left
buttonLink{"link":"https://www.facebook.com/groups/wildixtechwizards","source":"direct"}
buttonNewLink
buttonRadius3
buttonShadow0
id228
emojiEnabledfalse
buttonWidth20