Grandstream’s GSC paging speakers are proving to be incredibly popular. The range features: built-in acoustic echo chamber for loud and clear sound, Wi-Fi for easy deployment and Bluetooth for easy pairing with a smartphone. We recently published an article on a few key verticals where the solution fits in extremely well.

Besides their use for paging, the GSC range is a great solution for playing music. There are a couple of ways that this can be achieved. For both methods, it is strongly recommended to ensure that the GSC device has been updated to the latest firmware at http://www.grandstream.com/support/firmware/ before beginning.

 

Music via Bluetooth

The GSC range can be used as a Bluetooth speaker from any other Bluetooth enabled device. By default, the Bluetooth setting on the GSC3510 and GSC3505 is turned off for security purposes. Each device that will use Bluetooth audio, will first need to be paired via a simple process.

  1. Go to GSC3510/GSC3505 Web GUI > Network Settings > Bluetooth Settings.
  2. Enable “Bluetooth Settings” and enable the option “Visible to Nearby Bluetooth Device” in order to make the GSC3510/GSC3505 visible to other devices for 2 minutes (when the 2 minutes are up you will need to reenable it to make the speaker visible again).
  3. Go to your device’s Bluetooth settings to search for visible devices. The GSC3510/GSC3505 is going to be listed within the visible devices, with the “Device Name” configured on the Web GUI.
  4. Click on the GSC3510/GSC3505 device’s name in order to pair.
  5. Once successfully paired, you can play audio on the paired device and it will play on the GSC speaker.

Bluetooth is an excellent way to play audio between devices, on a device to device basis. But what if you don’t have a Bluetooth enabled device handy? This is where we get into the depths of streaming audio via RTP!

 

Music via streaming media

The GSC range supports listening via Multicast. This can be used to send a RTP music stream from a streaming app, that can be received by the speakers. There are a couple of ways to achieve this depending on whether you are re-broadcasting an existing internet radio station, or are playing an audio file that is local to the server. There are many applications that support streaming audio, however through reviewing online documentation and testing I have found that FFMPEG is the most effective way to achieve this. FFMPEG is a free solution that can be used to record, convert and stream audio and video. In this usage scenario, we will be focussing on the audio aspect of the tool.

FFMPEG will require a dedicated machine (whether that is a server or desktop that is always on) and knowledge of scheduling tasks within Windows to trigger it to run each day for the operating hours of the business. We won’t be covering setting scheduled tasks in this article as most system administrators will know how to facilitate this.

For both rebroadcasting an existing internet radio station and streaming via local media, the installation steps are the same.

  1. Visit https://ffmpeg.org/ and download the Windows binary to the local machine.
  2. Extract the files from the download into an accessible place on the machine.

FFMPEG is command line application that needs to be called with specific switches to get the audio into the format that we require. The general command I have had success with testing is as follows.

 

For rebroadcasting an existing internet radio station:

ffmpeg -re -i HTTPADDRESS -filter_complex aresample=16000,asetnsamples=n=160 -acodec g722 -ac 1 -vn -f rtp rtp://239.1.1.1:5004

You will need to replace the HTTPADDRESS with a link to the internet station of your choosing

 

For local audio:

ffmpeg -stream_loop -1 -re -i ABSOLUTEMUSICFILELOCATION -filter_complex aresample=16000,asetnsamples=n=160 -acodec g722 -ac 1 -vn -f rtp rtp://239.1.1.1:5004

You will need to replace ABSOLUTEMUSICFILELOCATION with the absolute path to the local music file. IE. C:\music\music.mp3

 

You will note these commands differ slightly which is due to the way we obtain the music source. The internet radio station broadcast is slightly simpler, as the station will typically always be online and we don’t have a local MP3 file to loop. Both commands set the filter to complex, and have the same sample rate and sample size for the audio. Both commands also set the audio codec to G722 for a higher bandwidth (thus better quality) format. Finally, both are set to broadcast to rtp address 239.1.1.1 on port 5004. This address is important as the Grandstream paging speakers will only accept multicast audio when listening between IP range 224.0.0.0 to 239.255.255.255.

The local audio file in this usage case is in the MP3 format. MP3 has a slightly higher CPU overhead to decode it compared to WAV format, however the overall reduction in network bandwidth required is advantageous when streaming to multiple paging speakers. The -stream_loop -1 switch sets the file to repeat infinitely, but can be changed to a positive integer value for the amount of times you would like the file to play repeatedly. As FFMPEG is playing a single MP3 file, I would recommend taking a playlist of music and splicing it into a single file via an application such as Audacity.

When running the command either for an internet radio station or local file, you should see a window such as this that shows the audio playing (excuse my taste in test music):

 

 

After we have verified that we have the audio streaming correctly, we can add this to the multicast listening address within the GSC web UI. Note that after adding the address the device may require a restart to apply the settings.

 

 

Note that we have a warning at the top of the screen where the speaker mentions that incoming calls will be rejected, and to set up a blacklist/whitelist/greylist to be able to take pages from those numbers. This is because the multicast audio is treated as an active page on the system that it is broadcasting. Numbers can be added to these lists by going to Calls > Blacklist/White/Greylist.

Playing music on additional speakers is as easy as repeating these steps. And all of them will stream music from the audio source we set up! How have you found the Grandstream GSC paging speakers so far?  If you’ve deployed a speaker already, we’d love to see a photo that we can share on our Social Media channels.   Any questions or want to know more? Send us a broadcast!

music