TIPS Stream to Phones via RTP with Airplay & Asterisk

Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
Many VOIP phones can now utilize RTP Multicast for Paging across an organization. It takes SIP out of the equation, has low overhead, is fast and can be a great solution when you need to send a Page or emergency information to a multitude of phones at the same time.

Later versions of Asterisk allow you to send a Multicast Page by way of a Dial command but if you'd like to do some testing, send music or link up to some other audio source you may need to create your own stream outside of Asterisk.

There are a few different ways to do that including writing your own code but if you'd like a starting point check out the following:

http://www.codeproject.com/Articles/394890/Play-or-Capture-Audio-Sound-Send-and-Receive-as-Mu

Within the zip file you'll find a free Windows app called MulticastStreamer that you can take out for a spin. Set a Multicast IP address ( 224.0.0.0 to 224.0.0.255) and port, Samples per Second to 8000, Bits per sample to 16. Other settings are your own choice. Then configure Multicast on the phones using the same Multicast IP and port. These apps also supply source code (Visual Studio project) so you can make modifications and roll your own. The same author has a streaming app for TCP.

If all goes as planned your phones speaker will become active and start playing whatever you are sending!

There are other options:

VLC (VideoLan) http://www.videolan.org/index.html
MAST http://www.aelius.com/njh/mast/
Acrovista (payed) http://www.acrovista.com/music-service/

Can also do this kind of thing and across different OS's...

Another interesting element of this is utilizing Shairport which is a utility that allows you to stream audio from an IOS (Apple) product to your device as if it were an Airplay receiver (like the Airport Express). There is even a Shairport version that runs on the Raspberry PI.

Shairport for Windows is the quickest way to illustrate the concept:

http://sourceforge.net/projects/shairport4w/

Shairport can also be run on Linux so if you take this a few steps forward you'd be able to marry the Shairport code with the Multicast RTP code and create an Airplay "device" in software that when selected on an IOS device would play through the speakers on your phones.

Until someone puts that together you can run Shairport for Windows and MulticastStreamer on the same Windows desktop, link the audio together and get the same outcome.

It's something new to experiment with and may be helpful for your next installation!

Brian
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
briankelly63: Admittedly not a Windows whiz here, but...
MultiCast Streamer app only shows Microphone option in the Input pull-down so there's no way to link the audio from the shairport4w audio stream. :drool5:
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Found it...

First, open the Sound control panel. There are 3 ways to do this: Start menu Control Panel Flyout, Control Panels Window, or Right-Click on the Speaker icon.

If you do NOT see "Stereo Mix" in your Recording tab, right-click on an empty area and make certain that both "Show Disabled Devices" and "Show Disconnected Devices" are checked. If this brings up the Stereo Mix input, be sure to Enable it by right-clicking on it and selecting "Enable".

Now, ensure that "Stereo Mix" is selected as the default device in the Recording tab. Open it and set the Levels to 100.

Then set Stereo Mix as the Input Device with Multicast Streamer app.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Works as advertised, but...

At least on Yealink T46G, the phone treats the RTP Stream as an auto-answered phone call, i.e. a page. To use the phone as a phone again, you have to hangup the RTP Stream "call." Then you're back in business except you can't get the RTP Stream again unless Multicast Streamer on the Windows machine is stopped and restarted.

Also, there doesn't appear to be a way to have Multicast Streamer start when there's a stream from the iPhone/iPad and stop when the stream ends.

Maybe we'll have a bit more control by moving some of this to Linux from the Windows platform. Worth a try anyway. Thanks, briankelly63 for all the investigative work!!

Here's where you set up the RTP Stream in the T46G Phone GUI. Just be sure the settings match what you plug into Multicast Streamer bold entries in Brian's post above.

BPt2fg-CMAMdwGa.jpg:large


Here is working dialplan code using the above settings to initiate an RTP Stream by dialing 1234 from any phone on your Asterisk 1.8 or Asterisk 10/11 server:
Code:
exten  => 1234,1,Dial(MulticastRTP/basic/224.0.0.1:1234)
 
Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
Glad you found the drop downs. I think as more people use this kind of feature the phone manufacturers will add some configuration options. To avoid hearing the music on the PC you are running these utilities on you can set both apps to communicate over one of the Line ports. Just make sure they are both set to the same thing.

What I've outlined although functional is more proof of concept.

Taking the linux version of Shairport and adding an option for a ulaw rtp stream doesn't seem like that big a deal. There is an "amixer" command that could probably be extended.

The code needs to work in such a way that when the music stops, the stream stops and the open channel on the phone closes. This way if you start the music again it will re-establish the stream and the channel on the phone will re-open. I looked at the source for the streamer in Visual Studio 2010, it seems trivial to add that functionality since the stream already stops and starts by itself when you play a wav file.

The Yealink and the Aastra 6757i that I tested work the same way in terms of hanging up on the stream. There needs to be an option added in firmware that will allow the channel to re-open on the phone when it becomes idle again.

When you are on a call or receive a call the phone places the stream on hold so you can go back to it.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
There are so many possible uses for this. In the corporate setting, it provides a perfect emergency broadcast service for fires, earthquakes, patient escapes from the loony bin, etc. In a school setting, it could inexpensively replace costly PA systems requiring dedicated wiring, speakers, and amplifiers. This solution has the added benefit of letting anyone broadcast from anywhere by simply picking up a nearby phone and dialing some (hopefully password-protected) extension number. Separate RTP streaming IP addresses also could be configured on departmental phones to allow automobile dealership zone paging for parts, sales, or service. So a receptionist could park a call and then announce it to a particular department by pressing a softkey on the sidecar. And you still could have an additional emergency channel that reaches everybody. Just set up a different number to page each zone as well as the entire organization. Very cool.

Keep in mind that ONE LINE of Asterisk dialplan code handles all of the heavy lifting.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Here's the $350 SIP-compatible Cyberdata ceiling speaker that supports multicast RTP. Complete tutorial here. Click on image for Nerd Vittles referral link to Amazon.

Also available is a $400 POE Doorphone model that also supports multicast RTP streaming...

 
Last edited by a moderator:

Faizan

New Member
Joined
Oct 19, 2018
Messages
1
Reaction score
0
Sorry to bump a 11 year old topic, but this is exactly What i am trying to do however its not working

I am trying this on polycom 550 phone, any help will be appreciated.
 

Members online

Forum statistics

Threads
25,779
Messages
167,505
Members
19,199
Latest member
leocipriano
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top