entone
ExARI
https://github.com/CityBaseInc/ex_ari
An Elixir library for interfacing with Asterisk using the ARI protocol.
Be sure to check out the example application GitHub - CityBaseInc/ex_ari_example: Example application showing real world usage of the ex_ari library to control an Asterisks server · GitHub
The ARI protocol is a robust interface for controlling Asterisk and reacting to Asterisk events. It has been thoroughly tested with Asterisk versions 15 and 16.
ARI stands for Asterisk REST Interface. Through the REST interface it is possible to control just about every aspect of an Asterisk server. ARI also provides a Websocket interface for consuming events from the Asterisk Server. This library has full support for both the REST and Websocket protocols.
If you’re not to familiar with Asterisk, there’s an example repo that will get you up and running with a custom Asterisk IVR in a few minutes, GitHub - CityBaseInc/ex_ari_example: Example application showing real world usage of the ex_ari library to control an Asterisks server · GitHub .
The documentation is pretty thorough, but it definitely helps to understand Asterisk and ARI.
Check the docs here, ARI — ARI v0.1.2
and on hex.pm ex_ari | Hex
Brought to you by CityBase
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
trarbr
I haven’t even looked at the code yet but I know I am going to love this
trarbr
So I wanted to try the ex_ari_example out last night, but I had some trouble with the Asterisk part. I haven’t played with Asterisk before so I’m not really sure what’s going wrong.
docker run ...command uses--net host, which doesn’t work on Mac unfortunately. So I ran it like this instead:docker run -p 8088:8088 -p 8089:8089 -p 5062:5062/tcp -p 5062:5062/udp -p 10000-10099:10000-10099/udp --name asterisk -v $PWD/asterisk_local_config/pjsip.conf:/etc/asterisk/pjsip.conf ex-ari-asterisk(I googled around a bit and guessed at the ports). After this, I could start the project withiex -S mixand it connected!Request Timeout (code: 408)and there is nothing in the Asterisk logs.--net host, and running it on a bridged network (VM had IP 192.168.33.10). I changed all the references to 127.0.0.1 to 192.168.33.10 indev.env, so the Elixir project works fine. But Zoiper gives me a new error now. Instead ofRequest Timeout (code: 408)error, I now getUnauthorized (code: 401)and I see this in the Asterisk logs:I wonder if I am using the wrong username/password?
lawik
Super curious about this stuff. I don’t have the time anytime soon to dive into Asterisk but damn if I don’t want to
Considering the Erlang/OTP telecommunications heritage, are there previous solutions to work with Asterisk around, do you know?
Cool that you are doing and releasing this!
entone
I run Linux so haven’t had the Mac issues. It looks like you got really really close! I should probably be explicit about the demo only working on Linux as of now.
I’ll dig in a bit more in a few hours. Asterisk is NOT simple to setup. If we get it working would be great if you could write-up some notes for Mac dev.
entone
It looks like your port is incorrect in your Zoiper settings.
Under
Settings -> Advanced -> NetworkAll the way at the bottom.
Make sure your SIP Options
portis set to 5062 and theOpen random port above 32000is uncheckedYou may need to update the
AOR_IPSin dev.env to be192.168.33.1:5062as well.But give it a try with just the port update in Zoiper first.
trarbr
No worries. Thank you so much for putting this out. I’ll dig into it, and see if I can get it working. And if I do I’ll be happy to add contribute it back
odix67
Just want to ask, if there is any work done this library, stands still for a few years, latest version from GitHub isn’t compilable (just little code inconsistencies) ?
entone
I haven’t been working on it lately, and I see that Citybase archived it. I was able to get them to transfer ownership to my org before I left. You can find the “active” repo here, GitHub - entropealabs/ex_ari: An Elixir Library for interfacing with Asterisk the Open Source Communications Software using ARI · GitHub
PRs are welcome if you’d like to update it.
entone
The example application is also available under my org now, GitHub - entropealabs/ex_ari_example: Example application showing real world usage of the ex_ari library to control an Asterisks server · GitHub
odix67
thx, that’s great! I’ve already forked it and found an issue related to the stasis state implementation, the :type attribute is mentioned in the json encode, but not available in the defstruct (part of stasis.ex):
without going deep into ARI, do you have a quick solution for this issue ?