Huge thanks to Joshua Colp for mirroring services

Sound card Line-In as MOH source

Share on Twitter Digg this story Click to view a printable version Sun, 15 May 2005 20:31:16 -0400

Niksa Baldun has posted a script (line of code) to allow you to select the line in of your sound card as a music on hold source:

Hi,

this is a rather ugly solution I devised.

Create a script called 'ast-playlinein' (or whatever) in /usr/sbin, as follows:

#!/bin/bash
/usr/bin/arecord -q -c 1 -r 8000 --buffer-size=2048 -f S16_LE -D hw:0,0 -t raw

In musiconhold.conf:

[classes]
default => custom:/var/lib/asterisk/mohmp3,/usr/sbin/ast-playlinein

And that's it. Basically, the script takes input from line-in and sends it to standard output in the format Asterisk expects. You also have to select line-in as recording source using alsamixer utility. If you are using a sound system other than ALSA, odds are that it has some tool similar to arecord. Bear in mind that /var/lib/asterisk/mohmp3 directory
still has to contain at least one file with .mp3 extension (can be whatever you like).

Hope this helps.

--

Niksa


You haven't voted yet! Vote:
Current Rating: 9.33/10 (3 votes)

Comments (Click to post)

Comments
Name:
Subject:
Website:
Message: 

Similar Articles (Based on Title)

*-Users PA1688 Chipset IP Phones and ATA's - December 20, 2004
Gary has posted details of the IAX2 downloads for PA1688 phones

Asterisk Core Sounds 1.4.15, Extra Sounds 1.4.8, and Freeplay MoH Update Released - April 8, 2009
The Asterisk development team is pleased to announce the release of Asterisk Core Sounds version 1.4.15, Extra Sounds 1.4.8, and Freeplay Music On Hold sound files.

Free music and movie trailer sound from SXSW:06 - March 8, 2006
Jason Sjobeck has posted details of some free music files available.

Beta testers needed for new sound files - July 20, 2006
Kevin P. Fleming has posted a request for beta testers for the new sounds for Asterisk 1.4.

Astlinux-users: Sound (ALSA) support is coming - November 21, 2006
Kris has posted details on some support for oss and alsa for AstLinux.

OLPC Sound Samples - July 8, 2008
Tzafrir Cohen has posted a link to 10GB of free samples.

New T1/E1 Card coming? - October 15, 2004
There have been some changes to CVS today to support a new card. Namely the wcte11xp.

Sangoma Launches 4 Port A104 T1/E1/J1 Voice/Data Card - December 13, 2004
Sangoma has released a 4 port T1/E1/J1 card with a low profile (2U).

New 4-Port BRI card Sirrix.PCI4S0 with Asterisk support available - January 9, 2005
Oskar Senft has posted details of the 4-Port BRI card Sirrix.PCI4S0 with Asterisk support to the Asterisk-biz mailing list.

Digium Announces Highest Analog Density Card in Open Source Telephony Market - October 27, 2005
Digium has released a 24 port analog card!

No interrupts from TDM400 Card - August 12, 2009
I received an interesting call from a customer last night. They had moved their PBX in order to change around some cabling - and couldn't receive phone calls after it started up.

*-doc: The History of the Zapata Telephony Project as it relates to the Asterisk PBX - January 8, 2005
Jim Dixon has written an article entitled: The History of the Zapata Telephony Project as it relates to the Asterisk PBX. Jim Dixon was the founding father of the Zapata telephony project.


Original Content (C) 2004-2010 Matt Riddell
Back 5  Feed Add
to
Google Subscribe with Bloglines
Go to today

Icons by: FastIcon.com


AstriDevCon: October 29th, Washington DC
August 23, 2010 Average Vote: 10
John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.

Code Review: SRTP support for Asterisk
March 12, 2009 Average Vote: 10
Terry Wilson has moved his SRTP branch onto the Digium review board.

The Everything Asterisk Video Collection
August 5, 2010 Average Vote: 10
Steven Sokol has posted a blog entry on Asterisk Video Resources.

Voip-Forum: Lots of new articles
March 12, 2005 Average Vote: 10
Oej's Voip-Forum.com site has posted lots of new news articles while I've been away. Hopefully you found them via the asterisk-docs site. If not I've bookmarked them for you.

Interview with Mark Spencer
November 26, 2004 Average Vote: 9.9
We have managed to get an interview with Mark Spencer AKA Markster. Mark Spencer is the creator of Asterisk and by far the most active developer.

Asterisk and Kamailio realtime integration tutorial
May 24, 2010 Average Vote: 9.9
Daniel-Constantin Mierla has posted a link to a tutorial on integrating Asterisk and Kamailio using realtime.

Asterisk and Kamailio (openser) realtime integration
August 5, 2010 Average Vote: 9.8
Daniel-Constantin Mierla posted a writeup on combining Asterisk and Kamailio.

Asterisk IPv6 update
February 1, 2010 Average Vote: 9.8
Olle has posted an update on IPV6 in Asterisk and a link to a blog post of his.

Proposal for T.38 transparent gateway design in Asterisk
April 29, 2010 Average Vote: 9.8
Kevin Fleming has posted a proposed design for a transparent T.38 gateway for Asterisk:

Back to life
July 21, 2010 Average Vote: 9.8
Hey all - I am back online after some pretty big projects which have taken all my time. Will be updating the Asterisk news over the next few days.

Announcing Adhearsion 0.8.5
August 25, 2010 Average Vote: 9.8
Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.

app_swift v2.0 released
July 21, 2010 Average Vote: 9.8
Like a few of these news stories that I will be posting over the next couple of days this is a little old - hope it is not something you have already seen. This one is for a new version of the app_swift text-to-speech module for Asterisk 1.2, 1.4, and 1.6.

Monitoring Asterisk with Munin
January 7, 2010 Average Vote: 9.7
I had a few requests for these munin plugins after some discussion on one of the Asterisk lists and thought people might like them.

GUI changes from Trixbox, FreePBX, 2600hz, BlueBox
September 1, 2010 Average Vote: 9.7
Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.

Nerd Vittles: Finally... Installing Asterisk at Home on Your Windows PC
February 9, 2006 Average Vote: 9.7
Ward Mundy has posted details of a how to for installing Asterisk at Home on a windows machine without removing windows.


Asterisk 1.8.0-beta5 Now Available
September 9, 2010
The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta5.

libpri 1.4.11.4 Now Available
September 3, 2010
The Asterisk Development Team has announced the release of libpri 1.4.11.4.

New CDR Stats Package
September 1, 2010
This one has been a long time coming. A new CDR stats package from Star2Billing to replace the 7 year old stalwart for viewing Asterisk call detail records.

GUI changes from Trixbox, FreePBX, 2600hz, BlueBox
September 1, 2010
Ok, bear with me on this one. If you understand all the ramifications, FreePBX has split to a new project called BlueBox contained within the 2600hz project. This obviously has implications for Trixbox that uses FreePBX to provide quite a bit of functionality.

RazorQuotePBP Asterisk Payment Module
August 31, 2010
RazorQuote has sent us a press release about the launch of RazorQuotePBP, a native Asterisk module that allows any Asterisk connected device to accept credit card payments.

CloudVox: Install an open source Asterisk phone app and get 250 dollars
August 30, 2010
CloudVox is running a competition for people to receive 250 dollars for writing up some documentation for Open Source applications on CloudVox - first in first served.

AstriCon approaches
August 25, 2010
John Todd has posted a note about the upcoming AstriCon conference in Washington, DC, and the innovation awards.

Announcing Adhearsion 0.8.5
August 25, 2010
Ben Klang has posted a note about the latest release of Adhearsion - a framework for developing Asterisk based solutions using Ruby.

Asterisk 1.8.0-beta4 Now Available
August 25, 2010
The Asterisk Development Team has announced the release of Asterisk 1.8.0-beta4.

AstriDevCon: October 29th, Washington DC
August 23, 2010
John Todd has posted a note about the AstriDevCon conference which occurs within the Astricon conference.