Skip to main content
The Phone Connection Service in the Galtea SDK allows you to manage phone connections for your products. This Service is exposed by the galtea.phone_connections object.
Remember that we will be using the galtea object. More information here.

Quick Example

First, initialize the Galtea SDK:
galtea = Galtea(api_key="YOUR_API_KEY")
Create a phone connection:
phone_connection = galtea.phone_connections.create(
    product_id=product_id,
    name="production-voice-agent-" + run_identifier,
    phone_number="+14155552671",
    voice="sarah",  # en-GB female; omit to use the default
    language_code="en",
    agent_speaks_first=False,
)
List phone connections for a product:
phone_connections = galtea.phone_connections.list(
    product_ids=[product_id],
    sort_by_created_at="desc",
    limit=10,
)
Get a phone connection by ID:
phone_connection = galtea.phone_connections.get(phone_connection_id=phone_connection_id)
List available TTS voices:
voices = galtea.phone_connections.list_voices()
# voices is a list of TtsVoice objects: id, name, language_code, gender
for voice in voices:
    print(f"{voice.id}: {voice.name} ({voice.language_code}, {voice.gender})")

Service Methods

Phone Connection

A reusable telephony connection for dialing your AI agent’s phone number during voice evaluation