No matching results Documentation Forum
Asterisk Tutorial 13 - Asterisk Variables

Asterisk Tutorial 13 - Asterisk Variables

Introducing Asterisk Phone Systems – Asterisk Variables

Today, we show you how to dial any length of number.

Building on from last time when we introduced the topic of Regular Expressions within Asterisk, this time we demonstrate how to use Asterisk Variables to be able to store dialled numbers within your dialplans. Beyond that, we also show you how using variables and expressions combined, you can script your dialplan to be able to call any number, regardless how long it is and manipulate how the number is recorded in the Asterisk CLI.

You can configure variables within Asterisk by using the following format:

${variable_name}. 

For the purposes of today’s tutorial, we have used the EXTEN variable which if you’ve ever wanted to know how to store the number you actually dialled within your dialplan – here is your answer. EXTEN is one of the most common Asterisk Variables, but for more variables, please visit VoIP-info.org

Another useful tool when using variables is the ability to manipulate them. In our tutorial, we showed you how to configure your variable so that the offset (point at which you jump into the string) and string length, which can be done using

${EXTEN:offset:length}

This will enable you to record only the most important dialled numbers within your dialplan. For example, eliminating the 0 for selecting the outside line or by using the minus (-) symbol to start your offset from the end of the string.

Once you have tested your variables, you can then clean up your outgoing context dialplan by using a regular expression

_X.

to be able to dial any number.

pascom hosted PBX - start upgrading your business communications today

Final Word

A well-configured business phone system that oozes useful tools, delivers excellent audio quality and intuitive call flows will leave callers with a highly professional impression. The configuration options and application availability and how well they are utilized will have a decisive impact on how professionally you manage your calls and therefore how your customers view your company. The switch to a pascom VoIP phone system solution provides the opportunity to not only upgrade your internal collaboration but also to redefine telephony in your company.

If you would like more information regarding pascom and our Asterisk based Software PBX, please visit our website or give the pascom team a call on +49 991 29691 200 to discuss your requirements and get started within minutes using our free hosted business VoIP phone system edition.