Discussion:
[Asterisk-Users] MP3Player problem
Areski
2003-11-06 15:18:01 UTC
Permalink
Hi all,


Is there something wrong with MP3Player ??? I always get the message
below when I try to play a MP3 :


-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
WARNING[79885]: File rtp.c, Line 374 (ast_rtp_read): RTP Read error:
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0


I already saw some old posts about it but no solutions !
part of an old post :
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent =
command (exactly the same) starts playing immediately. Maybe this causes =
the timeout in *?"


Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
David Gomillion
2003-11-06 16:25:23 UTC
Permalink
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.

HTH,
David Gomillion

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Areski
Sent: Thursday, November 06, 2003 9:18 AM
To: Asterisk-Users Mailing-list
Subject: [Asterisk-Users] MP3Player problem

Hi all,


Is there something wrong with MP3Player ??? I always get the message
below when I try to play a MP3 :


-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
WARNING[79885]: File rtp.c, Line 374 (ast_rtp_read): RTP Read error:
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0


I already saw some old posts about it but no solutions !
part of an old post :
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent =
command (exactly the same) starts playing immediately. Maybe this causes
=
the timeout in *?"


Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
Areski
2003-11-06 17:25:11 UTC
Permalink
Well, thx for your answer... In fact, I have the both installed !
I don't think that it s a problem, isn't it ?

Regards,
Areski
Post by David Gomillion
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.
HTH,
David Gomillion
-----Original Message-----
Sent: Thursday, November 06, 2003 9:18 AM
To: Asterisk-Users Mailing-list
Subject: [Asterisk-Users] MP3Player problem
Hi all,
Is there something wrong with MP3Player ??? I always get the message
-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0
I already saw some old posts about it but no solutions !
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent =
command (exactly the same) starts playing immediately. Maybe this causes
=
the timeout in *?"
Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
David Gomillion
2003-11-06 18:48:54 UTC
Permalink
I've never had both installed, but I heard that all life will cease to
exist, or something else really bad... Can't remember exactly what it
was ;)

But all kidding around aside, I read in one of the archives that having
both installed kept it from working right. So my suggestion is to
uninstall 321.

-----Original Message-----
From: asterisk-users-***@lists.digium.com
[mailto:asterisk-users-***@lists.digium.com] On Behalf Of Areski
Sent: Thursday, November 06, 2003 11:25 AM
To: Asterisk-Users Mailing-list
Subject: RE: [Asterisk-Users] MP3Player problem

Well, thx for your answer... In fact, I have the both installed !
I don't think that it s a problem, isn't it ?

Regards,
Areski
Post by David Gomillion
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.
HTH,
David Gomillion
-----Original Message-----
Sent: Thursday, November 06, 2003 9:18 AM
To: Asterisk-Users Mailing-list
Subject: [Asterisk-Users] MP3Player problem
Hi all,
Is there something wrong with MP3Player ??? I always get the message
-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0
I already saw some old posts about it but no solutions !
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent
=
Post by David Gomillion
command (exactly the same) starts playing immediately. Maybe this
causes
Post by David Gomillion
=
the timeout in *?"
Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Rich Adamson
2003-11-06 20:25:17 UTC
Permalink
Take a look at:
http://www.voip-info.org/wiki-Asterisk+mpg123+redhat
as there are steps for installation, and a sample CLI of a working MOH
system that might be useful.

------------------------
Post by David Gomillion
I've never had both installed, but I heard that all life will cease to
exist, or something else really bad... Can't remember exactly what it
was ;)
But all kidding around aside, I read in one of the archives that having
both installed kept it from working right. So my suggestion is to
uninstall 321.
-----Original Message-----
Well, thx for your answer... In fact, I have the both installed !
I don't think that it s a problem, isn't it ?
Regards,
Areski
Post by David Gomillion
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.
HTH,
David Gomillion
-----Original Message-----
Hi all,
Is there something wrong with MP3Player ??? I always get the message
-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0
I already saw some old posts about it but no solutions !
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent
=
Post by David Gomillion
command (exactly the same) starts playing immediately. Maybe this
causes
Post by David Gomillion
=
the timeout in *?"
Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
Areski
2003-11-07 14:38:29 UTC
Permalink
Hi !

Now I can hear nice mp3 through my phone... Great :P
And many thanks for your posts. Now it's working fine... hmmm almost !!!

In fact, I m using DialenMP3.agi. It's a real nice agi script...
For those which would not know, you will find it here :
http://asterisk.gnuinter.net/files/digium/asterisk-ng/agi/

What the agi script does, it's "EXEC MP3Player \"$key\"\n";
in which the key is the mp3 to play.

Well the things weird, really weird, it's that the process, launched by
the agi script, is never killed !!! Any ideas to fix that ?!?


Thanks in advance,
Areski
Post by Rich Adamson
http://www.voip-info.org/wiki-Asterisk+mpg123+redhat
as there are steps for installation, and a sample CLI of a working MOH
system that might be useful.
------------------------
Post by David Gomillion
I've never had both installed, but I heard that all life will cease to
exist, or something else really bad... Can't remember exactly what it
was ;)
But all kidding around aside, I read in one of the archives that having
both installed kept it from working right. So my suggestion is to
uninstall 321.
-----Original Message-----
Well, thx for your answer... In fact, I have the both installed !
I don't think that it s a problem, isn't it ?
Regards,
Areski
Post by David Gomillion
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.
HTH,
David Gomillion
-----Original Message-----
Hi all,
Is there something wrong with MP3Player ??? I always get the message
-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0
I already saw some old posts about it but no solutions !
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent
=
Post by David Gomillion
command (exactly the same) starts playing immediately. Maybe this
causes
Post by David Gomillion
=
the timeout in *?"
Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Areski
2003-11-07 15:01:42 UTC
Permalink
Hi !

Now I can hear nice mp3 through my phone... Great :P
And many thanks for your posts. Now it's working fine... hmmm almost !!!

In fact, I m using DialenMP3.agi. It's a real nice agi script...
For those which would not know, you will find it here :
http://asterisk.gnuinter.net/files/digium/asterisk-ng/agi/

What the agi script does, it's "EXEC MP3Player \"$key\"\n";
in which the key is the mp3 to play.

Well the things weird, really weird, it's that the process, launched by
the agi script, is never killed !!! Any ideas to fix that ?!?


Thanks in advance,
Areski
Post by Rich Adamson
http://www.voip-info.org/wiki-Asterisk+mpg123+redhat
as there are steps for installation, and a sample CLI of a working MOH
system that might be useful.
------------------------
Post by David Gomillion
I've never had both installed, but I heard that all life will cease to
exist, or something else really bad... Can't remember exactly what it
was ;)
But all kidding around aside, I read in one of the archives that having
both installed kept it from working right. So my suggestion is to
uninstall 321.
-----Original Message-----
Well, thx for your answer... In fact, I have the both installed !
I don't think that it s a problem, isn't it ?
Regards,
Areski
Post by David Gomillion
Make sure you have mpg123 installed instead of mpg321... It's in the
archives somewhere... that's what fixed my install.
HTH,
David Gomillion
-----Original Message-----
Hi all,
Is there something wrong with MP3Player ??? I always get the message
-- Executing MP3Player("SIP/phone1-83f9",
"/var/lib/asterisk/mohmp3/02") in
new stack
Resource temporarily unavailable
NOTICE[79885]: File app_mp3.c, Line 93 (timed_read): Selected timed
out/errored
out with 0
I already saw some old posts about it but no solutions !
"I found that executing the new mpg123 with: mpg123 sample-hold.mp3 =
sometimes takes a couple of seconds to start playing. Every subsequent
=
Post by David Gomillion
command (exactly the same) starts playing immediately. Maybe this
causes
Post by David Gomillion
=
the timeout in *?"
Can anyone give me a direction to solve this problem ?
Thanks in advance,
Areski
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Ernest W. Lessenger
2003-11-07 16:56:18 UTC
Permalink
Post by Areski
Hi !
Now I can hear nice mp3 through my phone... Great :P
And many thanks for your posts. Now it's working fine... hmmm almost !!!
In fact, I m using DialenMP3.agi. It's a real nice agi script...
http://asterisk.gnuinter.net/files/digium/asterisk-ng/agi/
What the agi script does, it's "EXEC MP3Player \"$key\"\n";
in which the key is the mp3 to play.
Well the things weird, really weird, it's that the process, launched by
the agi script, is never killed !!! Any ideas to fix that ?!?
You need to...

1) Set up a signal handler to handle the case when the mp3 player dies
before you are ready (SIGCHILD)
2) Kill the mp3 player before you exit the AGI script (kill <procid>)

I'll help you with this if you need it, it's really not all that hard.

--Ernest
Areski
2003-11-07 17:20:38 UTC
Permalink
I though to it also, but really I don't know how can I get the pid of a
process ran by asterisk.

I mean, the only think I do it's :print "EXEC MP3Player \"$key\"\n";
Then asterisk take the hand with mp3player applications that will launch
mpg123, etc...

How can I get this pid of the good mpg123 process ? (even if there is
more than one mpg123 running...)


If you can give me a hand or a direction, it would be really great,
Thx,
Areski
Post by Ernest W. Lessenger
Post by Areski
Hi !
Now I can hear nice mp3 through my phone... Great :P
And many thanks for your posts. Now it's working fine... hmmm almost !!!
In fact, I m using DialenMP3.agi. It's a real nice agi script...
http://asterisk.gnuinter.net/files/digium/asterisk-ng/agi/
What the agi script does, it's "EXEC MP3Player \"$key\"\n";
in which the key is the mp3 to play.
Well the things weird, really weird, it's that the process, launched by
the agi script, is never killed !!! Any ideas to fix that ?!?
You need to...
1) Set up a signal handler to handle the case when the mp3 player dies
before you are ready (SIGCHILD)
2) Kill the mp3 player before you exit the AGI script (kill <procid>)
I'll help you with this if you need it, it's really not all that hard.
--Ernest
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Ernest W. Lessenger
2003-11-07 19:27:27 UTC
Permalink
Post by Areski
I though to it also, but really I don't know how can I get the pid of a
process ran by asterisk.
I mean, the only think I do it's :print "EXEC MP3Player \"$key\"\n";
Then asterisk take the hand with mp3player applications that will launch
mpg123, etc...
You're right, I thought you were using EAGI...

That app seems to work fine for me. MPG123 does seem to be giving asterisk
trouble, generally. I tried a few different changes, but nothing resulted
in a fix. Is MPG123 maybe not responding to a SIGKILL properly?

--Ernest
Areski
2003-11-10 12:32:07 UTC
Permalink
Post by Ernest W. Lessenger
Post by Areski
I though to it also, but really I don't know how can I get the pid of a
process ran by asterisk.
I mean, the only think I do it's :print "EXEC MP3Player \"$key\"\n";
Then asterisk take the hand with mp3player applications that will launch
mpg123, etc...
You're right, I thought you were using EAGI...
Well, I can use EAGI, but I still don't know how to get the pid in this
script... zup =(
Post by Ernest W. Lessenger
That app seems to work fine for me. MPG123 does seem to be giving asterisk
trouble, generally. I tried a few different changes, but nothing resulted
in a fix. Is MPG123 maybe not responding to a SIGKILL properly?
It doesn't seem, I use to kill the process manually after the test and
it's working (kill -9 pid)


When asterisk run mpg123, there is two process running (one is forked
probably), it seem that one is well killed by asterisk and the other one
is getting crazy when the other die, in fact it start to take a lot of
cpu load... I m starting to think that the problem is coming from
mpg123!


Thx for u help,
Aresk
Post by Ernest W. Lessenger
--Ernest
_______________________________________________
Asterisk-Users mailing list
http://lists.digium.com/mailman/listinfo/asterisk-users
Areski
2003-11-14 17:38:58 UTC
Permalink
Hi all,

Finally, I replaced the version of mpg123 by the last one and now it's
working well to play local mp3 file...


Well, now I m trying to stream a no-local file in my AGI script:
EXEC MP3Player \"http://digitaljukebox.com/Carta.mp3\"

Is it possible to do ???

Thanks in advance,
Aresk
Areski
2003-11-14 17:56:31 UTC
Permalink
Hi all,

Finally, I replaced the version of mpg123 by the last one and now it's
working well to play local mp3 file...


Well, now I m trying to stream a no-local file in my AGI script:
EXEC MP3Player \"http://digitaljukebox.com/Carta.mp3\"

Is it possible to do ???

Thanks in advance,
Aresk
Areski
2003-11-17 12:39:20 UTC
Permalink
Hi all,

Finally, I replaced the version of mpg123 by the last one (0.59r) and now it's
working well to play local mp3 file...

Well, now I m trying to stream a no-local file in my AGI script:
EXEC MP3Player \"http://digitaljukebox.com/Carta.mp3\"

I tried like that but that doesn't work ;(



I tried also to enter directly this instruction:
mpg123 -w ki.wav http://digitaljukebox.com/Carta.mp3
And I get :
HTTP request failed: HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

The file exist, I get do a wget on it...
Some ideas how to get it working ???



Thanks in advance,
Aresk
Ryan Tucker
2003-11-17 22:52:27 UTC
Permalink
Post by Areski
mpg123 -w ki.wav http://digitaljukebox.com/Carta.mp3
HTTP request failed: HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
The file exist, I get do a wget on it...
Some ideas how to get it working ???
It looks like it's doing a redirect from digitaljukebox.com to
www.digitaljukebox.com:

***@shell:~$ telnet digitaljukebox.com 80
Trying 216.98.141.3...
Connected to 4h1413.aspadmin.net.
Escape character is '^]'.
HEAD /Carta.mp3 HTTP/1.0
Host: digitaljukebox.com

HTTP/1.1 302 Found
Date: Mon, 17 Nov 2003 22:48:25 GMT
Server: Apache/1.3.20 Sun Cobalt (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b
PHP/4.0.6 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.25
Location: http://www.digitaljukebox.com/Carta.mp3
Connection: close
Content-Type: text/html; charset=iso-8859-1

Connection closed by foreign host.

Try using www.digitaljukebox.com instead. mpg123 has a simple mind and
likes things to be simple HTTP-wise. -rt
--
Ryan Tucker
Network Engineer
NetAccess, Inc.
1159 Pittsford-Victor Road
Bldg. 5, Suite 140
Pittsford, New York 14534
585-419-8200
www.netacc.net
Areski
2003-11-18 10:20:27 UTC
Permalink
Hi Ryan,

Thanks for your help, that works now ;P
Aresk
Post by Ryan Tucker
Post by Areski
mpg123 -w ki.wav http://digitaljukebox.com/Carta.mp3
HTTP request failed: HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
The file exist, I get do a wget on it...
Some ideas how to get it working ???
It looks like it's doing a redirect from digitaljukebox.com to
Trying 216.98.141.3...
Connected to 4h1413.aspadmin.net.
Escape character is '^]'.
HEAD /Carta.mp3 HTTP/1.0
Host: digitaljukebox.com
HTTP/1.1 302 Found
Date: Mon, 17 Nov 2003 22:48:25 GMT
Server: Apache/1.3.20 Sun Cobalt (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b
PHP/4.0.6 mod_auth_pam_external/0.1 FrontPage/4.0.4.3 mod_perl/1.25
Location: http://www.digitaljukebox.com/Carta.mp3
Connection: close
Content-Type: text/html; charset=iso-8859-1
Connection closed by foreign host.
Try using www.digitaljukebox.com instead. mpg123 has a simple mind and
likes things to be simple HTTP-wise. -rt
Continue reading on narkive:
Loading...