Jun
28
2012
0

Agent Auto log-off script for Asterisk

Many times an Agent will forget to logoff. This can cause call routing, payroll, and queue statistic problems with Asterisk. With a handy BASH script it is easy to log all the agents out the queues automatically. Below is the shell script and an example of the crontab entry for execution at 6:00 PM every day.

(more…)

Written by mattb in: Asterisk,Scripts | Tags: , , ,
Jun
25
2012
0

Ping Test script

The script below records a ping results every 3 seconds to /var/log/ping.log.  I created this script to detemine if my NIC is losing conectivity with switch at the same time as Asterisk SIP peers are lagging out.  Enjoy!

(more…)

Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , , ,
Mar
22
2012
0

How to Start Cinnamon desktop from Run Level Three on Fedora 16

Fedora 16

The default UI on Gnome 3 is Bad.  Everyone knows it.  I’ve been running Fedora 14 for what seems like years, hoping that one day the Gnome development team pulls their heads out of their collective asses and restores a simple, low impact interface.  Instead, as of Fedora 16,  I still see these gigantic window title bars, huge ugly icons, lack of minimize and maximize buttons.  What’s next?  Tiles?  Honestly it looks like Gnome 3 was designed for a cell phone.  Or maybe on a cell phone.

Luckily the folks at Mint Linux have been working on a Gnome 3 variant with a sane UI.  One that look like a traditional, but stylish desktop.  I installed Fedora 16 and tried Cinnamon.  While Gnome 2 on Fedora 14 is still more refined, I really like the direction this project is headed.  One problem that vexed me is how to start Cinnamon from run level 3(terminal).

Purpose of this post:

  1. Install cinnamon
  2. create .xinitrc for startx to work

(more…)

Written by mattb in: Linux | Tags: , , , , , , ,
Feb
04
2012
0

Fedora 14 PHP daemon error

I’m using PHP to create a daemon(system process) that listens for request to dial outbound calls from a Asterisk based dialer.  Before I even got started I got the following error:

[root@AsteriskPBX Desktop]# php daemon.php
PHP Fatal error: Uncaught System_Daemon_Exception: PHP is compiled without –enable-posix directive in /root/Desktop/daemon.php on line 6

Many websites suggest recompiling PHP or installing ‘php-posix’, which isn’t in the Fedora repo. After some searching I found that ‘php-posix’ is part of the ‘php-process’ package in Fedora.  It now works!

 

Written by mattb in: Uncategorized |
Dec
09
2011
1

Asterisk: Holiday Macro

Below is an example of a macro that checks to see if the ‘holiday’ menu is enabled.  I also added extension 2970, a ‘one touch’ utility to enable/disable the holiday macro.  Remember to create a ‘holiday_disabled.wav’ that literally says, “Holiday menu disabled”.  To rercord a message simply disable and enable the utility again.  Enjoy!

 

 

[macro-holiday]

;Check if holiday message set

;Check if it is a holiday
exten => s,1,NoOp(Check for Holidays)
exten => s,n,Answer()
exten => s,n,set(HOLIDAY=${DB(closed/1)})
exten => s,n,NoOp(${HOLIDAY})
exten => s,n,gotoIf($["${HOLIDAY}" = "1"]?main-holiday,s,1)   ; Custom Holiday

;Otherwise
exten => s,n,gotoiftime(08:00-19:00,mon-fri,*,*?${ARG1},s,1) ; Main Operating Hours
exten => s,n,goto(${ARG2},s,3)

;===============================================================

[from-pstn]

;
;
; usage: macro(holiday,ARG1,ARG2)
;
; argument one and two are that day and night menu
;
; Some DID

exten => 12134974061,1,macro(holiday,main-day,main-night)

[utilities]

;————————————————–
; One touch Record/Set Holiday Closed Message
;
exten => 2970,1,NoOp(============ Set Holiday Message ==============)
;exten => 2970,1,authenticate(5678)
exten => 2970,n,Wait(1)

; check to see if holiday message is set
exten => 2970,n,set(HOLIDAY=${DB(closed/1)})
exten => 2970,n,NoOp(${HOLIDAY})
exten => 2970,n,NoOp(${HOLIDAY})
exten => 2970,n,NoOp(${DB(closed/1)})
exten => 2970,n,gotoIf($["${HOLIDAY}"="1"]?utilities,2970(disable),1:utilities,2970(enable),1)

; if disabled record a new greeting
exten => 2970(enable),1,Record(en/custom/holiday_message:gsm)
exten => 2970(enable),n,Wait(1)
exten => 2970(enable),n,set(DB(closed/1)=1)
exten => 2970(enable),n,Playback(en/custom/holiday_message)
exten => 2970(enable),n,wait(1)
exten => 2970(enable),n,Hangup

; disable the holiday message and alert the caller

exten => 2970(disable),1,set(DB(closed/1)=0)
exten => 2970(disable),n,Playback(en/custom/holiday_disabled)
exten => 2970(disable),n,Hangup

Nov
09
2011
0

Fox News commentator contends Anonymous is, “major organizers of the Occupy Wall Street protests”

I know Fox News says and writes some nutty stuff, but this article I read  today takes the cake.  Contributer Dan Gainor writes about the poor defensless police of America being cyber bullied by ‘liberal protesters’.

http://www.foxnews.com/opinion/2011/11/04/wheres-outrage-over-occupy-protesters-high-tech-intimidation-police/?intcmp=obnetwork

He blames Anonmous(the online hacktivist group) for largely being responsible for the ‘Occupy Wallstreet’ movement.

What?  Are you f$^%&! kidding me? LOL… wow.  I think the movement was far more likely caused by 99% of Americas wealth in the hands of 1% of the population.  Is that liberal nonsense or basic math?

What I think Occupy Wallstreet is pissed about:

  1. massive wealth inequity
  2. bail outs for banks and large corporations
  3. jobs being shipped over seas by thoughtless trade agreements
  4. lack of health care
  5. lack of education
  6. lack of jobs
  7. high wages & benifits of public servants
  8. American debt
  9. endless war
  10. never ending taxes & fee’s
  11. cost of living increases
  12. etc…

But Dan writes further that Anonymous is the main culprit of publishing public data about individual officers that have arrested or pepper sprayed protesters.  Yet he offers no proof that any genuine member of Anonymous had anything to do with releasing any data about any officers at all.  In fact he doesn’t cite any supposed documents or examples personal information being released.

(more…)

Nov
03
2011
0

Asterisk: How to setup Agent Status on Polycom Idle Display

Polycom Soundpoint IP 550 idle display screen


 

This tutorial describes how to configure the idle display screens on Polycom phones to subscribe to a XHTML file that reads their Agent status from Asterisk.  When the phone is not in active use it displays the web page.

My tutorial has three components.  A specific Polycom option(found in sip.cfg) added to the configuration file of each phone, a BASH script I wrote, and a little Asterisk configuration.  This tutorial assumes you have a working Asterisk 1.6+ PBX with a basic queue setup.  It also assumes you are using automatic web provisioning of your Polycom phones.

Here is a link to my previous article on  configuring Polycom SoundPoint IP phones for Asterisk:

How to configure a Polycom SoundPoint IP phone for Asterisk on Fedora 10


To get the idle display screen to work correctly we will need to modify our standard configuration file a bit.  Navigate to the FTP/HTPP directory you provision your phones from.  Edit an Agent phone similar to the following,
(more…)

Written by mattb in: Asterisk,Scripts | Tags: , , , ,
Oct
16
2011
0

Asterisk: How to Install Queuemetrics and Qloader

queuemetrics login

Queuemetrics is by far the best Call Center software Linux.  My only complaint might be that Java is huge resource hog when it parses the Asterisk. ‘/var/log/asterisk/queue_log’.  Luckily Loway provides an excellent PERL script called Qloader.

Today we will walk through installing Queuemeteics,MySQL,and Qloader daemon. My installation instructions are basically a quick rundown of the excellent infomation on Loways site:

http://queuemetrics.com/install.jsp
http://queuemetrics.com/manual_list.jsp 

My Setup:
Fedora 14 – (32 bit)
Asterisk 1.6
QEMU-KVM virtual machine on Intel i7

(more…)

Jul
17
2011
0

AT&T takes Billions from US Tax Payers while Imposing Download Caps

For AT&T it’s another day, another dollar…  or rather billions of dollars. Your’s, collected from taxes and deficit spending.  I read a article on cnet about AT&T’s justification of ‘download usage caps’.  AT&T General Counsel Wayne Watts reasoned the need for caps like this,

 “It is hardly surprising that the general counsel of Netflix, a company that accounts for a whopping 30% of peak-hour Internet traffic in North America, would oppose Internet service providers charging customers based on how much Internet data (movies) they download,” Watts said in a letter posted on WSJ.com today.

What this genius(sarcasm) doesn’t get is that Netflix is the ONLY affordable and legal way to access lots of movies from the internet.  That’s all there is to it.  Do you think if a brand new movie at the super market check-out line was merely $1.99 people would bother to steal or stream?  My first point is that there are many ways to distribute content; Netflix happens to be popular now, but the buz was against hulu and youtube previously. My second point is that AT&T should be the last company in America to complain about it, much less feel entitled to gouge their customers.

(more…)

Jul
03
2011
2

BASH script to logout Dynamic Agents

This is a simple script for logging out Dynamic Agents in Asterisk.  The most common use would be to logout Agents automatically each day in case they forget or are on PAUSE.  Edit the “LOGGEDIN” variable below to match the correct length of digits.  By default it is three,  ’SIP/…’.

You can add as many or as few Queues in place of QUEUE1, QUEUE2, & QUEUE3.  This is the ‘foreach’ section of the script.  Whatever that is here will be applied to each instance of SIP/xxx detected by grep.  Good luck.

agent-auto-loggoff.script

————————————————————————–

#!/bin/bash

#set -x

# Execute from the command line, Asterisk or by cron

LOGGEDIN=$(/usr/sbin/asterisk -rx “queue show” | /bin/grep -o ‘SIP/…’)

for i in $LOGGEDIN

do

echo “$i removed”

#  Add in all queues that should be included
#==============

/usr/sbin/asterisk -rx “queue remove member $i from QUEUE1″
/usr/sbin/asterisk -rx “queue remove member $i from QUEUE2″
/usr/sbin/asterisk -rx “queue remove member $i from QUEUE3″

done

exit