Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I need help here, I've been looking for a perl script that would allow me to call a regular phone number and play a recorded message of my choice. And I'm having no luck with it. Does anyone seeing some program out there like that or point me to the right direction where I could start looking for it?
Thanks a lot!

Replies are listed 'Best First'.
Re: Phone Message Player Script
by meredith (Friar) on Jul 12, 2004 at 14:25 UTC

    This question kinda depends on what hardware/software you have, and I don't know of any pre-made scripts for doing this. I can refer you to the building blocks, though. If you have a consumer-grade voice modem, Modem::Vgetty is probably what you want. It can play prerecorded audio clips in a certain format onto the line, along with some other possibilities for interaction. If you are looking to generate audio for this purpose, check out the Festival modules for text-to-speech. I think there is also a tutorial or something about Modem::Vgetty, if you google it. Good Luck!

    mhoward - at - hattmoward.org
Re: Phone Message Player Scritp
by tachyon (Chancellor) on Jul 12, 2004 at 14:23 UTC

    It depends on your OS just how you do it so we need to know that. In essence you need to control a dialer/modem device and stream some data through it. Device::SerialPort or Modem::Vgetty may help. There are existing apps (shareware) that do this. Google for 'phone dialer play message' or similar.

    cheers

    tachyon

Re: Phone Message Player Scritp
by artist (Parson) on Jul 12, 2004 at 18:25 UTC
    I am not sure how you are going to implement this, but it is a wonderful idea. You can record different numbers/extensions off your regular phone, for different songs and play the song according to the number you pressed. Please share it with us if possible.
      I don't think your intent was much like the OP's, but maybe you should look at Modem::Vbox. There is also a module for complete IVR (Interactive Voice Response) systems: Ivrs =)
      mhoward - at - hattmoward.org
Re: Phone Message Player Scritp
by zentara (Cardinal) on Jul 13, 2004 at 14:15 UTC
    There are some similar scripts out there for "receiving" like Tk-Voice, an answering machine. Just google for them and you ought to be able to gleam clues from them.

    Like the other posts say, it is really dependent on your hardware. I would think along these lines.

    Connect the line-out from your sound card to the audio-in on the modem. Use Device-Serial Port to gain control of the modem, use Audio's "dial" script (or something similar) to send the numbers tones. The hard part is detecting an answer :-)

    Once you determine you have an answer, use audio to play your wav file.

    Device-SerialPort has quite of few examples to get you started.


    I'm not really a human, but I play one on earth. flash japh