AcceptCallRequest

Only users can use this request. See code examples.

---functions---
phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall

Returns

phone.PhoneCall

This type can only be an instance of:

PhoneCall

Parameters

peerInputPhoneCall
g_bbytes
protocolPhoneCallProtocol

Known RPC errors

This request can cause 5 known errors:

CallAlreadyAcceptedErrorThe call was already accepted.
CallAlreadyDeclinedErrorThe call was already declined.
CallOccupyFailedErrorThe call failed because the user is already making another call.
CallPeerInvalidErrorThe provided call peer object is invalid.
CallProtocolFlagsInvalidErrorCall protocol flags invalid.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.phone.AcceptCallRequest(
        peer=types.InputPhoneCall(
            id=-12398745604826,
            access_hash=-12398745604826
        ),
        g_b=b'arbitrary\x7f data \xfa here',
        protocol=types.PhoneCallProtocol(
            min_layer=42,
            max_layer=42,
            library_versions=['some string here'],
            udp_p2p=True,
            udp_reflector=True
        )
    ))
    print(result.stringify())