Family, Work, Life

Howto download SIPGATE Voicemails (WAVs)

Moin

Sipgate has a very nice API to access the phonebook or write click2call applications. You can also check your voicemail (or as it is called in the API Unified Message). Unfortunately you can only get information on the amount of messages and if they are read or not. With a small wget script you can also download the WAV files and send them for example to your Nabaztag. Its cool to come home and your Nabaztag tells you about absent calls end presents you the message without picking up the phone or starting the laptop.

You need one wget call to get your PHPsession key:

 wget --no-check-certificate \
--save-cookies /home/ansi/.cookies/sipgate \
--keep-session-cookies \
--post-data "uname=Username&passw=Passwd&lasturi=%2Fuser%2Findex.php&jsh=1&okey.x=0&okey.y=0" \
"https://secure.sipgate.de/user/index.php"

Important to set your Username and Passwd in the script. Wget will then store your PHPsession key to your .cookies folder.

With

 wget "https://secure.sipgate.de/user/voicemail.php?\
       file=0001&status=new" \
       --load-cookies /home/ansi/.cookies/sipgate \
       --no-check-certificate
       -O 1.wav

you can download your voice messages as wav files. Then a little “lame” and an Nabaztag API call and your Voicemail will be presented to you as soon as you come home. Have fun.

  • Share/Bookmark

3 Responses to “Howto download SIPGATE Voicemails (WAVs)”

  1. Nice, thank you for this useful information. But i found a mistake, you have to change the url from this:
    file=0001&status=old
    to that:
    file=0000&status=new
    So you are getting not the second oldest message, but always the newest.

    Do you have any idea how to convert this on a webserver without lame?

  2. Moin Sixtus
    Oh yes, you are absolutely right. I developed this script when I haven’t any new messages. :-)

    Without lame. Hm, there are several other mp3 encoder available. No need to use lame. Or do I misunderstand your question?
    Greetings
    Ansi

  3. moin ansi,
    thanx a lot for your hints!

    I use wget for windows (okok … it is not linux)
    The login is working properly

    But if I try to receive a Faxreport

    https://secure.sipgate.de/user/fax/report.php?sid=xxxxxxx

    wget receives a file with “window_close()” …

    I’m interested in the image:
    https://secure.sipgate.de/user/fax/faximg.php?sid=xxxxx&img=fax_000.gif

    I’ll keep on trying …

    Gunnar

Leave a Reply