Layer 224
method Users
phone.discardCall#b2cbc1c0 flags:# video:flags.0?true peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates;

Parameters

Name Type Description
Video flags.0?true Whether this is a video call
Peer InputPhoneCall The phone call
Duration int Call duration
Reason PhoneCallDiscardReason Why was the call discarded
ConnectionId long Preferred libtgvoip relay ID

Returns

Updates

Gogram Example

// PhoneDiscardCall - using Params struct
result, err := client.PhoneDiscardCall(&tg.PhoneDiscardCallParams{
    Peer: &tg.InputPhoneCall{},
    Duration: 42,
    Reason: &tg.PhoneCallDiscardReason{},
    ConnectionId: int64(1234567890),

    // Optional fields:
    // Video: true,
})
if err != nil {
    // handle error
}
// result is *tg.Updates

Possible Errors

Code Type Description
400 CALL_ALREADY_ACCEPTED The call was already accepted.
500 CALL_OCCUPY_FAILED The call failed because the user is already making another call.
400 CALL_PEER_INVALID The provided call peer object is invalid.