How to log incoming calls in WhatsApp?#
All incoming calls log automatically. Notifications must be enabled in one of the following ways:
- Turn on notifications
Receive call notifications
in console - Enable
incomingCallWebhook
andincomingWebhook
notifications using the method SetSettings
To handle log incoming calls, use one of the options:
- Use SDK libraries by GREEN-API. Choose the one of the Webhook Server Library's variant in the preferred programming language.
- For testing incoming notifications, you can use a test web service, for example webhook.site.
After setting up the typeWebhook: incomingCall
notification handler, you can track the status:offer
status.
After an incoming call is received, the system generates two notifications in turn:
- The first notification has the status
offer
, which indicates that a new incoming call has been received. - The second notification has one of the statuses:
pickUp
,hangUp
,missed
ordeclined
.
Call termination statuses:
pickUp
- "Answered call"hungUp
- "Dropped call" - the operator has dropped the call or the system has a setting or the Do Not Disturb function is activated on the phone (hung up)missed
- "Missed call" - the caller has ended the calldeclined
- "Missed call" - caller did not wait for an answer
If you need more information, please read next articles Incoming call and Working with incoming calls.