AtEx v0.20.21 AtEx.Gateway.Voice.QueueStatus View Source

This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Voice API endpoint to queueing calls

Link to this section Summary

Functions

Process results from calling the gateway

This function makes a POST request to check the queue status of voice calls via the Africa's talking queue status endpoint, this function accepts a map of parameters. sent

Link to this section Types

Link to this type

option()

View Source
option() ::
  {:method, Tesla.Env.method()}
  | {:url, Tesla.Env.url()}
  | {:query, Tesla.Env.query()}
  | {:headers, Tesla.Env.headers()}
  | {:body, Tesla.Env.body()}
  | {:opts, Tesla.Env.opts()}

Link to this section Functions

Process results from calling the gateway

This function makes a POST request to check the queue status of voice calls via the Africa's talking queue status endpoint, this function accepts a map of parameters. sent

Parameters

attrs: - a map containing:

  • username - Your Africa’s Talking application username. Can be set in the config
  • phoneNumbers - A comma separated list of one or more numbers mapped to your Africa’s Talking account.

Example

  iex> AtEx.Gateway.Voice.QueueStatus.status(%{
  ...>   phoneNumbers: "+254728833180, +254728907896"
  ...> })
  {:ok, 
  %{
        "entries" => [
          %{
            "phoneNumber" => "+254728833180",
            "queueName" => "",
            "numCalls" => 1
          },
          %{
            "phoneNumber" => "+254728907896",
            "queueName" => "",
            "numCalls" => 4
          }
        ],
        "errorMessage" => "None",
        "status" => "Success"
      }}