phone.RequestCall

class pyrogram.raw.functions.phone.RequestCall

Start a telegram phone call

Details:
  • Layer: 223

  • ID: 42FF96ED

Parameters:
  • user_id (InputUser) – Destination of the phone call

  • random_id (int 32-bit) – Random ID to avoid resending the same object

  • g_a_hash (bytes) – Parameter for E2E encryption key exchange »

  • protocol (PhoneCallProtocol) – Phone call settings

  • video (bool, optional) – Whether to start a video call

Returns:

phone.PhoneCall

TL Schema

phone.requestCall#42ff96ed
flags:#
video:flags.0?true
user_id:InputUser
random_id:int
g_a_hash:bytes
protocol:PhoneCallProtocol

= phone.PhoneCall

Parameter Tree

RequestCall
├── videotrue (optional)
├── user_idInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── random_idint
├── g_a_hashbytes
└── protocolPhoneCallProtocol
├── udp_p2ptrue (optional)
├── udp_reflectortrue (optional)
├── min_layerint
├── max_layerint
└── library_versionsVector < string >

Example

await app.invoke(
    RequestCall(
        video=None,
        user_id=await app.resolve_user(chat_id),
        random_id=0,
        g_a_hash=b"data",
        protocol=PhoneCallProtocol(
            udp_p2p=None,
            udp_reflector=None,
            min_layer=0,
            max_layer=0,
            library_versions=["text"]
        ),
    )
)