Interface CallEventTypes

interface CallEventTypes {
    call.incoming_call: {
        id: string;
        isGroup: boolean;
        isVideo: boolean;
        offerTime: number;
        peerJid: Wid;
        sender: Wid;
    };
}

Properties

call.incoming_call: {
    id: string;
    isGroup: boolean;
    isVideo: boolean;
    offerTime: number;
    peerJid: Wid;
    sender: Wid;
}

Triggered when you a incoming call

Type declaration

  • id: string

    The call id

  • isGroup: boolean

    Is a call from a group

  • isVideo: boolean

    Is call with video

  • offerTime: number

    timestamp of offer

  • peerJid: Wid

    Wid of sender with device id

  • sender: Wid

    Wid of sender without device id

WPP.on('call.incoming_call', (call) => {
// Your code
//Example: Reject any incoming call
WPP.call.rejectCall(call.id);
});