How to Use Incoming SMS to Play Audio File

This sample demonstrates how to initiate playing of audio files by using SMS messages. It is especially useful for radio stations where a song, a jingle or a commercial can be remotely started with a single SMS.

File PlayAudio.exe used in this sample is located in the folder:

    C:\Program Files\CodeSegment\SMS Studio\Samples\InfoService

This application receives the name of the audio file, extracted from the incoming SMS message, and starts playing it. Note that this application can play all audio formats supported by your system (wave, midi, mp3, etc).

How to run this sample

  1. Click the New button on the main toolbar and select the Info service option in the New Service dialog.
  2. Click the Setup button on the main toolbar to display the Info Setup dialog.
  3. In the General tab of the Info Setup dialog click the Add button to display the Add Rule dialog.
  4. In the General tab of the Add Rule dialog enter the following parameters:
    Name: Play Audio
    Pattern: *
    Action: Execute external application
  5. In the Execute tab of the Add Rule dialog enter the following parameters:
    External application: PlayAudio.exe - use the selection button ( ... ) to locate and select the external application.
    Application parameters: "C:\Windows\Media\%MsgText%" - where C:\Windows\Media is the folder where your audio files are located.
  6. Click the Add button to close the Add Rule dialog.
  7. Click the OK button to close the Info Setup dialog.
  8. Click the Start button on the main toolbar to start the Info service.
  9. Use Tools / Receive Message option in the main menu to display the Receive Message dialog. Fill in the Text field and click the Receive button. For example, if you have a file C:\Windows\Media\chimes.wav you can use the following text chimes.wav. The Info service will receive this message and run the PlayAudio.exe application which will play the audio file specified in the message text.

Related topics

Info Rules

 

Copyright © 2002-2007 CodeSegment. All rights reserved.

   www.codesegment.com