Outgoing calls with REST API

Hello! I want to make outgoing calls to alert customers. Tell me how to do this. I want to use REST API interface.

You would write an application that uses ARI to originate outgoing calls[1] and direct them as appropriate.

[1] Asterisk 18 Channels REST API - Asterisk Project - Asterisk Project Wiki

Thanks. I’ll try it.

I didn’t find information about endpoint.
What is endpoint?
https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Channels+REST+API#Asterisk18ChannelsRESTAPI-originateWithId

Endpoint is what we refer to as what is being dialed. A SIP phone, for example. Originate in ARI follows the same format as other things (like Dial): PJSIP/phone, for example.

I try to POST it:
http://x.x.x.x:port/ari/channels?endpoint=SIP/line&extension=$phone_number&timeout=30&api_key=$login:$pass
But I receive <Response [405]>

Have you confirmed the request was actually sent as a POST? Have you tried using something like curl to verify what you’re doing, before using whatever framework you’re using?

No, I didn’t use curl. I will try it. Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.