The Elixir SDK for the Guava voice-agent platform.
Two layers:
Guava.Client— account-level HTTP operations (phone numbers, SMS, outbound-call creation, campaigns).Guava.Agent— a behaviour for handling live voice calls. Define an agent module, then attach it to a channel withGuava.Channel(supervised) or the blocking helpers here (listen_phone/3,call_phone/5, …) for scripts.
See the README and the guides under docs/.
Summary
Types
An E.164 formatted phone number, e.g. "+14155550123".
Functions
Serve an outbound campaign by code. Blocks.
Place an outbound call and handle it with agent. Blocks until the call ends.
Listen for inbound phone calls on agent_number. Blocks.
Listen for inbound SIP calls on sip_code. Blocks.
Listen for inbound WebRTC calls (creates a code when nil). Blocks.
Start one or more Guava.Channel child specs under a supervisor and block
until they stop. For scripts/mix run; in an app, add the child specs to your
own supervision tree instead.
Types
@type phone_number() :: String.t()
An E.164 formatted phone number, e.g. "+14155550123".
Functions
Serve an outbound campaign by code. Blocks.
@spec call_phone(module(), phone_number(), phone_number(), map(), keyword()) :: :ok
Place an outbound call and handle it with agent. Blocks until the call ends.
@spec listen_phone(module(), phone_number(), keyword()) :: :ok
Listen for inbound phone calls on agent_number. Blocks.
Listen for inbound SIP calls on sip_code. Blocks.
Listen for inbound WebRTC calls (creates a code when nil). Blocks.
@spec run(Supervisor.child_spec() | [Supervisor.child_spec()]) :: :ok
Start one or more Guava.Channel child specs under a supervisor and block
until they stop. For scripts/mix run; in an app, add the child specs to your
own supervision tree instead.
Guava.run({Guava.Channel, agent: MyAgent, listen: {:phone, "+14155550123"}})