SIP accessible media services; and why can’t we listen to the radio/podcast from a phone?

Just in case anyone ends up reading this post hoping for an answer to the radio/podcast question in the title, unfortunately it’s not here. It may be possible, and I’m sure one day it will be, but apart from setting up a media server, which is what sipsorcery is all about avoiding, I don’t know how to do it.

Playing around with publicly accessible media services that can be used with sipsorcery is something I always find interesting and have been doing since the mysipswitch days. I’ve blogged about a previous unsuccessful effort to use a hosted VXML service. I got motivated to write this blog entry after reading a post on the mysipswitch forums by gabbar.singh Free stuffs. The post contains a link to a site called Polinez which purports to assign a dedicated US landline number to arbitrary podcast URLs and thereby make them accessible to any PSTN phone. In turn using a SIP Provider or GoogleVoice to call the US landline number makes the podcasts accessible from a SIP phone. I tested it out with a triplej (Australian radio station) free music podcast and while a number of +16414533901 was allocated when calling it I get either a seemingly random podcast or an unavailable message.

Following the experience with Polinez I did a bit of a hunt around for any other way to connect a phone to a podcast along with any free music on hold or other types of streaming services that would work with a phone. Not that suprisingly I didn’t find that many, the web browser is the predominant access mechanism for streams these days and the phone is largely ignored. It’s a shame because there are times when accessing media via a phone, be it hard of soft, is preferrable and even superior to a web browser. Flash media, as used by Amazon’s Cloudfront and YouTube, are great examples of incredibly convenient ways to stream media but with no way to easily access it from a phone :(.

The best I can come up with at the moment are a few numbers that provide streaming on hold music. Like the SIP Application Servers if anyone knows of any others I’d love to hear about them.

  • sip:305@blueface.ie music on hold from Blue Face’s Asterisk server,
  • sip:music@iptel.org fado of Anamar provided by iptel,
  • sip:early_music@iptel.org same as above but this time as early media,

Update 23 Jan 2010 I was mucking around with Tropo to see about getting Blind Transfers working when I spotted that it’s possible to playback mp3’s directly from a Tropo application, something I’d missed before. I know my favourite radio station triplej has a live mp3 feed so that got me wondering whether I would finally have an easy way to play live radio on my IP phone?! The Tropo app required is amazingly only two lines:

answer
say "http://202.6.74.107:8060/triplej.mp3"

My initial test calls failed which made me think that the Tropo server was not able to play mp3 streams and instead needed to fully download and mp3 files it needed to play. I posted a query on the Tropo forums just in case I was missing something. A Tropo staffer responded almost instantaneously that playing mp3 streams was supported and that he was able to connect to the triplej stream without any problems. I tried another few times and after about 4 or 5 calls had success! I am still only able to get the occassional call to connect to the triplej stream but I think that’s the streaming servers’s issue not Tropo’s as I have the same problem trying to connect from Windows Media Player. The reliability aside that’s the first time I’ve been able to listen to a live radio stream on my phone without having to come up with a custom solution involving Asterisk or the LIVE555 Streaming Media Server, AMAZING!

  1. On Hold Music as Early Media?’s avatar

    It would be a nice feature, to be able to define an On Hold Music address in the dialplan, that would be used while holding a call!

    An other, possibly more easy to implement feature, would be the possibility to use an On Hold Music address as early media, while the time in which the caller usually hears the ringing tone. I’v read an article in the German CT magazine in the last day’s, which describes, how to get early media connections with asterisk.
    (Early media means, some media would be played before the call is officially connected, and have to be payed. This will be used i.e. for playing information about costs or for announcements in the network, like “The number you have called is wrong, please call directory ….” )

    Unfortunately the article is in German, but you can translate it i.e. with google translate.
    Original:
    http://www.heise.de/security/artikel/Lauschangriff-in-VoIP-Netzen-270128.html

    Translated:
    http://translate.google.com/translate?hl=de&langpair=de|en&u=http://www.heise.de/security/artikel/Lauschangriff-in-VoIP-Netzen-270128.html&prev=/translate_s%3Fhl%3Dde%26q%3Dhttp://www.heise.de/security/artikel/Lauschangriff-in-VoIP-Netzen-270128.html%26sl%3Den%26tl%3Dde

    Reply

    1. sipsorcery’s avatar

      It’s very easy to whip up a music on hold server with Asterisk. Early media is also very easy, I had to do that once with Blueface when a DID provider didn’t provide correct ringback tones and we had to record a sample of the PSTN tones and then use the Asterisk Background command to generate the early media.

      The point is though that it’s relatively expensive to run and maintain a media processing server such as Asterisk. That’s coupled with the fact that there are already all these audio streaming sources available on the web (Shoutcast, YouTube etc.) and the ideal would be to be able to consume them directly from a phone rather than having to put a custom solution, that also potentially degrades the media, in between.

      Actually in answer to your original point you can use sip:music@iptel.org in your sipsorcery dialplan to get music on hold although to be of any practical use it would need to be coupled with the new transfer functionality that’s been added.

      Reply

    2. How to?’s avatar

      Yes, i still have read a lot of your postings, so i know, that you do everything to have no need for an own media server, which would produce a lot of traffic and load.

      So my question was exactly addressed to what you recommend. I simply look for a way to use one of these streams like music@iptel.org as MOH or as Early Media.

      But i don’t know how!
      Is there still a dailplan parameter, a command or a more complex construct to define this?

      Reply

      1. sipsorcery’s avatar

        You are right, the MOH numbers are not particularly useful for anything but testing. You could transfer an established call to one of those numbers but then you wouldn’t be able to get it back so it would be MOH forever.

        Where I plan to make more use of these types of external streams is the online switchboard where call holding and transferring can be controlled from a web page.

        Reply

      2. Phone Only’s avatar

        A switchboard as webpage is a nice thing and kind of fascinating. But for daily use, when you get a call and have no switchboard interface opened, it would be good to have such features also, if you use only “R” “Hold” or “Transfer” key of your phone. 🙂

        Reply

        1. sipsorcery’s avatar

          At the moment the sipsorcery server passes the hold requests through to the other end of the call. If you’re on a call with a SIP Provider then your callee should get music on hold from the provider. Some softphones will also play some inbuilt music when they get put on hold.

          In theory it would be possible for the sipsorcery server to catch the hold requests and transfer the callee to something like sip:music@iptel.org instead of passing the request through.

          Reply

        2. Joh’s avatar

          Thanks for your posting(s)!

          If someone is willing to setup his/her own mediaserver, could you explain what would be needed and what has to be done to get MOH in a VOIP setting?

          Reply

Reply

Your email address will not be published. Required fields are marked *