• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to enable ARI and Connect with WebSocket on Asterisk

  • 00:45 lsb_release -a
  • 01:03 systemctl status asterisk
  • 01:21 cd /etc/asterisk/
  • 01:36 vim ari.conf
  • 03:20 vim http.conf
  • 04:25 systemctl restart asterisk
7711

To Enable ARI And Connect With WebSocket On Asterisk

Introduction:

ARI is an asynchronous API that allows developers to build communications applications by exposing the raw primitive objects in Asterisk - channels, bridges, endpoints, media, etc. - through an intuitive REST interface. The state of the objects being controlled by the user is conveyed via JSON events over a WebSocket.

Procedure Steps:

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:    jammy

Step 2: I have already installed Asterisk on Ubuntu machine, now check the status of the Asterisk service by using the below command

root@linuxhelp:~# systemctl status asterisk
● asterisk.service - LSB: Asterisk PBX
     Loaded: loaded (/etc/init.d/asterisk; generated)
     Active: active (running) since Thu 2023-09-14 10:24:21 IST; 2 months 7 days ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1369 ExecStart=/etc/init.d/asterisk start (code=exited, status=0/SUCCESS)
      Tasks: 78 (limit: 4489)
     Memory: 83.7M
        CPU: 7min 11.930s
     CGroup: /system.slice/asterisk.service
             └─1391 /usr/sbin/asterisk

Sep 14 10:24:20 linuxhelp systemd[1]: Starting LSB: Asterisk PBX...
Sep 14 10:24:21 linuxhelp asterisk[1369]:  * Starting Asterisk PBX: asterisk
Sep 14 10:24:21 linuxhelp asterisk[1369]:    ...done.
Sep 14 10:24:21 linuxhelp systemd[1]: Started LSB: Asterisk PBX.
Sep 14 10:24:24 linuxhelp asterisk[1391]: radcli: rc_read_config: rc_read_config: can't open /etc/radiusclient-ng/radius>
Sep 14 10:24:24 linuxhelp asterisk[1391]: radcli: rc_read_config: rc_read_config: can't open /etc/radiusclient-ng/radius>

Step 3: For enabling ARI, First move to the Asterisk directory by using the below command

root@linuxhelp:~# cd /etc/asterisk/

Step 4: Edit ari.conf file by using the below command

root@linuxhelp:/etc/asterisk# vim ari.conf
Check for the following line 
enabled=yes
Add the following lines in the ari.conf file
[asterisk]
type=user
read_only=no
password=Linuxc#4
password_format=plain

Step 5: Now ARI has been enabled, need to configure http on asterisk, edit http.conf file in the asterisk directory by using the below command

root@linuxhelp:/etc/asterisk# vim http.conf
Check the following lines in the http.conf file and enter the values like below lines
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088

Step 6: After changing the configuration file need to restart the asterisk service by using the below command

root@linuxhelp:/etc/asterisk# systemctl restart asterisk

Go to the browser and search with the following link http://enter-your-ip:8088/ari/endpoints?api_key=username:password

here I’m using my IP address http://192.168.6.113:8088/ari/endpoints?api_key=asterisk:password

SNAP 1

After enter the above link enter your Username and Password

SNAP 2

Now it will shows the status of the endpoints

SNAP 3

Conclusion :

We have reached the end of this article. In this guide, we have walked you through the steps required to enable ARI and connect with Web socket on Asterisk. Your feedback is much welcome.

Tags:
jacob
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is Asterisk API?

A

Asterisk API (aka Asterisk Manager API) is the Application Program Interface for/to the Asterisk Manager and allows for external systems to connect via TCP/IP to issue commands and read events.

Q

What is the default port of Asterisk ARI?

A

The default connection to Asterisk is set to localhost on port 8088

Q

How to restart the Asterisk service ?

A

By using the following command, you can restart the Asterisk
systemctl restart asterisk

Q

How to reload the SIP accounts?

A

pjsip reload command is used to reload the SIP accounts

Q

How to view endpoints in Asterisk?

A

By using the following command you can view endpoints
pjsip show endpoints

Related Tutorials in How to enable ARI and Connect with WebSocket on Asterisk

Related Tutorials in How to enable ARI and Connect with WebSocket on Asterisk

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to enable ARI and Connect with WebSocket on Asterisk

Related Forums in How to enable ARI and Connect with WebSocket on Asterisk

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in How to enable ARI and Connect with WebSocket on Asterisk

Related News in How to enable ARI and Connect with WebSocket on Asterisk

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.