[asterisk-users] Advice on building a REST API over ASTDB

Olivier oza.4h07 at gmail.com
Mon Apr 27 08:14:59 CDT 2020


Hello,

I'm using an Asterisk 17 dialplan that currently includes:
1. many "DB gets" calls (ie statements like Set(FOO=${DB(Foo/Bar)})
2. and a couple of "DB puts" (ie statements like Set(DB(Foo/Bar)=Foo) or
DB_DELETE(Foo/bar))


I would like to add an HTTP Provisionning API that would allow an external
program to mostly change or sometimes read some ASTDB values.

Which architecture would you suggest for this ?

I can foresee the following options but I would very curious to discover
alternatives.

1. Use AMI over HTTP

2. Use ARI but if I'm not mistaken, AR does not cover ASTDB

3. Develop a custom Web App that either:

3.1 Directly read or write on /var/lib/asterisk/astdb.sqlite3 but what
about concurrency

3.2 Use shell CLI (asterisk -rx 'database put Foo Bar Baz')

4. Replace dialplan's ASTDB calls with CURL statements (if positive, how to
avoid repeating CURLOPT calls all over my dialplan).

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200427/b66b2c18/attachment.html>


More information about the asterisk-users mailing list