phone.RequestCall

class pyrogram.raw.functions.phone.RequestCall

Start a telegram phone call

Details:
  • Layer: 227

  • 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
├── video → true (optional)
├── user_id → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── random_id → int
├── g_a_hash → bytes
└── protocol → PhoneCallProtocol
├── udp_p2p → true (optional)
├── udp_reflector → true (optional)
├── min_layer → int
├── max_layer → int
└── library_versions → Vector < 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"]
        ),
    )
)