Feb
11
2010
38

How to setup the Asterisk 2.0 GUI with Asterisk 1.6

Recent versions of Asterisk 1.6 are compatible with the Asterisk 2.0 GUI.  This wasn’t always the case, as the Asterisk GUI was developed for the 1.4 branch.  Although I wish Digium had gone for the LAMP model, the GUI is pretty good and getting better all the time.  However the instructions to install are difficult to find on the asterisk.org website.  That is, if they are there at all.  My guess is that Digium doesn’t want to make it to easy to get a free GUI.  I think this a very poor strategy, but that’s another article….  Today we will run through a quick install of asterisk and the 2.0 GUI.  A far superior option as compared to to Trixbox and FreePBX.

GOALS OF THIS POST:
– Install Asterisk 1.6
– Install Asterisk 2.0 GUI

(more…)

Sep
09
2009
0

Adjust date & time (NTP) on Fedora Linux

Correct time is crucial for many Network services.  Time stamps are required for accurate logs, email, and in the case of Asterisk – voicemail.  A customer sent me a request for instructions on adjusting date & time for their Asterisk PBX.  Most Fedora based systems come with a tool just for this purpose.  From the Desktop open a console window and type:

(more…)

Aug
25
2009
60

How to Query a Database from MySQL with Asterisk 1.6 ODBC

I’ve been administering Asterisk servers for many years and everyday I’m learning something new.  As the size of the projects have gotten bigger, so have the demands of my customers.  One common request is database integration.  In the past I’ve used external AGI scripts to run database queries to return values to Asterisk.  But more recently I’ve been avoiding AGI in favor of direct access SQL.  This is achieved by building ODBC modules into Asterisk at build time.  Let me tell you, it’s worth it!

Asterisk & ODBC provide the ability to easily update and retrieve data by defining SQL statements as special variables that can be called from the dial plan.  For instance, we could bill ‘long distance’, take credit cards and let Asterisk access other types of information.  In my tutorial we will configure Asterisk to dial a variable that represents a SQL statement.  This could also be done by calling an AGI script, but why do the extra work?

This ‘How to’ is specifically geared towards MySQL.  However, if you set the up the ODBC driver correctly you can use any SQL server you like.  Which leads me to my next thought, before you start, make sure ODBC is set up correctly.  Follow one of my previous tutorials:

configure Linux ODBC for MS-SQL

configure Linux ODBC for MYSQL

Once you do this we are ready to continue…

The goals of this post:

– create MySQL table with example data
– configure res_odbc.conf
– configure func_odbc.conf
– configure extensions.conf for query

(more…)

Jun
28
2009
1

Polycom 501 XML configuration file Example

This file is named by the MAC address of your Polycom SoundPoint IP SIP phone followed by, ‘-phone.cfg’.  In your FTP folder you would have a file for each phone – I have a single phone.  It’s MAC is ‘0004F202734B’; so my phones configuration file would be named, ‘0004f202734b-phone.cfg’.  I believe there are other conventions for naming this file as well.

The example below was used to connect my phone with a VoiceIP Solutions Asterisk PBX.  This example shows just a fraction of the many possible features in this line.  For my purposes, I defined the Asterisk server IP address, and it’s SIP credentials.  I also added the NTP server.  The ‘mwi’ tag refers to ‘message waiting information’, here I set the mailbox(s) I’m subscribing to and the extension to check voicemail.   My Asterisk voicemail menu is extension ‘299’.

0004f202734b-phone.cfg:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<!– Example Per-phone Configuration File –>
<!– $RCSfile: phone1.cfg,v $  $Revision: 1.104.2.2 $ –>
<phone1>
<reg
reg.1.displayName=”5555″
reg.1.address=”5555″
reg.1.auth.userId=”5555″
reg.1.auth.password=”2005″
reg.1.server.1.address=”192.168.1.254″
tcpIpApp.sntp.address=”pool.ntp.org”
tcpIpApp.sntp.gmtOffset=”-33600″
>
<mwi
msg.mwi.1.subscribe=”5555″
msg.mwi.1.callBackMode=”contact”
msg.mwi.1.callBack=”299″
>
</phone1>

Jun
07
2009
--

How to Configure Linux ODBC Connections for MS SQL

Last week at work(VoiceIP Solutions) I did some research for Asterisk PBX integration with Microsoft CRM.  The customer likes open source Asterisk because of the cost savings, but they requires screen pop-ups, and click to dial from their Customer Relationship Management software.  So while my manager worked on the TAPI middleware, I was charged with figuring out how to connect to the MS SQL database.  This article was prompted by a desire to connect an Asterisk PBX to MS SQL, but the tutorial applies to Apache, Postfix, CRM, PHP or any Linux app that needs to do a remote query.  Also, while the focus of this article is aimed at MS SQL the same steps(with a few tweaks) can be used for connecting to Postgre, Sybase, MySQL, etc…

I’m a lot more famalier with MySQL & PostgreSQL, but MS SQL I haven’t touched since I had the silly notion about 10 years ago to become a Windows 2000 MCSE.  Incidently, I never did take the exams, because I was a broke student at the time and I was becoming increasingly interested in Linux and Cisco.

The logical choice is to use the UNIX ODBC driver.  ODBC stands for Open Database Connectivity.  ODBC is a well documented set of API’s that is available on many platforms.  However, their are subtle differences in it’s implentation and the protocols that run at application layer.  In other words ODBC is encapsulated when making calls to a database over a network (in this case, the TDS protocol).

I did some googling and found a number of incomplete tutorials for connecting Linux to MS SQL.  This article is intended to clarify some common configuration errors and will present you with example files.  For my demonstration I’m running Fedora 10 with the latest updates as of this writing.  This article assumes you have a working MS SQL datebase with the proper user permissions in mixed mode.  I put this one in bold because it stumped the MCSE database guy for a while.

Again, I want to point out I’m not a Microsoft DBA and will likely not be able to help you on that side of the configuration.  Also, there are many versions of SQL out there and the syntax to pull data differs slightly from one version to the next.  So you may need to do a little research to make the proper pulls.

The Goals of this Post:

– install ODBC and TDS on Fedora 10

– verify TDS can login into MS SQL server

– configure odbcinst.ini, odbc.ini and freetds.conf configuration files

(more…)

May
07
2009
0

How to make USB and DVD ROM drives work on Fedora 10

Lately, I’ve been working on Asterisk PBX related articles, but today we’re going to tackle a common problem with Fedora 10: getting drives to mount to the Desktop.  If you are experiencing trouble, the likely cause is that your current user, does not have permissions to access that hardware.  The reason for this has a lot to do with the security model of Linux.

In the old days computers came on large mainframes.  It was not practical for engineers and scientist to have their very own main frame, so Unix was designed to be a multi-user operating system.  Everyone connected their own keyboard & monitor.  The permission structure was set so only certain individual accounts could do certain things.  Like say, reboot a system or delete a database.

By contrast Microsoft Windows(thru XP) is a single user operating system.  In Windows you can create extra accounts, but any of those accounts can execute arbitrary code from anywhere in the file system (c:\\ drive).  Which is a big reason for the many attacks on Windows systems.

Recently my friend got a virus that made XP unbootable and stole his World of Warcraft account login and password.  The hacker then used that information to login to his account, change his password, and his accounts valid email address.  The hacker then sold all his gear and used his character to scam other people in bad trades.  The account became banned for “economic extortion” before my friend could get his Windows XP machine back up and running.  Now he runs WoW on WINE/Fedora 10.

An appeal to Blizzard got his account back after several days and many emails. My friend requested that they check the IP address of the hacker and compare that to his previous logins.  What if the virus had collected his bank account credentials instead?  In a way he got lucky.

Goals of this Post:

– correct authorizations in Fedora 10 and allow access to USB and DVD – ROM devices

It seems odd that someone would be unable to access a USB thumb drive on any modern desktop computer, but Red Hat the maker of Fedora Linux is far more interested in their commercial offering, Red Hat Enterprise Linux(RHEL).  They model RHEL development on previous versions of Fedora.  So desktop integration is obviously not their top priority; stability and security is.  This neglect has allowed rival Unbuntu Linux to come in and snatch up the Linux desktop market.  Big mistake Red Hat…  however with a little work we can make Fedora 10 desktop work well without them.

So to correct the permissions issue(from Gnome) start by clicking, System –> Preferences –> System –> Authorizations.  Fedora may ask you for your ‘root’ password.

fedora10-authorizations-usb

fedora10-authorizations-usb

Set access to allow anyone to mount and unmount USB and other devices!  I hope this helps.  It’s frustrating dealing with these little things, but hey, “it’s free”!  If it doesn’t take, leave a comment below and I’ll try to help.

Mar
23
2009
12

Asterisk Appliance AA50 firmware upgrade

I got an Asterisk Appliance from VoiceIP Solutions for the purpose of writing up some labs.  I just got my hands on the unit and the first thing we are a going to do is upgrade the firmware.  I’m going to start by plugging my laptop’s ethernet into the LAN port on the Asterisk Appliance.

The unit I’m working with is AA50.  You can only get the firmware by registering with Digium.  Which is inconvenient.  Not a very open policy for an open source product.  In any case you must obtain the current AA50 uImage-1.3.0.1 image for browser upload.  Which I won’t lie… it is not easy.  There is a clearly marked drop down for documentation on the Digium support page.  I easily found the PDF, but there was no link to the firmware.  I ended up using their built-in search bar to find a page with a link to the AA50 firmware. I then accidentally downloaded the CD ISO image first.  I did eventually find and download the firmware.  I logged into the appliance and chose the update tab.

(more…)

Mar
19
2009
4

VoiceIP Solutions offers Asterisk PHP GUI for large scale deployments



VoiceIP Solutions
is a Asterisk ‘consulting & deployment’ company in Seattle Washington.  They deploy Asterisk solutions for businesses of all sizes.  From small offices to universities and call centers.  They have sites deployed all over the United States, but mostly on the West Coast.  I’ve been following them for some time; I guess they started deploying Asterisk before 1.2 was released.  I talked to one of their sales rep’s(I think his name was Liam) about the business and wondered if they had done any development work?  He told me that they had done some PHP work for managing larger installs and proceeded to direct me to one of there engineer/developers.

(more…)