Help with Dial Plan to allow remote pstn provider voicemail access

I have a VOIP provider that supplies me with a locked down HT-502 box.
They don’t allow Asterisk type accounts, so I am connecting the HT-502 line ports to a pair of SPA-3102’s, then it all flows to my FreePBX system.

I am doing my own voicemail using FreePBX, and that works great.
But sometimes my HT-502 doesn’t register with the VOIP provider and when someone calls those numbers they get my voicemail at the VIOP provider’s system. I then have to go retrieve the messages.

I get an email from them with the message, and I can login to their website and listen to them and delete them.

I can also call in and access the voicemail by dialing *21 when I connect an analog phone direct to the HT-502.

In order to select the correct outside line I am set up to dial 49 and then the desired phone number.

To put it another way, I am trying to make the phone dial 49, then once there is a real pots dial tone dial *21. Any advice is appreciated.