Class: ElevenlabsClient::Endpoints::AgentsPlatform::OutboundCalling
- Inherits:
-
Object
- Object
- ElevenlabsClient::Endpoints::AgentsPlatform::OutboundCalling
- Defined in:
- lib/elevenlabs_client/endpoints/agents_platform/outbound_calling.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ OutboundCalling
constructor
A new instance of OutboundCalling.
-
#sip_trunk_call(agent_id:, agent_phone_number_id:, to_number:, **options) ⇒ Hash
POST /v1/convai/sip-trunk/outbound-call Handle an outbound call via SIP trunk Documentation: https://elevenlabs.io/docs/api-reference/convai/sip-trunk/outbound-call.
-
#twilio_call(agent_id:, agent_phone_number_id:, to_number:, **options) ⇒ Hash
POST /v1/convai/twilio/outbound-call Handle an outbound call via Twilio Documentation: https://elevenlabs.io/docs/api-reference/convai/twilio/outbound-call.
Constructor Details
#initialize(client) ⇒ OutboundCalling
Returns a new instance of OutboundCalling.
7 8 9 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/outbound_calling.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#sip_trunk_call(agent_id:, agent_phone_number_id:, to_number:, **options) ⇒ Hash
POST /v1/convai/sip-trunk/outbound-call Handle an outbound call via SIP trunk Documentation: https://elevenlabs.io/docs/api-reference/convai/sip-trunk/outbound-call
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/outbound_calling.rb', line 21 def sip_trunk_call(agent_id:, agent_phone_number_id:, to_number:, **) endpoint = "/v1/convai/sip-trunk/outbound-call" request_body = { agent_id: agent_id, agent_phone_number_id: agent_phone_number_id, to_number: to_number }.merge() @client.post(endpoint, request_body) end |
#twilio_call(agent_id:, agent_phone_number_id:, to_number:, **options) ⇒ Hash
POST /v1/convai/twilio/outbound-call Handle an outbound call via Twilio Documentation: https://elevenlabs.io/docs/api-reference/convai/twilio/outbound-call
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elevenlabs_client/endpoints/agents_platform/outbound_calling.rb', line 42 def twilio_call(agent_id:, agent_phone_number_id:, to_number:, **) endpoint = "/v1/convai/twilio/outbound-call" request_body = { agent_id: agent_id, agent_phone_number_id: agent_phone_number_id, to_number: to_number }.merge() @client.post(endpoint, request_body) end |