The server I am running on is a Debian 3.1 (sarge) installation with at additional apt source from Debian Backports.

mkovach@kuiper:~$ uname -a
Linux kuiper.alal.com 2.6.8-2-686 #1 Tue Aug 16 13:22:48 UTC 2005 i686 GNU/Linux
mkovach@kuiper:~$ cat /etc/apt/sources.list
deb http://http.us.debian.org/debian/ stable main non-free contrib
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb-src http://http.us.debian.org/debian/ stable main non-free contrib
deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://www.backports.org/debian sarge-backports main contrib non-free
deb-src http://www.backports.org/debian sarge-backports main contrib non-free

The server itself does not have any zaptel cards installed.

I have the follow relevant packages installed:

mkovach@kuiper:~$ env COLUMNS=132 dpkg -l asterisk* | awk '/^ii/ {print $2}'
asterisk
asterisk-classic
asterisk-config
asterisk-dev
asterisk-doc
asterisk-sounds-main
asterisk-web-vmail
mkovach@kuiper:~$ env COLUMNS=132 dpkg -l icecast* | awk '/^ii/ {print $2}'
icecast2

I use Free World Dialup (FWD) as the "phone service". It is free and works well with Asterisk. After signing up for an account, I connected my Asterisk configuration to FWD via Asterisk's IAX protocol.

I use shorewall on the system, so I had to add the following rules to the shorewall config to allow the necessary ports for Asterisk.

ACCEPT net $FW udp 4569,5060,10000:20000

After verifying my system would send and receive calls via FWD, I changed the dialplan slightly:

[fromiaxfwd]
exten => ${FWDNUMBER},1,Wait(1)
exten => ${FWDNUMBER},2,MeetMe()
exten => ${FWDNUMBER},3,Playback(vm-goodbye)
exten => ${FWDNUMBER},4,Hangup

Now, when somebody calls the FWD number, they are directed into the MeetMe application, which is provides conference bridge functionality to Asterisk.

I setup a conference room for the NOOSS Talk Show:

conf => 1000,66677

The format is

conf => confno,password,admin_password

where neither password is required.

But for the MeetMe application to work, it requires timing from the zaptel devices drivers. I don't have any devices, but a modules called ztdummy ztdummy is provided to give the needed timing. Since it is a kernel modules, I had to compile it.

mkovach@kuiper:~$ env COLUMNS=132 dpkg -l zap* | awk '/^ii/ {print $2}'
zaptel zaptel-modules-2.6.8-2-686
zaptel-source

You need to install the zaptel-source package first.

mkovach@kuiper:~$ sudo apt-get -t sarge-backports install zaptel-source
mkovach@kuiper:~$ sudo modules-assistant a-i zaptel
mkovach@kuiper:~$ sudo /sbin/modprobe ztdummy
mkovach@kuiper:~$ sudo sh -c 'echo ztdummy >> /etc/modules'

The zaptel modules have been compiled for the kernel and the ztdummy module loaded (and configured to reload on at boot).

With ztdummy module loaded, I fired a quick reload to Asterisk:

mkovach@kuiper:~$ sudo asterisk -r
kuiper*CLI> reload

I fired up Kphone on my laptop (which is also connected to the FWD network) and dialed the systems FWD number.

 -- Accepting AUTHENTICATED call from 192.246.69.186:
    > requested format = ulaw,
    > requested prefs = (ulaw), 
    > actual format = ulaw, 
    > host prefs = (ulaw), 
    > priority = mine
 -- Executing Wait("IAX2/fwd-gw-1", "1") in new stack
 -- Executing MeetMe("IAX2/fwd-gw-1", "") in new stack 
 -- Playing 'conf-getconfno' (language 'en')
== Parsing '/etc/asterisk/meetme.conf': Found
  -- Created MeetMe conference 1023 for conference '1000' 
  -- Playing 'conf-getpin' (language 'en') 
  -- Playing 'conf-onlyperson' (language 'en') 
  -- Hungup 'Zap/pseudo-819634747'
== Spawn extension (fromiaxfwd, 820011, 2) exited non-zero on 'IAX2/fwd-gw-1'
  -- Hungup 'IAX2/fwd-gw-1'

I was able to connect into the conference after typing giving the room number (1000) followed by the pound key and providing the password (66677) followed by the pound key.

Now we have a conference room, now to send the audio output. I won't talk much about setting up Icecast, I have already written about Icecast.

Asterisk includes a barely documented application called Ices. I set about to get this working.

I created a configuration file for ices,

mkovach@kuiper:~$ sudo ls -l /etc/asterisk/asterisk-ices.xml
-rw-r--r-- 1 root root 3349 Dec 8 17:12 /etc/asterisk/asterisk-ices.xml

Which was based on the provided example with the package:

mkovach@kuiper:~$ ls -l /usr/share/doc/asterisk-doc/contrib/asterisk-ices.xml
-rw-r--r-- 1 root root 3331 Nov 29 2005 /usr/share/doc/asterisk-doc/contrib/aterisk-ices.xml

I added, in /etc/asterisk/extensions.conf, a stream section:

[stream]
exten => 1000,1,Answer
exten => 1000,2,Wait(1)
exten => 1000,3,Ices(/etc/asterisk/asterisk-ices.xml)
exten => 1001,1,MeetMe(1000||66677)

The Ices applications attempts to call /usr/bin/ices. It is called /usr/bin/ices2 on my system, so I created a symlink (ln -s /usr/bin/ices2 /usr/bin/ices).

Extension 1000 starts the Ices application, calling the configuration file.

Extension 1001 will automatically join Conference Room 1000. Note, MeetMe is called with Meetme(room|options|pin), so here I am join room 1000 with no options and giving the pin. I have NOT included the stream plan into the default plan and it is not available for normal use.

Now, how do I get it to work? I call into the conference by originating a call on the server, using a stream.call file placed into the outgoing queue of the asterisk server.

mkovach@kuiper:~$ cat /tmp/stream.call
Channel: Local/1000@stream
MaxRetries: 2
RetryTime: 60
WaitTime: 30
Context: stream
Extension: 1001
Priority: 1

This tells asterisk to place and outgoing call from Local user 1000@stream to Local/1001@stream.

mkovach@kuiper:~$ sudo su - asterisk -c 'cp /tmp/steam.call /var/spool/asterisk/outgoing'
 -- Playing 'conf-onlyperson' (language 'en')
 -- Attempting call on Local/1000@stream for 1001@stream:1 (Retry 1)
 -- Executing Answer("Local/1000@stream-eb8c,2", "") in new stack
 -- Executing Wait("Local/1000@stream-eb8c,2", "1") in new stack
    > Channel Local/1000@stream-eb8c,1 was answered.
 -- Executing MeetMe("Local/1000@stream-eb8c,1", "1000||66677") in new stack
 -- Executing ICES("Local/1000@stream-eb8c,2", "/etc/asterisk/asterisk-ices.xml") in new stack

Stream is available now.

To stop the stream, I just kick the stream user out of the confernece:

kuiper*CLI> meetme
Conf Num Parties Marked Activity Creation
1000 0001 N/A 00:01:39 Static
* Total number of MeetMe users: 1
kuiper*CLI> meetme list 1000
User #: 02 <unknown> <no name> Channel: Local/1000@stream-eb8c,1 (unmonitored)
1 users in that conference.
kuiper*CLI> meetme kick 1000 02 
 -- Playing 'conf-kicked' (language 'en') -- Hungup 'Zap/pseudo-677479001'
== Auto fallthrough, channel 'Local/1000@stream-eb8c,1' status is 'UNKNOWN'
== Spawn extension (stream, 1000, 3) exited non-zero on 'Local/1000@stream-eb8c,2'

Simple :)

Audio Streaming from an Asterisk Meetme Room (last edited 2007-10-31 03:45:48 by Mek)