Discussion:
[asterisk-users] live audio stream in asterisk
Arjan Kroon | Mobillion
2010-12-24 13:36:40 UTC
Permalink
Hi,

Is it possible to use a live audio stream in asterisk

I want to call a number and then hear an external audio stream.
For example http://www.radioveronica.nl/radioveronicaplayer/radioveronica.asx

I thought it was possible to use musiconhold, but I did not get it working.

This is my musiconhold.conf
;
; Music on Hold -- Sample Configuration
;
[general]

[default]
mode=custum
directory=/var/lib/asterisk/mohmp3/stream,http://www.radioveronica.nl/radioveronicaplayer/radioveronica.asx

This is my extension.conf
exten => _X.,1,Answer
exten => _X.,n,MusicOnHold()


If I look in the CLI I get the following error:
Executing [***@test_moh:2] MusicOnHold("SIP/arjankroon-00000000", "") in new stack
-- Music class default requested but no musiconhold loaded.
[Dec 24 14:34:03] NOTICE[9030]: channel.c:4006 __ast_read: Dropping incompatible voice frame on SIP/arjankroon-00000000 of format gsm since our native format has changed to 0x4 (ulaw)

I'm using asterisk 1.8


Can anybody help me?

Kind regards,

Arjan Kroon
Mobillion BV
Daniel Tryba
2010-12-24 15:11:45 UTC
Permalink
Post by Arjan Kroon | Mobillion
Is it possible to use a live audio stream in asterisk
Yes, there are examples on:
http://www.voip-info.org/wiki/view/Asterisk+config+musiconhold.conf#Exampleusingasxmmswmvstreamsoranythingth

BTW You have a typo in your config (custum should be custom).
--
Daniel Tryba
Arjan Kroon | Mobillion
2010-12-27 08:56:56 UTC
Permalink
Hi Daniel/asterisk users,

You're correct, a typo.

If got now to stream configured in musiconhold.conf

[Hitz]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://scfire-dtc-aa02.stream.aol.com:80/stream/1074

[sbs]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://www.radioveronica.nl/radioveronicaplayer/radioveronica.asx

If I try to play the Hitz stream, it works correctly and if I try to play the sbs stream I hear nothing?
exten => s,n,MusicOnHold(Hitz)
or
exten => s,n,MusicOnHold(sbs)

The sbs stream is a mp3 stream with a bitrate of 64/128 kpbs
The Hitz stream I don't know what kind of stream this is? Maybe someone knows this?

Does anybody have an idea how the sbs stream must be streamend?

Regards,

Arjan Kroon
Mobillion BV


-----Oorspronkelijk bericht-----
Van: asterisk-users-***@lists.digium.com [mailto:asterisk-users-***@lists.digium.com] Namens Daniel Tryba
Verzonden: 24-12-2010 16:12
Aan: Asterisk Users Mailing List - Non-Commercial Discussion
Onderwerp: Re: [asterisk-users] live audio stream in asterisk
Post by Arjan Kroon | Mobillion
Is it possible to use a live audio stream in asterisk
Yes, there are examples on:
http://www.voip-info.org/wiki/view/Asterisk+config+musiconhold.conf#Exampleusingasxmmswmvstreamsoranythingth

BTW You have a typo in your config (custum should be custom).
--
Daniel Tryba

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Daniel Tryba
2010-12-27 10:30:27 UTC
Permalink
Post by Arjan Kroon | Mobillion
[sbs]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0 http://www.radioveronica.nl/radioveronicaplayer/radioveronica.asx
The sbs stream is a mp3 stream with a bitrate of 64/128 kpbs
The Hitz stream I don't know what kind of stream this is? Maybe someone knows this?
Does anybody have an idea how the sbs stream must be streamend?
mgp123 doens't understand .asx, you could/should use mplayer (with
-playlist) or any other player that understands asx like in the URL I
posted. But if you take a look at the content of the .asx you'll see
that it contains links to mp3 streams. You could pick one of them
manually, but expect the URLs to change in the future and break your
MOH.
--
Daniel Tryba
Danny Nicholas
2010-12-27 16:27:11 UTC
Permalink
-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Arjan Kroon |
Mobillion
Sent: Monday, December 27, 2010 2:57 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] live audio stream in asterisk

Hi Daniel/asterisk users,

You're correct, a typo.

If got now to stream configured in musiconhold.conf

[Hitz]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0
http://scfire-dtc-aa02.stream.aol.com:80/stream/1074

[sbs]
mode=custom
application=/usr/local/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 0
http://www.radioveronica.nl/radioveronicaplayer/radioveronica.asx

If I try to play the Hitz stream, it works correctly and if I try to play
the sbs stream I hear nothing?
exten => s,n,MusicOnHold(Hitz)
or
exten => s,n,MusicOnHold(sbs)

The sbs stream is a mp3 stream with a bitrate of 64/128 kpbs
The Hitz stream I don't know what kind of stream this is? Maybe someone
knows this?

Does anybody have an idea how the sbs stream must be streamend?

Regards,

Arjan Kroon
Mobillion BV

ASX is ASF (Microsoft Advanced Systems Format). This format is not
presently supported by mpg123 (as of version 1.13.0). If you want to use
the ASF stream, you're going to have to either use something besides mpg123
or repackage it into a regular mpeg format.

Loading...