Skip to main content

phone.receivedCall

Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended, see here » for more info on the full flow.

func (c *Client) PhoneReceivedCall(ctx context.Context, peer InputPhoneCall) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PhoneReceivedCall(ctx, peer)
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPhoneCallyesThe phone call we're currently in

Returns

bool

Possible errors

CodeTypeDescription
400CALL_ALREADY_DECLINEDThe call was already declined.
400CALL_PEER_INVALIDThe provided call peer object is invalid.

References