How to set up port mirroring

Port mirroring is used on a network switch to send a copy of network packets seen on one switch port (or an entire VLAN) to a network monitoring connection on another switch port.

Port mirroring is also referred to as a Switch Port Analyzer (SPAN) port,it just depends on the type of switch used,the switch needs to support mirroring.

The phones to be recorded/mirrored should be IP phones

The source ports can be the individual ports that the phones are plugged in on the switch
If the phones are all plugged in on the same switch the uplink of that switch can be the source port as well
The voice Vlan

The port that the pabx plugs on the switch.
If this option is used and there are SIP trunks, please ensure that the Audio/RTP is anchored or proxied through the PABX. Otherwise the port of the SIP gateway will also need to be mirrored.

The destination port is the port on the switch where the copy of the voice traffic should be sent to.

This is the port where a network cable should be plugged in. Then plugged on the second interface of the recorder.

To test if the copy of traffic is received on the destination port you can plug in a laptop into the destination port and run Wireshark to check if you received Voice UDP traffic.

Example configs

[How to Configure Port Mirroring on Cisco Switch - NetworkVerge]