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

How to enable Asterisk ARI and Connect with WebSocket on Debian 12

  • 00:43 cat /etc/os-release
  • 00:53 asterisk -V
  • 01:02 cd /etc/asterisk
  • 01:16 vim ari.conf
  • 03:43 vim http.conf
  • 04:53 asterisk -rvvvvvvvvvvvvvvvvvvvvvvvvvvv
  • 05:04 core reload
  • 05:17 ari show status
  • 07:12 http show status
7752

To Enable Asterisk ARI With Connect Websocket On Debian 12

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 the user controls is conveyed via JSON events over a WebSocket.

Procedure:

Step 1: Check the OS version by using following command.

root@linuxhelp:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL=https://bugs.debian.org/

Step 2: Check the Asterisk version by using following command.

root@linuxhelp:~# asterisk -V
Asterisk 20.4.0

Step 3: Go to the following location by using following command.

root@linuxhelp:~# cd /etc/asterisk

Step 4: Open ari.conf file and Make configuration of ari by using following command.

root@linuxhelp:/etc/asterisk# vim ari.conf
[general]
enabled = yes      
pretty = yes        
allowed_origins = * 
[linuxhelp]
type = user 
read_only = no 
password = 123456

Step 5: Open http.conf file and make the web configuration for ARI by using following command.

root@linuxhelp:/etc/asterisk# vim http.conf 
[general]
servername=Asterisk
enabled=yes
bindaddr=0.0.0.0
bindport=8088
prefix=asterisk

Step 6: Login to the Asterisk by using following command.

root@linuxhelp:~# asterisk -rvvvvvvvvvvvvvvvvvvvvvvvvvvv
Asterisk 20.4.0, Copyright (C) 1999 - 2022, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 20.4.0 currently running on linuxhelp (pid = 1363)
linuxhelp*CLI>

Step 7: Reload the modules by using following command.

linuxhelp*CLI> core reload
    -- Reloading module 'extconfig' (Configuration)
    -- Reloading module 'logger' (Logger)
 Asterisk Queue Logger restarted
    -- Reloading module 'cdr' (CDR Engine)
[Jan 27 03:41:42] NOTICE[46283]: cdr.c:4568 cdr_toggle_runtime_options: CDR simple logging enabled.
    -- Reloading module 'cel' (CEL Engine)
    -- Reloading module 'features' (Call Features)
    -- Reloading module 'http' (Built-in HTTP Server)
 Bound HTTP server 'http server' to address 0.0.0.0:8088
    -- Reloading module 'indications' (Indication Tone Handling)
    -- Reloading module 'res_pjproject.so' (PJPROJECT Log and Utility Support)
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Jan 27 03:41:42] NOTICE[45739]: sorcery.c:1348 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
    -- Reloading module 'res_pjsip_authenticator_digest.so' (PJSIP authentication resource)
    -- Reloading module 'res_pjsip_endpoint_identifier_ip.so' (PJSIP IP endpoint identifier)
    -- Reloading module 'res_musiconhold.so' (Music On Hold Resource)
    -- Time to delete the old dialplan: 0.000009 sec
    -- Total time merge_contexts_delete: 0.000027 sec
    -- pbx_config successfully loaded 1 contexts (enable debug for details).
    -- Reloading module 'app_queue.so' (True Call Queueing)
[Jan 27 03:41:42] NOTICE[46283]: app_queue.c:9528 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
    -- Reloading module 'cel_custom.so' (Customizable Comma Separated Values CEL Backend)
    -- Added CEL CSV mapping for '/var/log/asterisk/cel-custom/Minecel.csv'.
 Added CEL CSV mapping for 1 files.

Step 8: Check the ARI status by using following command.

linuxhelp*CLI> module load res_stasis.so
Loaded res_stasis.so
  == Message handler 'ari' registered.
 Loaded res_stasis.so => (Stasis application support)
linuxhelp*CLI> module load res_ari
Loaded res_ari
 Loaded res_ari.so => (Asterisk RESTful Interface)
linuxhelp*CLI> ari show status
ARI Status:
Enabled: Yes
Output format: pretty
Auth realm: Asterisk REST Interface
Allowed Origins: *
User count: 1

Step 9: Check the http status by using following command.

linuxhelp*CLI> http show status
HTTP Server Status:
Prefix: /asterisk
Server: Asterisk
Server Enabled and Bound to 0.0.0.0:8088

Enabled URI's:
/asterisk/httpstatus => Asterisk HTTP General Status
/asterisk/static/... => Asterisk HTTP Static Delivery
/asterisk/ari/... => Asterisk RESTful API
/asterisk/ws => Asterisk HTTP WebSocket

Enabled Redirects:
  None.

Step 10: Goto the browser and search the Asterisk server IP address with the path as shown below image

snap 1

Conclusion:

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

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What features does ARI offer?

A

Control call routing and bridging
Play audio and record calls
Collect DTMF
Manage conferences
Access real-time call and channel information

Q

What programming languages can I use with ARI?

A

Any language is capable of HTTP or WebSockets, such as Python, Java, Javascript, PHP, etc.

Q

Do I need to modify the Asterisk dialplan for ARI?

A

Yes, a basic dialplan configuration is required to trigger ARI applications.

Q

How secure is ARI?

A

ARI uses HTTPS and authentication for secure communication.

Q

Where can I get help with ARI?

A

Asterisk documentation and tutorials
Asterisk Community Forum
ARI library documentation

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

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

How to install Gparted on Debian 9.0
How to install Gparted on Debian 9.0
Sep 13, 2017
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Installation SSL Certificate on Ubuntu/Linuxmint/Debian to Secure Apache
Sep 19, 2018
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to install qBittorrent on Debian 9.0
How to install qBittorrent on Debian 9.0
Sep 8, 2017
How to Install FileZilla in Debian
How to Install FileZilla in Debian
Nov 29, 2016
How to install Nmap on Debian 9.0
How to install Nmap on Debian 9.0
Sep 9, 2017
How to Install Laravel in Debian
How to Install Laravel in Debian
Dec 7, 2016
How to install and configure Asterisk in CentOS
How to install and configure Asterisk in CentOS
Jul 19, 2016

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

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

MariaDB
ryan class=
E: Unable to locate package mariadb-server
Sep 18, 2017
Linux
AadrikaAnshu class=
How to add timestamps to history On Any Linux Machine
Jun 18, 2019
vim
jacob class=
Change true vi-compatible editor from Debian Vim-compatible
Nov 8, 2021
debian
anandaamatya class=
RedNotebook on Debian buster
Jun 30, 2020
Ubuntu
Kirin class=
Videos Always Micro-Shutter
Mar 8, 2019
debian
luke class=
workbench for debian
May 26, 2017
debian
teddybarax class=
Softwae installation problem
Aug 24, 2020
debian
colbyvance class=
Trouble Installing Debian 10.8.0 (Gnome)
Feb 28, 2021

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

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

Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Debian IceDove kicks the bucket after Thunderbird revisits Debian Repositories
Feb 28, 2017
Mass update of Jessie - A better alternative to new version?
Mass update of Jessie - A better alternative to new version?
May 8, 2017
Debian 9.2 ‘Stretch’ OS is here, download distro now
Debian 9.2 ‘Stretch’ OS is here, download distro now
Oct 9, 2017
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 Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

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.