better_messages_call_created
REQUIREMENTS
To be able to implement this guide, you need to learn how to insert PHP snippets to your website.
You can find guide here: WP Beginner
Compatibility
This action compatible with Better Messages 2.10.0 or higher
WebSocket Version Guide
This functionality available only with WebSocket Version
This action is triggered when the user is starting a call to other user. This action does not mean that the call was answered, only the start of call initiation.
add_action( 'better_messages_call_created', 'on_call_created', 10, 4 );
function on_call_created( $message_id, $thread_id, $user_id, $type ){
// var_dump( $message_id ); # Message ID of the call message
// var_dump( $thread_id ); # Thread ID where call message is created
// var_dump( $user_id ); # User ID who initiated the call
// var_dump( $type ); # Call type: audio or video
}