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

This guide explains in detail each Dialplan application and provides practical examples and use cases.

Updated: January March 2023

Permalink: https://wildix.atlassian.net/wiki/x/ahDOAQ

Table of Contents


Basic information on how Dialplan works: Dialplan: How does it work?

...

  • Set Number: set up the system to ask for the password associated to another user if you indicate another user
  • Set Options: set up the system to ask for the password only if phone is blocked

Example:

Image RemovedImage Added


The caller is asked for the user password and only in case the entered password is correct, the next Dialplan application “Dial trunk” is executed.

...

Example:
Suppose our local PBX is situated in Italy and remote one in France.
users” Dialplan configuration on local (Italian) PBX:

Image RemovedImage Added
In case the French number is entered, the call is routed via a remote PBX located in France, the Dialplan procedure “users”.
users” Dialplan configuration on remote (French) PBX:


Image RemovedImage Added


On the remote PBX situated in France, the number is normalized (the first 5 digits standing for the French international prefix are eliminated) and the call is routed via a local trunk.

...

Suppose the international prefix is 39 (Italy). Here is the “users” Dialplan configuration example:


Image RemovedImage Added
If the called number is +3904611715112, the system removes +39 and adds 0, the number after normalization is: 004611715112 and it matches the number 00[1-9], so the call is routed via the “local” trunk.

...

Call coming from 021234533 must be routed to the user 133, call coming from 021234532 must be routed to the user 132, etc: Set number -> remove – 7  -> prepend digits – 1 (DID management). Here is an example of Dialplan configuration for incoming calls (“main”) in this case:


Image RemovedImage Added

Image RemovedImage Added

Dial the trunk

...

Example:
The options “timeout” and “max number of calls” allow you to decide when to stop dialing one trunk and try another one, here is an example of “users” procedure configuration:


Image RemovedImage Added

In our example, the system first tries to dial one trunk, in case the timeout of 30 seconds or the maximum number of 2 calls is reached on this trunk, the system tries to route the call via another trunk.

...


Example: User 100 made a call to the number 39123456789 but no one replied. In forty minutes the called party has noticed a missed call and calls the number displayed on the screen (the office number, e.g. 04611715112). The system routes the call directly to the user 100 who had previously made an outgoing call. To do this, we must edit the Dialplan for incoming calls (“main”), by adding the “Automatic Call Back” Dialplan Application to the office number (04611715112):

Image RemovedImage Added

Call group

Routes the call to the selected Call Group. Call Groups are set up in Dialplan -> Call Groups (Read the chapter of WMS Start Guide, dedicated to Call groups).

...

Here is an example of the Dialplan procedure for incoming calls (“main”), where an incoming call to the tech support number is first routed to the tech support group, if no one answered within the timeout of 20 seconds, the call is routed to the sales group:

Image RemovedImage Added

Conference

Puts the call into multiconference.

...

Examples:
In the first example of the “main” Dialplan configuration, the incoming calls to the number 021234567 are routed to the conference room 123:


Image RemovedImage Added

The second example demonstrates DISA configuration in which we have three different conference rooms (1, 2, 3) and the caller is asked to enter the number in order to enter each conference room: e.g. caller must enter 11234 to enter the conference room number 1, 11567 to enter the conference room number 2, 11890 to enter the conference room number 3.


Image RemovedImage Added

By the way, any user of the system can access these conference room by simply dialing a feature code for Conference access (98 by default) + the conference room number, e.g. 981 for conference room number 1.

...

Example:
Suppose the office fax number is 021234567. Edit the Dialplan for incoming calls (“main”):


Image RemovedImage Added

You can enter several extension numbers / email addresses into the field, separated by spaces, in this case the copy of received faxes is sent to multiple destinations:


Image RemovedImage Added

Image RemovedImage Added

Note

Note: Only spaces can be used as separator between extension numbers/ emails in the Custom/E-mail field. Other characters are not supported.

...

  • Set Number: modify the called number/ email address of the voicemail destination. You can enter several  extension numbers/ email addresses into the field, separated by comma, space or semicolon. In this case the voicemail will be sent to multiple destinations
  • Set Options: select to Play beep/ Play busy or unavailable message automatically/ Play unavailable message/ Play busy message to the caller

    Image Removed


    Image Added

Intercom

 The phone indicated in the “Number” field answers automatically in speaker mode enabling the caller to talk to the user without his/her intervention.

...

Examples:
To enable call recording of outgoing calls, modify the Dialplan procedure used for managing outgoing calls (e.g. “users”):


Image RemovedImage Added

In our example the call recording starts as soon as the call is answered (specified in “Set Options”), and the copy of the recording is sent to the email address of user 100. To enable call recording of incoming calls, modify the Dialplan procedure used for managing incoming calls (“main”):


Image RemovedImage Added
In this case all the incoming calls to the line 021234567 are recorded and the copy of the conversation is sent to the email address info@wildix.com.

...

Example:
Suppose the company phone and fax number is 021234567. Modify the Dialplan procedure used to manage incoming calls:


Image RemovedImage Added
In our example the system tries to detect fax during 4 seconds, while the execution of the Dialplan procedure proceeds to the next step and the call is routed to the call group. In case within the 4 seconds the fax is detected, the system stops the execution of application “Call group” and the call is forwarded to the called number “fax” (as defined in “Set Number” option), in which the fax is being sent to email info@wildix.com

...

Example:
Suppose we have Sales and Tech Support departments and they both use the same trunk for outgoing calls, but they want to receive call recordings to different email addresses (sales@wildix.com and support@wildix.com) and to have different caller number for outgoing calls (04611715111 for sales and 04611715112 for tech support). For this purpose we must create two different Dialplan procedures for managing outgoing calls (users_sales and users_support). Don’t forget to assign these procedures to users belonging to each group in Users, “Dialplan” (by default “users” is set).


Image RemovedImage Added

In both cases the system starts the call recording of the outgoing call, but the copy of call recording is sent to different email addresses; the caller number set on trunk is different for Sales and Tech support. At the third step “Jump to”, the system routes the call to the Dialplan procedure “users”, where both types of calls (the one made by Sales or by Tech Support department), use the Dialplan application “Dial the trunk”:


Image RemovedImage Added
Jump to if

 Jump to another procedure in case matched the condition with the possibility to modify the number.

...

Example:
In our example, in case the switch status is "ON", the incoming calls are routed to the procedure “Closed”, in case the switch is in status “Extra”, the incoming calls are routed to another Dialplan procedure “Mobile_number” (modify the procedure used for incoming calls, “main” by default):


Image RemovedImage Added
In case the 3 state switch (called “Switch1”) is OFF, the Dialplan continues its execution and the call is routed to the procedure "Call group".

...

In case the switch status is EXTRA (blinking), the call is routed to the procedure “mobile_number”, where the call is sent to the predefined mobile number via the GSM trunk.


Image RemovedImage Added


Image RemovedImage Added

Jump to if call type is

...

Note

How to use TTS in Dialplan:

  • It is necessary to first set the language using “Set” application
  • if required, you can change the default voice parameter for TTS message. Add "Set" application and use channel variable "TEXTTOSPEECH_VOICE" indicating the new voice parameter. Supported voices list can be found in WMS -> Sounds (secondary top menu)-> Text-to-speech page. Note, that the language of the voice parameter should match the language selected in "Set" application
  • Write a text using “Play sound” / “Play sound and wait for digits” applications. In case you need to insert a pause between words/ phrases, use a variable <break time="1s"/>, where the value "1s" can be changed to any number of seconds
  • To learn more about variables, read Smart Dialplan Guide - use of Custom Applications
  • You can jump to another Dialplan procedure based on TTS result: use “Jump to if” application with Condition "${TTSSTATUS}"!="SUCCESS" ("UNDEFINED"/"FAILURE")

Note, that this message will not be saved on the PBX and will be generated dynamically upon the execution of this Dialplan application.

Example:

Image RemovedImage Added

Read more about Wildix Business Intelligence (WBI) services: Wildix Business Intelligence - Artificial Intelligence services.

Warning

Prerequisites:

  • Per User systems (monthly / yearly / five years subscription) 
  • Premium license
  • It's necessary to set the language using "Set" application


...

  1. Create a new Dialplan procedure “Conference” and edit a Dialplan procedure for incoming calls (“Main” by default) by specifying an office number devoted to conference management as “Called number” (in our example, 04611715109) and adding an operation “Jump to” –> “Conference” procedure:

    Image RemovedImage Added

  2. Edit a Dialplan procedure “conference”

An example of configuration for this Dialplan procedure is provided below:


Image RemovedImage Added


  • The user is invited to enter the PIN code of the conference ("Play sound and wait for digits")
  • The system waits for 4 seconds ("Wait for digits")
  • In case the user has entered the valid conference PIN number, the call is routed to the conference room (“called number –> XXXX” (Conference PIN code), “Jump to” –> “pbxfeatures” procedure –> “98” (Feature code to access to the conference)
  • In case the user has entered a wrong number, he is invited to try again ("Play sound and wait for digits")
  • After the second unsuccessful attempt, the call is hung up ("Hangup")

...

  • SRTP security: enable SRTP security for incoming/outgoing/both call directions
  • Direct RTP: “yes” – direct RTP is used for all devices (you can specify the networks in which direct RTP must be used in Settings -> PBX -> Settings SIP-RTP); "no" – direct RTP is turned off for all devices (if not set up via Dialplan, direct RTP is used only for Wildix devices)
  • Codecs: force the usage of selected codec for this type of calls (select codec from the list of supported ones) 

    Note

    Note: you can also manually insert several codecs separated by comma:

    Image RemovedImage Added


  • Music on hold: select the music on hold from the list
  • Ringtone: select a custom ringtone for a call 
  • Type of call: select the type of call to set for these calls (Internal / External / Whitelist / Blacklist)

...

  • Insert manually the string DIAL_OPTIONS into the first input field and g (or another option) into the second input field

  • Then add the Dialplan application to which it should be applied, e.g. “Dial the phone”, “Dial the trunk”, “Trunk group”

    Image Removed
    Image Added

Case 2: Run shell commands or scripts. For example, you can run data base query command:

  • Add Set -> USERID -${SHELL(/usr/bin/sqlite3 /mnt/cticonnect/cticonnectdb “select username from cti_contacts where phonebook_id = 6 and mobile = ‘${EXTEN:1}’”)}


    Image RemovedImage Added

Case 3: Display a different phone number instead of a real caller / called ID to user in call dialog and CDR:

...

Note

You can add these variables in Dialplan context or as a Global Dialplan variable; in the latter case it is not necessary to add "Lookup caller name in phonebook" application.


Example:

Image Added

Image RemovedImage Added


1 - display caller ID in format company / name

...

  • Add  Set -> SKIP_PUSH_NOTIFICATION -> yes  before Call group application:


Image RemovedImage Added

Case 6  (WMS 5.0X). Search for a specified parameter of a contact in shared phonebooks in order to route a call to its owner:

...

  • Add Set -> INTRUSION_NOTIFICATION -> yes 


    Image RemovedImage Added


Case 8 (WMS 5.02). Continue recording of an outgoing call after it is transferred to another user:

...

  • Add Set -> CG_MANAGER_MAIL_NOTIFY -> yes before the Call group application:


Image RemovedImage Added

Case 10 (WMS 5.03). For Call All 10/ 32 Call group strategy: configure a Call group member to receive an incoming call as soon as they get available, without waiting till the Call group timeout is reached:

  • Add Set -> QUEUE_FAST_RECALL -> yes/true before the Call group application:


Image RemovedImage Added

More about the Call Group notifications manager feature: How to set up the Call Group notifications manager feature.

...

Note

Notes:

  • The support starts from WMS 6.01.20221019.4
  • Besides configuring Speech to Text in Dialplan, you can use a script that saves all recorded data  into one file and passes to a database. See the document for details: How to Set Up Wildix Speech to Text

Dialplan application Speech to text allows to create an automatic system that ask the caller some questions, recognizes the answers, and lets you save the recorded files.

  • Question: enter the text that will be played for the caller, choose an audio file, or leave the field empty (in this case just a beep is played)
  • Retries: enter the number of attempts to recognize a caller’s answer before the application ends. Available values: 0-3. Default value: 1.
  • Error message: type the message that is played after an unsuccessful recognition attempt, choose an audio file, or leave the field empty (in this case, the default message “I didn’t not understand your response” is played).
  • Repeat question: if enabled and if Retries parameter is other than 0, the question is repeated after the error message in case of unsuccessful recognition attempt.
  • Max Length (Seconds): the maximum length of an answer. Available values: 1-60 seconds. Default value: 10 seconds.
  • Max Silence (Seconds): the maximum length of silence allowed during speech recognition. Available values: 1-60 seconds. Default value: 3 seconds.
  • Save Audio: if the checkbox is enabled, file with the answer is saved on the disk. Default path: /dev/shm/var/spool/callweaver/monitor/stt/  (can be changed using RECOGNITION_AUDIOPATH variable, see details below).

Image RemovedImage Added

The application can receive and handle the following values as channel variables (can be set via Dialplan application “Set“):

  1. RECOGNITION_LABEL = “name“ - a custom parameter that allows to mark specific speech-to-text application entries (e.g. name, age, etc.) in order to be able to create complicated Dialplans and parse results.
  2. RECOGNITION_DICTIONARY = “Yes, No, or other words“ - additional channel variable that lets improve speech-to-text recognition.
  3. RECOGNITION_AUDIOPATH = “path to directory with saved audio files“ - allows to change the default path for saving audio files. Default path is: /dev/shm/var/spool/callweaver/monitor/stt/

Example: 

Image RemovedImage Added

The application returns the following values as channel variables:

...

Indicate the path to the place where the remote script is located in the Dialplan application:


Image RemovedImage Added


In our case, when calling 333, the script “php.test” is executed. 

...