121 lines
8.6 KiB
Plaintext
121 lines
8.6 KiB
Plaintext
|
|
Episode: 538
|
||
|
|
Title: HPR0538: asterisk-cast
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0538/hpr0538.mp3
|
||
|
|
Transcribed: 2025-10-07 22:42:44
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
to
|
||
|
|
Welcome to Hacker Public Radio.
|
||
|
|
I'm Cobra II.
|
||
|
|
I'll be your host today.
|
||
|
|
Let's get down to it.
|
||
|
|
I'm going to talk about asterisks and how asterisks can make your life easier.
|
||
|
|
Alright, so what you need to do is you need to grab the sources for asterisks.
|
||
|
|
You need to grab the asterisks source itself, and you need to grab the dotty package as well.
|
||
|
|
The sources for the dotty package.
|
||
|
|
Dotty is a module that you can pile for your kernel that will keep the timing for the
|
||
|
|
conference rooms in asterisks.
|
||
|
|
Got to have it, whether you've got special hardware or not.
|
||
|
|
So the compile is pretty simple.
|
||
|
|
First you build a dotty, just run configure, make, make install, normal easy peasy stuff.
|
||
|
|
Then for asterisks, run configs.slashconfigure, and after that gets done you want to run make
|
||
|
|
menu select, and this will dump you into a bunch of options, and you just kind of want
|
||
|
|
to pick and parse through and grab what you want to get and leave what you don't.
|
||
|
|
I went and picked and chose a couple different codecs that I wanted and pulled out other codecs
|
||
|
|
that I didn't want supported, and I also set it up to pull down all the audio files for
|
||
|
|
the codecs that I had selected.
|
||
|
|
So after you get done with the menu select stuff, just hit queue to exit, and then hit
|
||
|
|
ask to save, and then run make, and then make install, and you're also going to want
|
||
|
|
to run make install samples, and what that's going to do is that's going to dump a bunch
|
||
|
|
of default configs inside of slash Etsy slash asterisks, and as of right then you can
|
||
|
|
go ahead and fire up asterisks if you want, but I wouldn't bother starting it up yet.
|
||
|
|
Alright, so what we're going to do is we're just going to get a conference room up and
|
||
|
|
running, and first thing you want to do is you want to make a backup of the default
|
||
|
|
configurations for extensions.coinf, sip.coinf, and meetme.coinf, just in case you screw
|
||
|
|
something up, and then you're going to want to log in as root and modprobe.daha-underscore-dummy,
|
||
|
|
and that's going to go ahead and load that dotty module into your kernel.
|
||
|
|
You've got to have it for a conference calls because they're just not going to work if
|
||
|
|
you don't.
|
||
|
|
As you're running through the config files, you should just kind of read all the comments
|
||
|
|
and the asterisks, the default configs are very well commented, and you can pretty much
|
||
|
|
figure out everything just from reading the configs, nothing real complicated there.
|
||
|
|
Read it.
|
||
|
|
If you don't understand something, that's what Google's for.
|
||
|
|
So the first file we're going to dig into is the extensions file.
|
||
|
|
So just open it up and your editor of choice is root, and scroll down to close to the
|
||
|
|
bottom of the file, and you'll see some examples, or you'll see an example of a meetme
|
||
|
|
conference room.
|
||
|
|
And what you're going to do here is just kind of comment it out and use a semicolon to
|
||
|
|
comment out stuff in the asterisks configs.
|
||
|
|
And we're going to add in EXTEN equal greater than 8600 comma 1 comma answer with a capital
|
||
|
|
A, and open close parentheses, and you're going to want to do pretty much follow that same
|
||
|
|
format of EXTEN equals greater than, and basically that's like extension, is equal to,
|
||
|
|
and then 8600 is the actual extension number.
|
||
|
|
And then after the first comma you've got steps of what's what asterisks is supposed
|
||
|
|
to do when it sees that that extension has been dialed.
|
||
|
|
And then after the step you've got another comma, and that tells asterisks exactly what
|
||
|
|
to do.
|
||
|
|
So for the next line we're going to add EXTEN equals greater than 8600 comma 2 comma
|
||
|
|
weight, open parentheses number 1, close parentheses, next line, EXTEN equals greater than 8600 comma
|
||
|
|
3, meet me, open parentheses, 3, 3, 3, 0, close parentheses, and that line right there
|
||
|
|
is linking 8600, the extension 8600 to the meet me conference room, 3, 3, 3, 0.
|
||
|
|
Next line will be, you can either go ahead and put in a line here to go ahead and start
|
||
|
|
recording for your conference, if you want that, there's two ways to do that.
|
||
|
|
You can either have asterisks mix the incoming and outgoing soundtracks together as it
|
||
|
|
receives it, or you can have asterisks just dump it out to a wave file.
|
||
|
|
If you want it to mix it all together, you're going to want to run EXTEN equals greater
|
||
|
|
than 8600, 4, open parentheses, capital M, I, X, capital M, O, N, I, T, O, R, open parentheses,
|
||
|
|
your file name, comma, pipe, A, V, open parentheses, 0, close parentheses, capital V, open
|
||
|
|
parentheses, 0, close parentheses, close parentheses, and that will tell asterisks to mix everything
|
||
|
|
that it gets for everyone calling in to this conference room to go ahead and take the
|
||
|
|
inputs and outputs from each of the individual callers and mucks them all into one file.
|
||
|
|
There's a little bit of extra work, but if you've got somebody that's got really low
|
||
|
|
audio, you're not going to be able to go in and tweak it and bump it up on the recording.
|
||
|
|
So it's got its ups and downs.
|
||
|
|
Now if you want asterisks to just record and dump all the separate input and output files,
|
||
|
|
you're going to want to use EXTEN equals greater than 8600, 4, capital M, O, N, I, T, O,
|
||
|
|
R, close parentheses, wave, comma, and the file name, and that's going to tell asterisks
|
||
|
|
to monitor the call instead of mix monitor, and you're going to use a wave extension, comma,
|
||
|
|
and then the file name that you want.
|
||
|
|
The file name is more of like a prefix to the call, the individual callers.
|
||
|
|
And then finally you're going to want EXTEN equals greater than 8600, 5, hang up with
|
||
|
|
the capital H, open parentheses, close parentheses, now bright and close, and you're done.
|
||
|
|
On to the next config, we're going to open up meetme.conf, I'm going to scroll down to
|
||
|
|
underneath where you'll see brackets that says rooms, and underneath that bracket somewhere
|
||
|
|
you just want to punch in, c-o-n-f equal greater than 33330.
|
||
|
|
Now if you want to put a pin on your conference room, so you've given out your asterisks conference
|
||
|
|
number to a bunch of people, and you just kind of want to, you've posted it up on like
|
||
|
|
a web page somewhere, and you want to make sure that only the people that you want in
|
||
|
|
on it are able to call in, you can add a comma to the end of 33330, and then put in your
|
||
|
|
pin number, like 33330 comma 1, 2, 3, 4, right and close, and you're done with that.
|
||
|
|
And now for the fun file, now we get to edit c-o-n-f, and you're going to want to change the
|
||
|
|
bind port from 50, 60 to something else, but that's only if you're going to be running
|
||
|
|
a sip client on the same machine that the server itself is running on.
|
||
|
|
If not, I wouldn't bother with it, you'll be just fine.
|
||
|
|
Unless you're, you want to run a sip client on the same network that the asterisks box
|
||
|
|
is running on, then you might want to change it, that heck, you might just want to change
|
||
|
|
it for the heck of it.
|
||
|
|
You're also going to need to run down to the external ip, it's just ex-t-e-r-n-i-p,
|
||
|
|
and you want to change that to your external ip if you have a static ip.
|
||
|
|
If you don't have a static ip, you need to scroll down to ex-t-e-r-n-h-o-s-t, and put
|
||
|
|
something in there like your dynamic DNS host, or no ip, whatever you use.
|
||
|
|
You also might have to change the NAT settings, either yes or no, it's just something you'll
|
||
|
|
have to play with if you've got NAT enabled or not, right and close, and let's go ahead
|
||
|
|
and fire up asterisks, you want to log in as a root, make sure you've already done the
|
||
|
|
mod probe dotty underscore dummy, and just run asterisks-vvvc, that's three v's for verbose,
|
||
|
|
verbose for boasts, and then the c will dump you into the asterisks command line interface.
|
||
|
|
Instead of doing that, you could just run asterisks-vvv, and put a space in the ampersound, and
|
||
|
|
then type in asterisks-r to reconnect, and this will give you the option to exit from the
|
||
|
|
asterisks command line interface, whereas if you ran vvvc, you wouldn't have the option
|
||
|
|
to exit the CLI interface. Now, you've got asterisks up and running, but you probably aren't
|
||
|
|
going to be able to test it yet, you need to go into your router and forward the ports to asterisks.
|
||
|
|
By default asterisks uses UDP ports 10,000 through 12,000, you can dig around and config
|
||
|
|
files and change that to whatever. You're also going to want to forward UDP on the bind port
|
||
|
|
that you selected, and that's what your asterisks-subproxy will run off of. Now, from a separate
|
||
|
|
machine, if possible, not on the same network, fire up a sip client, and 8600 at whatever
|
||
|
|
your external IP or dynamic DNS host was, colon and your bind port. If you're the only
|
||
|
|
person in the room, you're all set with a pure sip server. If you didn't, you screwed
|
||
|
|
up somewhere, or I told you something wrong, it could be either or. But now, you and all
|
||
|
|
your friends can sit and chat on asterisks.
|