Is it possible to create channel over ari-py?

I would like to do an A to B call automatically. (E.g.: I would like to call every morning 10 people and play a sound file for them.)

Is there a way to create a channel and originate a call over ari-py?

A very small shell script, creating call files, is likely to be a lot easier. The other appropriate technology is AMI, not ARI.

less than 20 lines of codes using PHP or Python and cron job to set the calling time

Hi,
Indeed, there are several ways to solve this task, but I would prefer ARI (i.e. Asterisk REST API) and Python as they are modern tools. One more important thing is that Python has handy modules websocket and requests for dealing with Web sockets and REST, respectively.
You can find ARI specifications for channels here:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API

ARI and AMI have different intended uses. ARI is not a replacement for AMI. If you use a language that is not much used with Asterisk, you should expect to have to support yourself.

1 Like

Thanks for reply.

I have finally found the answer.
You can originate call with ARI by using: POST /channel request or alternatively .channels.originate() function from ari-py.

Channel ID need to be in this format: SIP/[b nr]@[a nr]
And valid stasis name must be specified also.