Top

Installing and Configuring chan_mobile for Bluetooth Presence support in Asterisk 1.6

October 30, 2008

Following this tutorial on how to get Chan_Mobile working with Asterisk for Bluetooth support for our headsets and mobile phones we worked out how to get it working on Asterisk 1.6.

We figured we would share this information with our readers incase they were interested in Bluetooth for Asterisk and the capabilities it will open up to their system. Just think, the server will know when you're in the room or out of the office and other fancy things.

First you should make sure that your Bluetooth Dongle works with Asterisk, and that your Cellular Phone is known to work with Asterisk and Bluetooth. You can verify all this information over at the Voip-Info Chan_Mobile page.

Requirements:

  • Asterisk PBX
  • Bluetooth Support (Motherboard or Dongle)
  • Cellular Phone with Bluetooth support
  • Bluez Bluetooth Libraries and Development Headers

Tutorial:

So, first we have to install some pre-requisite software. We'll assume that you already have Linux installed, your kernel is compiled, Asterisk is installed and working, and that you have a basic familiarity with Linux commands. We've written this tutorial for Ubuntu, using FreePBX so instructions may change based on your OS or Asterisk Configuration GUI.

So, lets get down to business shall we.

First, install Bluez Utilities on your Server

# apt-get install bluez-utils bluez-hcidump

Now Configure Bluez to work with your server and dongle. We won't go into depth on this as it mostly "just works" but there are ample tutorials and documentation if your dongle is a little finiky on your system.

Now, open up the file hcid.conf in the Bluetooth configuration directory, and match the contents to the following.

# nano /etc/bluetooth/hcid.conf

Erase the contents, and replace it with this

# HCId options
options {
autoinit yes;
security auto;
pairing multi;
passkey "1234";
}

device {
name "Our PBX System";
class 0x3e0100;
iscan enable; pscan enable;
discovto 0;
lm accept;
lp rswitch,hold,sniff,park;
}

options {
autoinit yes;
security auto;
pairing multi;
pin_helper /etc/bluetooth/pin;
}

Note you can also experiment with making Asterisk a handsfree headset, but we won't go over this in this tutorial. The following lines can be added to your hcid.conf in replacement of the "Our PBX System" device mentioned above if you want to try this:

device {
name "Asterisk";
class 0x200404;
iscan enable;
pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}

Now that our bluetooth is configured, we can go back to configuring Asterisk to work with Chan Mobile for Bluetooth Support. We'll assume you already have Asterisk 1.6 running on your machine for this to work. If not, compile it and instal it!

Now, Enter the directory with your Asterisk-Addons 1.6 source.

# cd /opt/asterisk/asterisk-addons-1.6.0/

Issue your configure line

# make distclean
# ./configure --with-bluetooth

Now, issue the configure menu tree

# make menuselect

Now, on the left hand side, hit the down arrow button until you get to the Channel Drivers section. On the right hand side, you should see "chan_mobile" with a little "*" next to it telling us it's enabled.

[*] chan_mobile

If you don't, pretty right on your arrow keys, and then press the enter key to select chan_mobile. Exit the configuration menu by pressing F12 to save your changes.

Now, build Asterisk-Addons 1.6 as you normally would

# make
# make install

This will place chan_mobile.so into /usr/lib/asterisk/modules so the next time you start Asterisk it will be available.

We're pretty much done the "difficult" stuff now, and just need to go on and start bluetooth on our system and then configure Asterisk to work with it.

So, start up bluetooth

# /etc/init.d/bluetooth start

Now, lets make sure that Bluetooth is running and sees our devices

# hcitool dev

This should output some information like this:

Devices:
hci0 00:50:B6:80:34:DD

Make a note of the "hardware" address in a text file or somewhere handy because we will need it later. The hardware address is the one that looks like a MAC address. In this case it's "00:50:B6:80:34:DD" note that your system will be different.

Now, lets edit Asterisk's mobile configuration file

# nano /etc/asterisk/mobile.conf

Add your Bluetooth Adapter to the file like this, using the Hardware ID from the hcitool command you ran above. There should already be an entry that looks similar to this (with an id=blue) just replace the hardware ID in this entry with yours.

[adapter]
id=blue
address=00:50:B6:80:34:DD
;forcemaster=yes
;alignmentdetection=yes

Now exit and save the file.

Before we forget, we should add bluetooth to the startup options of the server if it's not already there. Do so like this;

# update-rc.d bluetooth defaults

Now, in order for other devices to be able to see your server and vice-versa we have to make it discoverable. That's done with the following command.

# dbus-send --system --type=method_call --print-reply --dest=org.bluez /org/bluez/hci0 org.bluez.Adapter.SetMode string:discoverable

The fun begins right about now. Go and get your mobile phone. Turn bluetooth on on the phone. You should see your Asterisk PBX in the list of discoverable devices. Double click on it to add it to your device, and input the security key of 1234 when prompted.

Note that on our windows mobile 6.1 devices, after adding the Asterisk PBX to our bluetooth list, we also had to click on it and then hit refresh services list a few times until it showed us "Bluetooth Headset" as a list of supported options. We selected it on the screen, and closed the bluetooth configuration on our HTC Tytn II (Kaiser) test devices.

Now it's time to make your phone discoverable so the PBX can attach to it. Go back to your phone, and find the option to enable bluetooth discovery. Turn it on.

Now from the Asterisk Server Command Line we should be able to issue this command to search for our Bluetooth Mobile Phone.

# hcitool scan

It should show you a list of results like this

Scanning ...
00:16:BC:1F:E1:E8 Phone1
00:17:83:6F:BD:51 Phone2

In our example, we'll only be connecting to Phone2. One finicky thing we noticed is that if you want to connect more than one mobile phone at a time, you need a dongle to match. So, for example if you want to connect 5 bluetooth mobile phones, you would also need 5 bluetooth dongles, and 5 free USB ports (or a USB HUB) to get it all working. We've never tried with more than 2 bluetooth phones, so your mileage may vary.

If you don't see your phone, something is wrong - try the above steps again to see if it fixes it.

Now continue on by stopping Asterisk PBX, and reloading it to take advantage of our new chan_mobile module.

# /etc/init.d/asterisk stop

Now start Asterisk in debug mode so you can verify everything is working.

# asterisk -vvvvvvvvvvvvvgc

Now type this command on the Asterisk CLI to find your mobile devices

*CLI> mobile search

You should see something similar to the following

Address Name Usable Type Port
00:17:83:6F:BD:51 Phone2 Yes Phone 2
00:13:33:44:4d:23 Phone1 Yes Phone 5

The above is a listing of all Bluetooth devices available to your Asterisk PBX.

  • The Address Field is the Device Identifier Code (MAC Address)
  • The Name Field holds the name of the device (Phone1)
  • The Usable Field tells us if the phone is Usable by Asterisk or not (Yes/No)
  • The Type Field tells us if it's a Phone (FXO) or a Headset (FXS) device
  • The Port Field tells us which port the phone is using

Make a note of this information and continue on to the next step.

Now, exit Asterisk by typing "stop now" on the command line

*CLI> stop now

You'll be back at the CLI now.

In our example, we'll be using Phone2 to configure to work with Asterisk.

Go back and edit your mobile configuration file in /etc/asterisk to look similar to this

# nano /etc/asterisk/mobile.conf

Add something similar to the following below the adapter configuration you added earlier in the tutorial.

[TytnII]
address=00:17:83:6F:BD:51
port=2
context=from-pstn
adapter=blue
;group=1

If you are configuring a headset, the line would look something like this instead

[headset]
address=xx:xx:xx:xx:xx:xx ; the address of the headset
port=x ; the port number
type=headset ; tells asterisk it is a headset
adapter=blue ; adapter to use

Now you can start asterisk again. I would start it in debug mode so you can verify your phone is connected.

# asterisk -vvvvvvvvvvvvvvvgc

You should see messages similar to the following on the Asterisk Console letting you know your device has connected to Asterisk

-- Bluetooth Device TytnII has connected.
-- Bluetooth Device TytnII initialised and ready.

And if you issue the show devices command

*CLI> mobile show devices

You should see something like this

ID Address Group Adapter Connected State SMS
TytnII 00:17:83:6F:BD:51 0 blue Yes Free No

This means your phone is now connected to Asterisk. Depending on the context you put it in, if a call comes in to your cellular phone and you are within proximity of your Asterisk server it should route over to your one of your SIP extensions. Asterisk will automatically pair and unpair with your mobile phone as you come in and out of range respectively. Cool huh?

It is worth it to mention this warning from the original article as well: "Important: Watch what your cell phone is doing the first few times. Asterisk won’t make random calls but if chan_mobile fails to hang up for some reason and you get a huge bill from your telco, don’t blame me."

Hope you enjoyed this tutorial, let us know if you have any comments or other fun ideas to do with chan_mobile, bluetooth and Asterisk in the comments!

FARO Releases ‘Green’ PBX Appliance. Environmentalist Phreakers Rejoice!

October 30, 2008

It seems Green Technology is hitting us everywhere so why not in the PBX and VOIP sector as well? Well, the wait is over. Faro has released one of the first 'Green' appliances for telephony. Now, we know there are other devices with a small power footprint, but none have been marketed to be environmentally friendly pbx products. Let us know in the comments if you know of any others.

medium

 

This device comes with all the features you'd expect from a telephone system, wizard driven installs, 10/100 ethernet, fanless and diskless, up to 30 users with 25 concurrent call capability. Supports SIP and IAX trunks with SIP Phones and much more.

medium

It's been developed by an Italian firm called ZeroZero39 and also has some Italian Language documentation for the system available on their site.

medium2

The GUI looks very fancy (Their specs even mention 'web 2.0 ajax'). And it sure looks nice and tiny and easy to install and manage. Hey, if you guys at Faro/ZeroZero39 are reading this, I'd love to demo a unit for you and write a nice lengthy post - hint hint!

For more information, see Voip-Info or Contact faro at zerozero39 dot it

Enable SNMP on your Cisco Routers to watch SIP and other traffic

October 28, 2008

It’s pretty easy, just ssh (or telnet if you’re crazy) to your router and do this:

# en

# conf t

# snmp-server community YOUR.SNMP.COMMUNITY ro

# access-list 60 permit IP.OF.SNMP.DAEMON

# snmp-server host IP.OF.SNMP.DAEMON YOUR.SNMP.COMMUNITY

# snmp-server enable traps

Now your favourite graphing software should be able to collect all the data you need.

 

Asterisk SNMP with Cacti Howto upgraded for Asterisk 1.6 and Ubuntu!

October 28, 2008

Here's an update to our popular article Asterisk 1.4 with SNMP and Cacti using a remote box. This howto will be a little different in that it will be using Asterisk 1.6, the latest in the pipeline for Opensource PBX solutions from Digium. This process should be a little easier than it was last time, however will sacrifice a little bit of the "cool factor" (ie: security, etc) because it will be running local to Asterisk. Our test system won't be affected by this, but if you're running this on a live production server, you may want to combine information from the other howto for Asterisk 1.4 and remote Cacti monitoring instead of using this one.

REQUIREMENTS:

  • Asterisk Server with Apache Installed (we’ll call it ASTERISK-BOX)
  • Ubuntu or equivalent Linux dist installed
  • Some Time
  • Interest in nerdy graphs

So, lets get this party started right? First we'll need to be clear on a few things, this tutorial expects that you have a fully functional PBX running on your network already, with Apache, PHP and MySQL already installed. We happen to be using FreePBX on our Asterisk 1.6 system so this is already taken care of for us. If you use command line Asterisk, or another GUI for Asterisk then your mileage may vary, but probably only by one or two sideroads if you catch my meaning.

First, lets get some stuff installed on our Asterisk/Apache server.

# apt-get install snmp snmpd libsnmp-base libsnmp-dev

Now, we have to recompile Asterisk 1.6 to use snmp, easy enough.

# cd /opt/asterisk/asterisk-1.6.0/
# ./configure --with-ssl --with-netsnmp --with-cap
# make menuselect

Now make sure that the res_snmp module is enabled under the resource modules submenu by pressing space when it's selected if the "asterisk" character isn't visible that means it's disabled.

[*] res_snmp

A little aside here, I know I've mentioned this in the past but wow does the ncurses interface for Asterisk Configuration really blow me away. I always thought the Linux Kernel's was cool, but it doesn't even compare to what Digium and the Community has done for Asterisk PBX.

Okay, enough other crap, back to the task at hand.

Exit the configuration by pressing F12 to save and exit.

Now you're back at your prompt and ready to build your Asterisk Source. Do so like this:

# make
# make install

We'll have to enable res_snmp within asterisk now. If you haven't, copy over the default configuration file to the Asterisk configuration directory. If you've already configured res_snmp from 1.4 you should compare the files for differences to make sure they match up between the Asterisk 1.4 and 1.6 Changes.

Still in the Asterisk 1.6 Source directory run this command

# cp configs/res_snmp.conf.sample /etc/asterisk/res_snmp.conf

Now enable NET-SNMP with Asterisk

# nano /etc/asterisk/res_snmp.conf

Make sure it looks like this.

[general]
subagent = yes
enabled = yes

Now, we should configure some NET-SNMP Options

First we'll start with removing and backing up the original configuration file

# mv /etc/snmpd.conf /etc/snmpd.conf.orig

Now we'll create our new file

# nano /etc/snmpd.conf

Input the following, editing to suit your environment

rocommunity YOUR.COMMUNITY.NAME
master agentx
#agentXSocket tcp:10.0.3.20:705
agentXperms 0660 0550 nobody asterisk
com2sec local localhost YOUR.COMMUNITY.NAME
com2sec mynetwork0 10.0.1.0/24 YOUR.COMMUNITY.NAME
com2sec mynetwork1 10.0.2.0/24 YOUR.COMMUNITY.NAME
com2sec mynetwork2 10.0.3.0/24 YOUR.COMMUNITY.NAME
com2sec mynetwork3 10.0.4.0/24 YOUR.COMMUNITY.NAME
group MyROGroup any local
group MyROGroup any mynetwork0
group MyROGroup any mynetwork1
group MyROGroup any mynetwork2
group MyROGroup any mynetwork3
view all included .1
access MyROGroup "" any noauth 0 all none none

*Note in the above script the permissions, and the nobody, asterisk. This is because I am running asterisk as asterisk:asterisk, so this is where agentX needs to connect. The username doesn’t matter apparently, but the group does.

Now, we have to modify the snmp default command line in the initialization script for NET-SNMP

# nano /etc/default/snmpd

Change the lines that looks like this

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
TRAPDRUN=no
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

To ones that looks like this

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1 -x /var/agentx/master'
TRAPDRUN=yes
TRAPDOPTS='-a -Lf /var/log/snmptrapd.log -p /var/run/snmptrapd.pid'

Exit the file now

Now we should stop asterisk and net-snmp (if they are running)

# /etc/init.d/asterisk stop
# /etc/init.d/snmpd stop

Now we should start both back up. I use screen so I can do all of this.

# screen
screen#asterisk -vvvvvvvvvvvvvvvvvvvvgc
<hit CTRL-A-D>

Now we can start SNMPD

# /etc/init.d/snmpd start

If we enter our screen session again, we should be back at the Asterisk CLI with this message:

# screen -r
*CLI> NET-SNMP version 5.3.1 AgentX subagent connected

You can now exit asterisk and close the GNU Screen session.

*CLI> stop now
# exit
[screen is terminating]
#

First stop SNMP again, and then start them both up normally.

# /etc/init.d/snmpd stop
# /etc/init.d/asterisk start
# /etc/init.d/snmpd start

Now the configuration for SNMP and Asterisk is pretty much complete, but we should ensure that snmpd is going to run on the next boot of the Ubuntu 8.0.4 Server.

# update-rc.d snmpd defaults

Okay, so we're pretty much done the setup now, lets just test it out. We should copy the Asterisk SNMP MIB's over to the local MIB directory so we can walk the tree.

# cp /opt/asterisk/asterisk-1.6.0/doc/asterisk-mib.txt /usr/share/snmp/mibs/
# cp /opt/asterisk/asterisk-1.6.0/doc/digium-mib.txt /usr/share/snmp/mibs/

Now lets get to testing.

# export MIBS=+ASTERISK-MIB
# snmpwalk -c YOUR.COMMUNITY.NAME -v 1 localhost asterisk

You should see a big long list like this but with a lot more information:

<snip>
ASTERISK-MIB::astChanTypeDesc.6 = STRING: Local Proxy Channel Driver
ASTERISK-MIB::astChanTypeDesc.7 = STRING: Standard Linux Telephony API Driver
ASTERISK-MIB::astChanTypeDesc.8 = STRING: Call Agent Proxy Channel
ASTERISK-MIB::astChanTypeDesc.9 = STRING: Objective Systems H323 Channel Driver
ASTERISK-MIB::astChanTypeDesc.10 = STRING: UNISTIM Channel Driver
ASTERISK-MIB::astChanTypeDesc.11 = STRING: Session Initiation Protocol (SIP)
ASTERISK-MIB::astChanTypeDeviceState.1 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.2 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.3 = INTEGER: false(2)
ASTERISK-MIB::astChanTypeDeviceState.4 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.5 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.6 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.7 = INTEGER: false(2)
ASTERISK-MIB::astChanTypeDeviceState.8 = INTEGER: true(1)
ASTERISK-MIB::astChanTypeDeviceState.9 = INTEGER: false(2)
ASTERISK-MIB::astChanTypeDeviceState.10 = INTEGER: false(2)
ASTERISK-MIB::astChanTypeDeviceState.11 = INTEGER: true(1)
</snip>

If this all worked, then you're ready to move over to setting up Cacti because it's all working. If this isn't working, then go back and try this again to make sure you're not missing a step or something.

So, lets begin the Cacti Setup for Asterisk 1.6 and SNMP portion of this tutorial yes?

First install Cacti the "ubuntu" way, and configure it with their prompts (selecting Apache2, and entering your mysql passwords for the cacti installation). If you've already installed Cacti on this server then please check the Cacti docs for what you have to do.

# apt-get install cacti

Now create our polling script

# nano /usr/local/bin/snmp_poller.sh

Copy this into it, modifying paths if you need to

#!/bin/bash
# filename: snmp_poller.sh
# created this to make the polling process easier
# Can make updates to it and such to add functionality
MIBS=+ASTERISK-MIB
export MIBS
/usr/bin/php /usr/share/cacti/site/poller.php

Now make it executable

# chmod 755 /usr/local/bin/snmp_poller.sh

Now, edit your crontab file so we can enable the polling script we just created.

# crontab -e

Then add this line, which will run the script every 5 minutes

*/5 * * * * /usr/local/bin/snmp_poller.sh > /dev/null 2>&1

Now we'll have to chown the cacti configuration file because we're running Asterisk and Apache as "asterisk:asterisk" on our system. Please customize this dependant on your configuration.

# chown root:asterisk /etc/cacti/debian.php
# chown root:asterisk /var/lib/cacti/rra

Exit and save the file, and now we are done on the console and can go into Cacti’s web interface for the rest of this tutorial.

In a browser hit your cacti installation

http :// your.cacti.ip.box /

Install Cacti as you normally would by following the prompts.

Now we have to setup Cacti as per mark’s instructions, just like in the old article.

The first step is to add the server to the Cacti database. First, click Create devices on the front page. Click the Add link on the right side of the screen.

Clicking add reveals a new screen where you will input basic information about connecting to the server. Fill out the fields, making sure to set the community name to COMMUNITY_NAME (what you put in snmpd.conf) Also, make sure the template is set to None, unless you know for sure you want another set of services automatically setup to be monitored. After clicking create, you’ll come to a screen with the systems in cacti, click the one you just created. Select “SNMP ? Generic OID Template” from the drop down menu under “Associated Graph Templates” and click add. Add more services if you like, but this is the one we will use to connect to the Asterisk SNMP module.
Advertisment

Now that the server is setup, we need some graphs. Click the create graphs for this host link at the top. On this page, select the “SNMP ? Generic OID Template” by clicking the checkbox next to it. Select “SNMP ? Generic OID template” from the drop down menu and click “create”. Fill in the form with your basic information about the particular graph you’re looking at. The vertical label will basically be the number of current calls in use.

To elaborate on the above, here’s a sample of one of my entries into Cacti

After you create the device, and add the Generic OID Template do this.

Go to your device, create a new graph, generic OID template, and enter your values like the following example:

Title: |host_description| - Asterisk Channels In Use
Vertical Lable: Current Channels Used
Legend Color: Your Choice
Legend Text: Current Channels Used
Name: |host_description| - Asterisk Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.1.0

Title: |host_description| - Asterisk Bridged Channels
Vertical Lable: Current Bridged Channels
Legend Color: Your Choice
Legend Text: Current Bridged Channels
Name: |host_description| - Asterisk Bridged Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.5.1.0

Title: |host_description| - Asterisk Active Calls
Vertical Lable: Current Active Calls
Legend Color: Your Choice
Legend Text: Current Active Calls
Name: |host_description| - Asterisk Active Calls
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.2.5.0

Title: |host_description| - Asterisk Calls Processed
Vertical Lable: Current Calls Processed
Legend Color: Your Choice
Legend Text: Current Calls Processed
Name: |host_description| - Asterisk Calls Processed
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.2.6.0

Title: |host_description| - Asterisk SIP Channels
Vertical Lable: SIP Channels Used
Legend Color: Your Choice
Legend Text: SIP Channels Used
Name: |host_description| - Asterisk SIP Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.13

Title: |host_description| - Asterisk IAX Channels
Vertical Lable: IAX Channels Used
Legend Color: Your Choice
Legend Text: IAX Channels Used
Name: |host_description| - Asterisk IAX Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.6

Title: |host_description| - Asterisk DAHDI Channels
Vertical Lable: DAHDI Channels Used
Legend Color: Your Choice
Legend Text: DAHDI Channels Used
Name: |host_description| - Asterisk DAHDI Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.3

Title: |host_description| - Asterisk Bluetooth Use
Vertical Lable: Bluetooth Channels Used
Legend Color: Your Choice
Legend Text: Bluetooth Channels Used
Name: |host_description| - Asterisk Bluetooth Channels
Maximum Value: 100
Data Source: GUAGE
OID: .1.3.6.1.4.1.22736.1.5.4.1.7.5

Since the writing of the last article on the subject of SNMP and Asterisk 1.4, the values have again changed for Asterisk 1.6. Below is a listing of them for your convienience. This is where things have changed since we wrote our article in 2007 and when Mark wrote his article in April 2006. Now we have new OID’s to deal with which I will provide a listing of below…

Channel.1 = Media Gateway Control Protocol (MGCP)
Channel.2 = Skinny Client Control Protocol (Skinny)
Channel.3 = DAHDI Telephony Driver
Channel.4 = Gtalk Channel Driver
Channel.5 = Bluetooth Mobile Device Channel Driver
Channel.6 = Inter Asterisk eXchange Driver (Ver 2)
Channel.7 = Jingle Channel Driver
Channel.8 = Local Proxy Channel Driver
Channel.9 = Standard Linux Telephony API Driver
Channel.10 = Call Agent Proxy Channel
Channel.11 = Objective Systems H323 Channel Driver
Channel.12 = UNISTIM Channel Driver
Channel.13 = Session Initiation Protocol (SIP)

And a couple others that may be of interest to us number of channels, and bridged channels respectively.

ASTERISK-MIB::astConfigCallsActive.0
ASTERISK-MIB::astConfigCallsProcessed.0
ASTERISK-MIB::astNumChannels.0
ASTERISK-MIB::astNumChanBridge.0

Here are the ones I’m using

Overall Channels:
ASTERISK-MIB::astNumChannels.0

Overall Bridged:
ASTERISK-MIB::astNumChanBridge.0

Active Calls:
ASTERISK-MIB::astConfigCallsActive.0

Calls Processed:
ASTERISK-MIB::astConfigCallsProcessed.0

Overall SIP:
ASTERISK-MIB::astChanTypeChannels.13

Overall IAX:
ASTERISK-MIB::astChanTypeChannels.6

Overall DAHDI:
ASTERISK-MIB::astChanTypeChannels.3

Bluetooth In use:
ASTERISK-MIB::astChanTypeChannels.5

Now we’ll need to convert these into numerical OID format so Cacti can access them. This is very straight forward and done like this:

Here are the commands used to translate between numerical and alphabetic:

To convert from Alphabetic just do this for example:

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY ASTERISK <MIB>

A real world example yields this:

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astNumChannels.0
.1.3.6.1.4.1.22736.1.5.1.0

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astNumChanBridge.0
.1.3.6.1.4.1.22736.1.5.5.1.0

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astConfigCallsActive.0
.1.3.6.1.4.1.22736.1.2.5.0

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astConfigCallsProcessed.0
.1.3.6.1.4.1.22736.1.2.6.0

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.13
.1.3.6.1.4.1.22736.1.5.4.1.7.13

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.6
.1.3.6.1.4.1.22736.1.5.4.1.7.6

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.3
.1.3.6.1.4.1.22736.1.5.4.1.7.3

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c localhost ASTERISK-MIB::astChanTypeChannels.5
.1.3.6.1.4.1.22736.1.5.4.1.7.5

Here are the commands used to translate between numerical and alphabetic:

To convert from Alphabetic just do this for example:

# snmpwalk -On -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY ASTERISK-MIB::astChanTypeChannels.9

and it will spit out the numerical version of the OID, to see the alpha one just do this instead

# snmpwalk -c YOUR.COMMUNITY.NAME -v 2c YOUR.ASTERISK.IP.ADDY .1.3.6.1.4.1.22736.1.5.4.1.7.9

And now after we have that all sorted out and you have what you want to graph all figured out.

Now you’re ready to let the poller do it’s work. Make some calls, or stress test your Asterisk system using our SIPP howto and watch the graphs come to life. Here’s some samples right after we created our graphs.

Vp_allchan

Vp_bridged

Let me know how you make out and if you have any issues. We're still trying to figure out how we can go about getting constant information instead of polled every 5 minutes, let us know if you have any tips!

Asterisk Performance as a B2BUA (Back to Back User Agent) Report Released

October 22, 2008

Found on the list today, some interesting results, promising even.

In 2007 we published the results of a performance test of Asterisk as a Back to Back User Agent (B2BUA). Based on the helpful feedback from the mailing list we improved our test procedures and re-ran a new performance test case of Asterisk configured as a B2BUA.

Our test platform hosting Asterisk was a $1000 Dell PowerEdge 840 with a Quad Core Xeon X3220, 2x4M cache, 2.40 GHz, 1066 MHz FSB and 4 GB RAM.
Redhat V5 was the operating system. The test was configured to simulate a wholesale VoIP operation with three minute call durations and an average of two call retries for every completed call. This was an "out of the box"
Asterisk configuration with default settings and no optimizations.

We found that Asterisk on the test server could handle approximately 1000 simultaneous calls with no codec transalation. This works out to be about a
$1 per port investment for a B2BUA platform.

When calls were transcoded from G.711 to G.729, the call capacity fell to 320 simultaneous calls. With the added cost of of the G.729 codec royalty and the lower call capacity, the cost increases to approximately $13.50 per port

You can download the test results and all the test plan details from:
http://www.transnexus.com/White%20Papers/Performance_Test_of_Asterisk_v1-4.htm

Jim Dalton
VoIP Routing, Accounting, Security
1.404.526.6053
www.TransNexus.com

PBXPrompts no longer offering custom prompts

October 21, 2008

We went to order some more prompts from PBXPrompts, and noticed that the online ordering form for Custom PBX Prompts was offline. Uh oh!.

Off went a quick email to our rep, and we found out that they are no longer accepting new customers and orders for customized prompts.

This leaves people with the custom voices in a little bit of a pickle. Not to worry though, they are honouring any old clients that are "locked in" to the voices they already ordered, and will still be selling the prompt replacement packages as well.

We'd suggest any clients that require voices get them done now rather than later incase they stop accepting orders all together.

We'd like to also point out that our representative was very helpful and helped along every step of the way.

Algo Rythmn Calls Out Digium and Asterisk yet again with another 0 day exploit.

October 19, 2008

You may remember the previous exploit that Algo Rythmn pulled out to show us that Asterisk was (and apparently is) still vulnerable. While Digium has acknowledged this fact, they haven't fixed it according to Algo Rythmn.

Read on for more:

Not surprisingly, Digium has yet to resolve these first two 0days that were released through this site. There is only one reference to the issues on the Digum mailing list.

Please note Tilghman’s response…

“This has already been addressed”

I’m unsure if they are either ignorant to the issue ( a.k.a. Tilghman is ignorant to his own job ) or they are trying to sweep the dirt ( 0day ) under the rug. Either way, these 0days are not resolved!! Go test it for yourself. None the less, I’ll prove it without technical terms.

How could Digium fix a bug in an advisory from July 18th when it was publicly released on September 26th? Thats two months in the 0day direction.

As well, I’ve decided to release another outstanding 0day to see if Tilghman can count in larger absolute date values. It does the same thing. It turns an Asterisk PBX’s into the most impressive paper weight running Linux…

At least the NIST NVD rates these types of Asterisk vulnerabilities as a CVSS of 7.8 out of 10!!

If anyone is aware that a Digium employee/affiliate is going to be in New York City for any reason, please inform me through this site. I’m looking forward to giving them a piece of my mind in person.

For the time being, the best thing any concerned asterisk professional could do is to email and/or call Digium asking them why they are refusing to fix these vulnerabilities.

Full Article and Release (Asterisk NSFW!) Here
Full Exploit Here

« Previous PageNext Page »

Bottom