Asterisk Manager Commands
I’ve been playing around with the Asterisk Manager lately (which is pretty damn cool, if you ask me).
There doesn’t seem to be a list of all the commands available on voip-info right now, so I’m posting these here for my own reference.
These are the Manager commands available on Asterisk 1.4
AbsoluteTimeout: Set Absolute Timeout (Priv: call,all)
AgentCallbackLogin: Sets an agent as logged in by callback (Priv: agent,all)
AgentLogoff: Sets an agent as no longer logged in (Priv: agent,all)
Agents: Lists agents and their status (Priv: agent,all)
ChangeMonitor: Change monitoring filename of a channel (Priv: call,all)
Command: Execute Asterisk CLI Command (Priv: command,all)
DBGet: Get DB Entry (Priv: system,all)
DBPut: Put DB Entry (Priv: system,all)
Events: Control Event Flow (Priv: <none>)
ExtensionState: Check Extension Status (Priv: call,all)
Getvar: Gets a Channel Variable (Priv: call,all)
Hangup: Hangup Channel (Priv: call,all)
ListCommands: List available manager commands (Priv: <none>)
Logoff: Logoff Manager (Priv: <none>)
MailboxCount: Check Mailbox Message Count (Priv: call,all)
MailboxStatus: Check Mailbox (Priv: call,all)
MeetmeMute: Mute a Meetme user (Priv: call,all)
MeetmeUnmute: Unmute a Meetme user (Priv: call,all)
Monitor: Monitor a channel (Priv: call,all)
Originate: Originate Call (Priv: call,all)
Park: Park a channel (Priv: call,all)
ParkedCalls: List parked calls (Priv: <none>)
PauseMonitor: Pause monitoring of a channel (Priv: call,all)
Ping: Keepalive command (Priv: <none>)
PlayDTMF: Play DTMF signal on a specific channel. (Priv: call,all)
QueueAdd: Add interface to queue. (Priv: agent,all)
QueuePause: Makes a queue member temporarily unavailable (Priv: agent,all)
QueueRemove: Remove interface from queue. (Priv: agent,all)
Queues: Queues (Priv: <none>)
QueueStatus: Queue Status (Priv: <none>)
Redirect: Redirect (transfer) a call (Priv: call,all)
SetCDRUserField: Set the CDR UserField (Priv: call,all)
Setvar: Set Channel Variable (Priv: call,all)
SIPpeers: List SIP peers (text format) (Priv: system,all)
SIPshowpeer: Show SIP peer (text format) (Priv: system,all)
Status: Lists channel status (Priv: call,all)
StopMonitor: Stop monitoring a channel (Priv: call,all)
UnpauseMonitor: Unpause monitoring of a channel (Priv: call,all)
UserEvent: Send an arbitrary event (Priv: user,all)
WaitEvent: Wait for an event to occur (Priv: <none>)
I (still) hate IE.
Its funny how you forget how much Internet Explorer sucks until you have to write CSS for it again.
I won’t go any further into it than that.
No commentsOS X: Fixing the Terminal
This might not be a problem for everyone, but I got used to using home, end, page up, and page down to navigate through the command line and documents through the console. I was quite suprised to see that these seemingly basic features were missing from OS X’s Terminal.app.
After a ton of Googling, I came across this article which pointed me in the right direction.
First, I created a file called ~/.inputrc which contains the following:
# allow the use of the Home/End keys
“\e[1~”: beginning-of-line
“\e[4~”: end-of-line
# allow the use of the Delete/Insert keys
“\e[3~”: delete-char
“\e[2~”: quoted-insert
Next, under Terminal > Preferences > Keyboard, find Home, End, Page Up, and Page Down, and enter the following values for each. Make sure to choose ‘Send string to shell:’ as the action. Note: Do not type the literal characters. Use the delete one character button to delete the values there.
Home: \033[1~ (Type: Ctrl+[, [, 1, ~)
End: \033[4~ (Type: Ctrl+[, [, 4, ~)
Page Up: \033[5~ (Type: Ctrl+[, [, 5, ~)
Page Down: \033[6~ (Type: Ctrl+[, [, 6, ~)
Once you’ve done this, just restart Terminal.app, and you’re golden.
* Special thanks to the owner of the blog above who literally saved the day for me on my Mac.
No commentsOSX - A Month Later
It took me a while to get used to the quirks, but I have not only gotten used to OS X, but it is now my favorite operating system.
Surprisingly, its the little things that make this OS so attractive, as well as drove me insane over the last month. The biggest thing was getting the home/end and page up/page down keys to work correctly in the Terminal (which I was finally able to do, and will be posting a quick howto on soon).
For the most part, my little Mac mini is fast as hell. Fireworks CS3 is a delicious dream under OS X. TextMate is almost certainly the best text editor I’ve used. Even CSSEdit, which I thought would be pointless, turned out to be an awesome program that has helped me quite a bit in my CSS designing.
Sometimes I really miss the Penguin - but apples are delicious indeed.
No commentsOSX First Impressions
The font rendering is ruining my life.
No commentsjQuery, nothin’ but love for ya
For the longest time, I was anti-javascript in just about every sense. Once I figured out how to do rollovers with CSS instead of JS, I pretty much abandoned all JS on my work. This was before Ajax was known for more than its grease fighting abilities on pans and other dirty dishes. Needless to say, it was only a matter of time before I had to use Javascript - and it was an absolute disaster. Of course, now I know it was simply my inexperience with Javascript (and more importantly, cross-browser Javascript) that made it such a disaster. Now I know there are great tools already made to do most of this stuff for you.
Enter Prototype & Scriptaculous - A truly awesome set of JS libs. This is one of the older libs around, so there is a great deal of documentation and help available. I played around with it for a few months and made a few things I thought were pretty cool (you probably wouldn’t - I’m easily impressed by myself). Unfortunately, the scripts are fairly large and the effects seem to render somewhat slowly on FF in Linux. Could be me - could be prototype/scriptaculous, but I’m not really interested in finding out. There are other JS libs out there that so the same thing and are lighter weight.
Mootools.js - Another great set of JS libs. With mootools, you can actually choose the components you need and download a custom made JS file that has everything you’ll need. It seems rather young, so there aren’t as many options as with prototype/scriptaculous (one I needed, containment within multiple sortables), but it has a pretty large fanbase and will probably suit most people’s needs. I didn’t get much time to play with mootools before I fell in love with jQuery…
jQuery - My personal favorite thus far. Configuration is a snap, and there are dozens (if not hundreds) of great plugins (table sorter, modal boxes, sortables, etc) available. The plugins themselves are also beyond easy to setup - which wasn’t always the case with prototype. My favorite part - is the speed at which everything loads. I tried a modal box on scriptaculous that took literally 2 seconds to open and render properly. That might seem low, but the same thing happens almost instantly with jQuery. That’s enough to seal the deal for me.
I might also be just a little biased. CodeIgniter is going to have native libraries for jQuery, so you’ll be able to interact with the JS layer from your PHP layer. That’ll be nice. You Rails kids can keep your prototype.
No commentsFTBS… I’m getting a Mac
I’ve decided that I am going to purchase a Mac Mini with my tax refund. I am sick of Windows on my old laptop, and Fireworks in Wine is slow as death. The Mac will give me the tastiness of Fireworks with the stability of Unix. I can’t wait.
No commentsMovierack (again)
It seems I have a habit of revisiting old projects every time I learn a new way of doing things. Naturally, this means I’m remaking movierack.net again using CodeIgniter.
We did move to a new server… so I guess that warrants it. Yep.
No commentsAsterisk on Ubuntu Server
I know I’ve blogged this before, but these are the steps I took most recently to get Asterisk running on a fresh Ubuntu Server (Dapper) installation. The instructions will also work on Feisty or Gutsy server.
# apt-get install linux-headers-`uname -r` build-essential libssl-dev libncurses5-dev libspeex-dev sox sox-dev
# mkdir /usr/src/asterisk
# cd /usr/src/asterisk
# wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.18.tar.gz
# wget http://downloads.digium.com/pub/zaptel/zaptel-1.4.9.2.tar.gz
# tar -vzxf zaptel-1.4.9.2.tar.gz
# cd zaptel-1.4.9.2.tar.gz
# ./configure
# make
# make install
# make config
# cd ..
# tar -vzxf asterisk-1.4.18.tar.gz
# cd asterisk-1.4.18
# ./configure
# make
# make install
# asterisk
# asterisk -r
If all goes well, you should see the Asterisk console.
Note: I am not 100% sure which repos have the packages mentioned, but I had the universe and multiverse repos added so my sources.list for apt.
No comments