Answer and place 1:1 calls
The agent picks up incoming Telegram calls on your account or dials out — greets the caller, holds the conversation with your knowledge base, and books the follow-up.
Telegram's Bot API cannot touch voice calls. DialogBrain connects your own Telegram account over MTProto, so an AI agent can answer an incoming personal call, join a group call as a participant, speak with low-latency TTS, and save the transcript into the same thread as your text history.
Connect a Telegram account once in the app (QR scan, about a minute). After that every call is one API request, and the same key covers outbound calls and the agent answering inbound ones.
The target string decides where the agent goes: a Telegram user id for a 1:1 call, an @group or t.me link for a group voice chat.
curl -X POST https://api.dialogbrain.com/v1/calls \
-H "X-API-Key: $DIALOGBRAIN_KEY" \
-H "Idempotency-Key: call-9f21c7" \
-H "Content-Type: application/json" \
-d '{
"agent_id": 118,
"target": "telegram:123456789",
"greeting": "Hi, this is Acme calling about your order."
}'# pip install dialogbrain
from dialogbrain import DialogBrain
db = DialogBrain(api_key=os.environ["DIALOGBRAIN_KEY"])
call = db.calls.create(
agent_id=118,
target="telegram:123456789",
greeting="Hi, this is Acme calling about your order.",
idempotency_key="call-9f21c7", # a retry returns the same call
)
print(call["call_id"], call["status"]) # -> ... dialing202 Accepted
{
"call_id": "7a6daec1b3cc4585ba0280cc50de5e23",
"status": "dialing",
"channel": "telegram",
"target": "telegram:123456789",
"thread_id": 6808472
}The call lands in the same conversation as your text history with that contact. Or subscribe to call.ended and transcript.ready and never poll.
# how it ended
curl https://api.dialogbrain.com/v1/calls/7a6daec1b3cc4585ba0280cc50de5e23 \
-H "X-API-Key: $DIALOGBRAIN_KEY"
# -> status, duration_seconds, outcome
# what was said
curl https://api.dialogbrain.com/v1/conversations/6808472/messages \
-H "X-API-Key: $DIALOGBRAIN_KEY"Inbound calls need no target at all: the agent answers on the connected account according to its trigger.
The agent picks up incoming Telegram calls on your account or dials out — greets the caller, holds the conversation with your knowledge base, and books the follow-up.
The agent joins a Telegram group call as a named participant: it listens per speaker, answers when addressed, and can translate the room live.
Real-time speech translation inside the call, in both directions, with several target languages at once — each listener hears their own language.
This runs on MTProto with your real account — the layer bots never get. No "add our bot to the chat": callers just call you.
Every call is transcribed and saved next to the text conversation with the same contact, searchable like any other message.
Text follow-ups the agent drafts after a call wait for your approval before anything is sent — the same approval lane as every DialogBrain channel.
No. The Telegram Bot API has no access to voice calls at all. Handling calls requires a real user account speaking MTProto, which is how DialogBrain connects.
Yes. The agent joins as a visible named participant, hears individual speakers, can answer questions, and can translate the conversation live for the room.
Yes — speech-to-speech translation runs inside the call with low latency, and several target languages can run simultaneously.
Every call is transcribed and stored in the same thread as your text history with that contact, searchable across the workspace.