class Asterisk::ARI::Endpoints
- Asterisk::ARI::Endpoints
- Asterisk::ARI::Resources
- Reference
- Object
Defined in:
asterisk/ari/resources/endpoints.crasterisk/ari/models/endpoints_endpoint.cr
asterisk/ari/models/endpoints_text_message.cr
asterisk/ari/models/endpoints_text_message_variable.cr
Instance Method Summary
-
#get(tech : String, resource : String) : HTTP::Client::Response | Int32
Details for an endpoint.
-
#list : HTTP::Client::Response | Int32
List all endpoints.
-
#list_by_tech(tech : String) : HTTP::Client::Response | Int32
List available endoints for a given endpoint technology.
-
#send_message(to : String, from : String, body : String? = nil, variables : Hash(String, String | Bool | Int32 | Float32)? = nil)
Send a message to some technology URI or endpoint.
-
#send_message_to_endpoint(tech : String, resource : String, from : String, body : String? = nil, variables : Hash(String, String | Bool | Int32 | Float32)? = nil)
Send a message to some endpoint in a technology.
Instance methods inherited from class Asterisk::ARI::Resources
ari : ARI
ari
Constructor methods inherited from class Asterisk::ARI::Resources
new(ari)
new
Instance Method Detail
def get(tech : String, resource : String) : HTTP::Client::Response | Int32
#
Details for an endpoint.
Arguments:
tech
- technology of the endpoint. (required);resource
- iD of the endpoint. (required);
Error responses:
- 400 - Invalid parameters for sending a message.
- 404 - Endpoints not found
def list_by_tech(tech : String) : HTTP::Client::Response | Int32
#
List available endoints for a given endpoint technology.
Arguments:
tech
- technology of the endpoints (sip,iax2,...). (required);
Error responses:
- 404 - Endpoints not found
def send_message(to : String, from : String, body : String? = nil, variables : Hash(String, String | Bool | Int32 | Float32)? = nil)
#
Send a message to some technology URI or endpoint.
Arguments:
to
- the endpoint resource or technology specific URI to send the message to. Valid resources are sip, pjsip, and xmpp. (required);from
- the endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp. (required);body
- the body of the message;variables
- the "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,;
Error responses:
- 400 - Invalid parameters for sending a message.
- 404 - Endpoint not found
def send_message_to_endpoint(tech : String, resource : String, from : String, body : String? = nil, variables : Hash(String, String | Bool | Int32 | Float32)? = nil)
#
Send a message to some endpoint in a technology.
Arguments:
tech
- technology of the endpoint. (required);resource
- iD of the endpoint. (required);from
- the endpoint resource or technology specific identity to send this message from. Valid resources are sip, pjsip, and xmpp. (required);body
- the body of the message;variables
- the "variables" key in the body object holds technology specific key/value pairs to append to the message. These can be interpreted and used by the various resource types; for example, pjsip and sip resource types will add the key/value pairs as SIP headers,;
Error responses:
- 400 - Invalid parameters for sending a message.
- 404 - Endpoint not found