@wppconnect-team/wppconnect - v1.36.4
    Preparing search index...

    Interface CallEventTypes

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

    Properties

    "call.incoming_call": {
        id: string;
        isGroup: boolean;
        isVideo: boolean;
        offerTime: number;
        peerJid: WAJS.whatsapp.Wid;
        sender: WAJS.whatsapp.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: WAJS.whatsapp.Wid

      Wid of sender with device id

    • sender: WAJS.whatsapp.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);
    });