Installing the Asterisk GUI
Asterisk 1.4 includes an HTML Asterisk GUI (well, it’s more of a package for the creation of GUIs) by Digium. Installing it is quite easy once you have installed Asterisk 1.4 itself - see node Compiling Asterisk 1.4 beta. The GUI is a nice AJAX app that will run through the Asterisk embedded web server with a recent web browser. The first thing you’ll have to do is to download the GUI, currently through Subversion only:
svn checkout http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui
cd asterisk-gui/
make
make install
make samples
Compiling Asterisk 1.4 beta
- You’ll likely want to see Compiling Asterisk 1.4 with TDM400 and H323 for the full release of Asterisk 1.4 *
Simple queue and agent debug monitoring
It may have happened to you: you get called by a busy call center to debug the functionalities of Asterisk, and you get lost in the continuous logging on the console done by tens of operators who keep on using the system. Asterisk produces a lot of information, but that very lot seems to be a bit discouraging for understanding what is going on. What we do now is automate some very simple filtering tasks so that we are not swamped anymore by unwanted information. Continue Reading...
Avoiding queue_log file rotation
If you run a call center, you will definitely want the log rotation susbsystem not to rotate your queue_log file along with the other Asterisk logs found in /var/log/asterisk. The queue_log file contains essential information on how the call-center is going that is being used by software like QueueMetrics to report on the well-being and the actual work being performed by your CC, and you surely want to keep that data in a safe place for cross-period analysis. The majority of prebuilt Asterisk distributions will instead lotate that file together with the other Asterisk logs, and this may cause lost data if you do not have a backup. Disabling log rotation Disabling log rotation is actually quite easy: go to /etc/logrotate.d and look for a file named asterisk. If you run TrixBox, you’ll find something like:
/var/log/asterisk/*log {
missingok
rotate 5
weekly
create 0640 asterisk asterisk
postrotate
/usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
endscript
}
Peering two Asterisk servers using IAX
It is quite easy to “join together” two Asterisk server using IAX. Unfortunately it takes a while to get things right by reading the docs, so here is a ready-made recipe that you can use to have two Asterisk box dial each others extensions. We imagine that we have two Asterisk boxen, called foo and bar. foo is at 192.168.1.2 while bar is at 192.168.2.3. Le’s start with foo; here is its iax.conf file:
[general]
bindport = 4569 ; Port to bind to (IAX is 4569)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
allow=gsm
mailboxdetail=yes
[bar]
type=friend
username=foo
secret=password123
auth=plaintext
host=192.168.2.3
context=fromiax
peercontext=fromiax
qualify=yes
trunk=yes
Day of Week Calculator
Day of Week Calculator //********************** // Calendar Functions (place in extensions.ael, requires 1.2) //********************* // Return the day of the week for any given date, 0=Sunday… // YY is (4) digit year // MM is (2) digit Month // DD is (2) digit Day // The day of the week is returned via ${Weekday} // Example Call: Macro(Calendar_Weekday,2006,05,14,${DayofWeek}) // Upon return ${DayofWeek} will contain the Weekday string. // macro Calendar_Weekday(YY,MM,DD,Weekday) { Set(wd=$((${DD}+1) + ${MM}2 + (${MM}+1)3/5 + ${YY} + {YY}/4 - ${YY}/100 + ${YY}/400) % 7); switch (${wd}) { case 0: Set(Weekday=Sunday); break; case 1: Set(Weekday=Monday); break; case 2: Set(Weekday=Tuesday); break; case 3: Set(Weekday=Wednesday); break; case 4: Set(Weekday=Thursday); break; case 5: Set(Weekday=Friday); break; case 6: Set(Weekday=Saturday); break; default: Set(Weekday=Unknown); }; }; Continue Reading...