ex_plivo v0.1.1 Plivo.Adapter View Source

An interface used to make api calls to plivo

Link to this section Summary

Functions

Creates an endpoint for a new user in plivo

Deletes an endpoint for a user in plivo (when user gets deleted for example)

Get all the details for a certain call (by UUID)

Start a recording of a call (can be invoked at any time within a call)

Stop a recording of a call (can be invoked at any time within a call)

Link to this section Functions

Link to this function create_endpoint(username, password, alias) View Source

Creates an endpoint for a new user in plivo.

Parameters:

  • username
  • password
  • alias Returns:
  • A map containing:

    • username
    • alias
    • message
    • endpoint_id
    • api_id
Link to this function create_number(country_iso, type, services) View Source

Creates a new number

Parameters:

  • Country iso (e.g. “GB”)
  • Type (e.g. “mobile”)
  • Services (e.g. “voice”) Returns
  • New phone number
Link to this function delete_endpoint(endpoint_id) View Source

Deletes an endpoint for a user in plivo (when user gets deleted for example)

Parameters:

  • endpoint id

Get all the details for a certain call (by UUID)

Parameters:

  • UUID Returns:
  • Map with:

    • answer_time
    • api_id
    • bill_duration
    • billed_duration
    • call_direction
    • call_duration
    • call_uuid
    • end_time
    • from_number
    • initiation_time
    • parent_call_uuid
    • resource_uri,
    • to_number
    • total_amount
    • total_rate
Link to this function start_recording(uuid, time_limit \\ 60) View Source

Start a recording of a call (can be invoked at any time within a call)

Parameters:

  • UUID
  • Time limit (defaults at 60) Returns:
  • Map with:

    • url
    • message
    • recording_id
    • api_id
Link to this function stop_recording(uuid, url) View Source

Stop a recording of a call (can be invoked at any time within a call)

Parameters:

  • UUID
  • Recording URL