Right before you execute the DB query, use the Hold toolstep (telephony tab). As soon as it returns, use the PickUp toolstep on the call. If you want to play a specific file (it will loop) you set the OnHoldAudioFile to a filename that exists in the resources directory. You might want to cache the value and then reset it to the existing after you are done with this.