title: Playing voice over modem from a Windows service
body: <p>I'm developing a VB.NET Windows service which is costantly checking a BMS database for new alarms and making phone calls to warn operators remotely. I'm currently using a .NET TAPI wrapper and the SAPI 5.3 interop assembly, and the steps I'm taking to speak over the phone are:</p>
  
  <ol>
  <li>Initialize TAPI interface;</li>
  <li>Make the call to the operator's number;</li>
  <li>Take the voice modem waveOut device id</li>
  <li>Set the voice output to that device id;</li>
  <li>Let SAPI do the magic.</li>
  </ol>
  
  <p>This is all working fine if I compile the code as a Windows console or forms application, but as soon as I compile and run it as a Windows Service, step 5 never occurs - voice modem calls but stays silent; everything else works, even digit monitoring.
  Now I know windows services are not supposed to interact with the desktop, so things like UI elements and playing sounds are a no-no, but I'm struggling to find an alternative which doesn't involve using the wave API and can be developed in a reasonable timeframe. Any ideas? </p>