I'm trying to initiate calls using the ARI API, the process I followed was
- POST /ari/channels to create channel 1 to the local extension
- POST /ari/bridges to create a bridge
- POST /ari/bridges/{bridge-id}/addChannel with channel 1
- POST /ari/channels to create channel 2
- POST /ari/bridges/{bridge-id}/addChannel with channel 2
I have a websocket connection waiting for the correct events (like channel status up) before calling the POSTs.
The problem I'm having is this works using internal extension numbers for channel 1 and channel 2, but when using an external number for channel 2 I get the error - "Allocation failed".
Any ideas where I'm going wrong...
When you create channel with ARI to address "/ari/channels" you MUST define "extension" or "application" parameters (read more https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Channels+REST+API#Asterisk12ChannelsRESTAPI-originate).
Digitum make very unusable Python ari module and you may play with my module (now not implemented events) on https://github.com/vit1251/ari2.