[Asterisk-Users] No Audio from Console but mpg123 from shell worksfine.

Tzafrir Cohen tzafrir at cohens.org.il
Sat Oct 15 23:58:31 MST 2005


> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonathan
> k. Creasy
> Sent: Friday, October 14, 2005 10:15 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] No Audio from Console but mpg123 from shell
> worksfine.
> 
> I get audio from mpg123 at the command line but when I load up asterisk
> and try to get audio from the console it looks like it's working, and
> even pauses like it is playing the file but there is no audio coming
> from the speakers. 

One possibility is that the volume is set to 0. aumix can be handy here.

Try simpler things, like playing wav files with 'play' of sox. 

Do you use ALSA or OSS for sound? What kernel version?

> 
> I have searched and looked through the archives and tried to fix this
> but I have had no success. This is an onboard Intel card (AC'97) and I
> also tried an SB Live card with the same result. 
> 
> -Jonathan
> 
> *****************************************
> Asterisk startup: (asterisk -vvvvvvvvvvvc)
> *****************************************
> 
> [chan_oss.so] => (OSS Console Channel Driver)
>   == Parsing '/etc/asterisk/oss.conf': Found
>   == Registered channel type 'Console' (OSS Console Channel Driver)

Asterisk grabs /dev/dsp . I figure you can't play anything at this
point. Though you should get stuck at trying to open it.

> 
> *****************************************
> Dial 100:
> *****************************************
> 
> *CLI>     -- Executing Answer("OSS/dsp", "") in new stack
>  << Console call has been answered >>
>     -- Executing Playback("OSS/dsp",
> "tones-that-follow-are-for-the-deaf") in new stack
>     -- Playing 'tones-that-follow-are-for-the-deaf' (language 'en')
> 
> *****************************************
> *** pause while it plays but no audio ***
> *****************************************
> 
>     -- Executing Hangup("OSS/dsp", "") in new stack
>   == Spawn extension (default, 100, 3) exited non-zero on 'OSS/dsp'
>  << Hangup on console >>
> 
> *****************************************
> Exit asterisk: (ctrl-c which normally I wouldn't do)
> *****************************************
> 
> Beginning asterisk shutdown....
> Executing last minute cleanups
>   == Destroying musiconhold processes
> Yuck! Error in buffer handling...: Connection reset by peer
> Asterisk cleanly ending (2).
> 
> *****************************************
> Run mpg123 (Plays fine): (don't need the /dev/dsp, I was just trying to
> make mpg123 not work to hopefully find out why asterisk doesn't)
> *****************************************
> 
> [root at copc ~]# mpg123 -d /dev/dsp
> /var/lib/asterisk/mohmp3/TristeAlegriaPromo.mp3
> High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
> Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
> Uses code from various people. See 'README' for more!
> THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
> Title  : 10 - Track 10                   Artist: <Unknown>
> Album  : PROMO                           Year  :
> Comment:                                 Genre : Club
> 
> Directory: /var/lib/asterisk/mohmp3/
> Playing MPEG stream from TristeAlegriaPromo.mp3 ...
> Junk at the beginning 49443303
> MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
> 
> [0:02] Decoding of TristeAlegriaPromo.mp3 finished.
> [root at copc ~]#
> 
> *****************************************
> Extensions.conf
> *****************************************
> 
> exten => 100,1,Answer
> exten => 100,2,Playback(tones-that-follow-are-for-the-deaf)
> exten => 100,3,Hangup
> 
> 
> *****************************************
> oss.conf
> *****************************************
> ;
> ; Open Sound System Console Driver Configuration File
> ;
> [general]
> ;
> ; Automatically answer incoming calls on the console?  Choose yes if
> ; for example you want to use this as an intercom.
> ;
> autoanswer=yes
> ;
> ; Default context (is overridden with @context syntax)
> ;
> context=default
> ;
> ; Default extension to call
> ;
> extension=s
> ;
> ; Default language
> ;
> ;language=en
> ;
> ; Silence supression can be enabled when sound is over a certain
> threshold.
> ; The value for the threshold should probably be between 500 and 2000 or
> so,
> ; but your mileage may vary.  Use the echo test to evaluate the best
> setting.
> ;silencesuppression = yes
> ;silencethreshold = 1000
> ;
> ; On half-duplex cards, the driver attempts to switch back and forth
> between
> ; read and write modes.  Unfortunately, this fails sometimes on older
> hardware.
> ; To prevent the driver from switching (ie. only play files on your
> speakers),
> ; then set the playbackonly option to yes.  Default is no.  Note this
> option has
> ; no effect on full-duplex cards.
> ;playbackonly=yes
> 
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
> 
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
> 
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list