How do I make an electrical signal from a switch into an AVCRP signal to control audio player on my phone
Most bluetooth modules that have audio controls have two options. One is basic gpio for button input. The other is serial rx/TX or some other protocol (spi/i2c/apple ipod communication/etc) for digital communication. 
The rest is handled by the firmware of the IC.

Look up the protocol for your specific bluetooth IC and follow that, or look for a module that has button inputs available.

There are a few example projects online of someone taking a generic bluetooth audio receiver, and hacking in a microcontroller or buttons to control the source. One did it with a factory radio, jeep or toyota. It's not hard once you know the protocol needed.

Here is one using a 2 dollar bluetooth audio receiver, and a MSP430 connected to the UART on the bluetooth IC. They use a remote control IR receiver, but the same can be done with buttons instead.

The AVRCP protocol on the phone side is essentially just a bluetooth keyboard. That's it.