Contact

Blogs

Take a look at the things that interest us.

System application for Asterisk dial plan

Wesley Wesley 2 years

In this blog post, I want to talk about the system application that can be used with the Asterisk dial plan. For this example, I will use a simple use case where user A calls extension 101 and with the system application, we'll unlock the building's front door.

What is the Asterisk System application

The system application allows you to execute a system command by making a normal phone call.

Our Use Case

In our example, we will use the following use case.

  • User A calls extension 100
  • The building's front door gets unlocked

The Asterisk System Application

As we have mentioned before in our use case, in this example we will make a call between user A and extension 100. To do this, we'll need to get started with our extension.conf. First, let's move to our Asterisk directory and open the extension.conf file.

$ cd /etc/asterisk
$ vi /extension.conf

Here we'll need to add the following parameters.

[extensions]
exten => _101,1,Ringing
exten => _101,n,Hangup

This basically doesn't do much, It makes a call, rings, and hangs up. Next, let's add the system application.

[extensions]
exten => _101,1,Ringing
exten => _101,n,System(/usr/sbin/asterisk use-this-shell-to-unlock-the-door)
exten => _101,n,Verbose(The door with extension 101 is unlocked)
exten => _101,n,Hangup

We are now able to unlock a door through the Asterisk dial plan. With the system application, you can execute multiple files on your Asterisk system.

System application for Asterisk dial plan 2021-08-24 08:12:00

There are no comments.

4039

Have questions about our services?

Contact our Sales team to get answers.

Contact Us
gomibako@aska-ltd.jp