Advanced functions

Advanced functions is an extension of the section Functions where you will find useful components to program more complex response performances to calls received. In general the components in this section are managed the same way as the components of the section Functions but the main difference compared to other functions lies in the use that advanced functions make of calls variables and expressions similar to programming applications.

General concepts. Variables and expressions.


The call variables are the basis that allows you to design more complex and interactive PBX systems and communicate it with external web applications. Just like with computer programming applications the variables save values and sometimes they allow their modification. At any PBX points where you want to use a variable you need to write it in brackets, for example, {NUM}.

You can use two types of functions in the control panel: global or system functions or local or user functions. Global variables allow you to access call features and they can not be modified, among them:

  • {CALLTAGS}: this variable contains all the tags we have established on the call, especially by means of the component Tag (LINK).
  • {CALLERID(name)}: it is the caller’s name, if we have assigned a name for the extension. In the case of external calls, it is the name displayed on the phone.
  • {CALLERID(num)}: it is the number calling. In the case of an extension, it is its number and in the case of external calls, the telephone number.

Call variables allow the caller to interact with different components. For example, you can capture a series of telephone keystrokes (Obtain digits) and divert the call depending on the value of such keystrokes (If expression) o operate on the value of such keystrokes (Assign) or read the value (Text to Speech) or make a call to a web application with the value obtained (Call URL).


In some components the use of expressions is allowed. An expression can be a number, a text, a variable or a combination of several of these elements through the use of operators. Ex. {myvar} + 3. A space or gap must be kept between the different elements of an operation and the operators except for concatenations as we will see later. Depending on result operators can be classified into boolean, mathematical and string operators.

Operadores boleanos

  • Expr1 | Expr2. The vertical bar represents a "logical or". The operation will return true if one of the expressions or both are true.
  • Expr1 & Expr2. It is a "logical and". The operation will only return true when both expressions are true.
  • Expr1 (=, > , >=, <, <=, !=) Expr2. These operators make a comparison of whole numbers if both expressions are whole expressions or a comparison of strings.

Mathematical operators

  • Expr1 (+, -, *, /, %) Expr2. These operators return, respectively, additions, subtractions, multiplications, divisions or the result of the division between two whole expressions.

String Concatenation

  • • To make the concatenation of two expressions considered strings all you have to do is place them together. Ex. 0001{namevar} will return to us 0001 concatenated to the content of the variable {namevar}.


These are the Functions closely related to the use of variables and expressions you have in the control panel in section Advanced Functions:

Get Digits

It captures the numbers dialed by the user in the variable indicated. The user needs to press # to complete the capture of numbers. As it happens in other functions, it is advisable to add in front of it a component like Play Audio to notify the caller that he is expected to enter a number and then press #. In the Variable field, enter the name of the variable in which you wish to save the number typed and in Wait (secs.) the time in seconds that you want the caller to have to enter them. Once # is pressed, the wait will be automatically over so you will be able to indicate a high value.

Plan llamadas - Funciones avanzadas - ObtenerZoom

Set variable

This component allows you to assign the result of an expression to a variable. In Variable indicate the variable in which you want to obtain the result of the expression and in Expression the expression to be evaluated.

Dialplan - Advanced functions - Set variableZoom

If expression

If expression If expression allows us to divert the call flow depending on whether an expression is true or not. So the result of the expression indicated must be true or false. The expressions are evaluated from the first to the last and when one of them holds true, the call is diverted by the connector located on the right of the expression. As in other components with multiple options, you can add a new expression by clicking on the "+" sign or delete one by clicking on the "-" sign. If no function holds true, the call will go on through the lower connector.

Plan llamadas - Funciones avanzadas - Si expresiónZoom


GoTo component allows you to make a jump in the dial plan to another extension. Calls will be transfered to the extension entered in the field "Extension" even if the destination component is in a different sheet. You can set the extension number for any component clicking in the label "Ext. number" located at the top of each component.

If you add after the destination extension a Return component, the call will be returned to the component connected to the GoTo lower connection point.


Return transfers a call to the original point where a GoTo Comp diverted it.

Especial Uses

Pickup Announcements

Sometimes, due to the PBX schema, you will need that when an operator picks up phone in an incoming call he would receive some information. For example, if you have numbers from different countries and you want the operator to know what is the number (or country) from which he has received a call you can use Pickup Announcements to allow him answer the call in the proper language.

For using this feature you simply have to use Set Variable function to set one recorded locution name's or a text-to-speech to {__ANNOUNCE} especial variable.

E.g., if you have an audio in your PBX called FromSpain. You can upload audio (wav or mp3) to the PBX using the Play Audio component. Then, you have to intercalate the Assign Variable component in the call flow and set it up like this:

  • Variable: {__ANNOUNCE}
  • Expression: FromSpain

This way PBX will play the audio called FromSpain when somebody picks up a call that has passed through this assignation.

It's not necessary to upload audio to the PBX in order to use this feature. You can also play text-to-speech. In order to configure it, you must create a Text to Speech component with the text to read and assign an extension number to it (one that doesn't previously exists). For example, if you assign the number 990 to the Text to Speech component, you should configure these values in Assign Variable:

  • Variable: {__ANNOUNCE}
  • Expression: "speech/990"
PBX will reproduce "Call from Spain". Quotes are mandatory.

Monema for Business

Telephony, virtual PBX and fax

Virtual PBX, minute plans for landline and cellular phones, easy-to-use control panel, immediate setup and a 30-day free trial.

Centralita Virtual

See more

Contact us

In Monema we are delighted to serve you. If you need additional information on our services you can reach us by chat, or our online form:

Contact us