Check for object colliding with bounds?

Hello, I am making a pong game and want the ball to make sounds when it bounces off of the walls. But i cannot figure out how to, any help is appreciated. Thanks!

Here is a snippet of my code:

ball = this.physics.add.image(this.physics.world.bounds.width/2,this.physics.world.bounds.height/2,'ball').setCollideWorldBounds(true).setBounce(1,1);
if( /* is colliding with bounds */  ){
   sfx_wallBounce.play();
}

:wave:

https://labs.phaser.io/edit.html?src=src/physics/arcade/world%20bounds%20event.js

Is there a way to do that without making a group? My game stops when I try to replace group.getChildren() with the ball.

Open the browser console so you can see errors.

sprite.body.collideWorldBounds = true;
sprite.body.onWorldBounds = true;