Categories
Knowledge Base

Elmeg IP290 Configuration

elmeg_290_large

 

The Elmeg IP290 are a clone of the Old Snom 190 Sets. and these did support auto configuration. We hoped that it was a simple change to get the files working with the Elmeg.

It turns out that it wasn’t, There are a few gotchas.

  1. The phones dont seem to support tftp download, Just http and https
  2. They dont support sub directories. So files must be in the root directory of your webserver.

Firstly you need to configure your dhcpd.conf

Add the following to the general section

option snom-setting code 66 = string;
option snom-bootfile code 67 = string;

Then the following to the subnet

class “snom-phones” {
match if substring(hardware,1,3) = 00:09:4f;
option snom-setting “https://SERVERIP”;
}

Theb the following are the two files you need to create .

elmegIP290.htm

<html>

<pre>

# example snom general setting file

# After each setting (before the colon) you can set a flag

# General language and time configuration parameter

language: English

web_language: English

timezone: GBR-0

time_server: pool.ntp.org

ntp_server: pool.ntp.org

date_us_format: off

time_24_format: on

user_host1: SERVERIP

user_host2: SERVERIP

tone_scheme: GBR

</pre>

</html>

elmegIP290-00094FMACADDR.htm

<html>

<pre>

# example snom specific setting file

# After each setting (before the colon) you can set a flag

user_name1: 345

user_pass1: PASSWORD

user_name1: 345

user_realname1: 345

user_host1: SERVERIP

user_srtp1: off

user_dp_str1: !([^#]%2b)#!sip:1@d!d

# You may add up to 4 (snom300/ 12 (snom320,snom360,snom370) accounts

# set 1st account to active outgoing identity

active_line: 1

</pre>

</html>

 

Categories
Blog

A new patent troll.

SIP Trunking

In the last few weeks a large sleeping troll has come out of hibernation and seems set on disrupting the whole voip market.

Quote

“BT is engaged in licensing an extensive range of standards related patents that address the key features of SIP Trunking providers and VOIP operators providers.

BT’s Patents address a wide range of fundamental capabilities now in widespread deployment, such as:

  • Setting up a call
  • Breaking out to other networks
  • Managing resources efficiently
  • Registering terminal to a network
  • Cost effective call completion
  • Monitoring and alerting of IP call quality”

Well that pretty much covers all of the workings of a SIP network. A full list of the patents is here  .

But its not Just BT, AT&T also have claims over SIP as well see here for a list.

It seems that some of the major patent holders see more money in the licencing of the now ubiquitous SIP protocol than maybe supplying it to customer. Which is a shame as the only ones who will make any money will be the Lawyers in the end.

More to follow on this I’m sure….

Categories
Asterisk Support Elastix Support Knowledge Base Technical

Running a Macro on answer for Asterisk queues.

asteriskThe Asterisk Queue application has an option that will run a macro on answer, This can be very useful when integrating with CRM such as Capsule or call centre applications.

This option isnt included in freepbx, Though this can be hand coded it isn’t best to do this when using Elastix, AsteriskNoW or any other freepbx based system.

To add this option We have written a couple of patched versions of the relevant freepbx pages that can be downloaded here , You will also need to add a extra field to the mysql database as follows

  1. Log in to mysql:   mysql -u root -p
  2. Enter password
  3. mysql> use asterisk
  4. mysql> ALTER TABLE `queues_config` ADD `qmacro` VARCHAR( 255 ) NULL;
  5. mysql> describe queues_config;

You should now have something like this:- | qmacro | varchar(255) | YES | | NULL | | as the last line of the table.

Now download the tar file and unpack it. then copy the two files to the /var/www/html/admin/modules/queues directory.

On loading the queue page in freepbx you will now have the “Queue macro on answer” box

queuemacro

In this box you put the macro name you wish to run when a member answers a call.

For example:-

[macro-logit]
exten => s,1,Noop( capsule crm intergration ${crminfo} ${CALLERID(all)})
exten => s,n,Set(foo=${CURL(http://127.0.0.1/directory/capsual.php?strCallid=${crminfo})})
exten => s,n,Noop(${foo})
exten => s,n,Hangup()

This a simple dialplan that runs a php script to log calls to the capsule crm

capsual.php

<?php
$today = date(“F j, Y, g:i a”);
$duedate1 = date(“Y-m-d”);
$duedate2 = date(“H:i:s”);
$Token = ‘YOUR CAPSUAL API CODE’;
$number = $_GET[‘strCallid’];
$datetime = $today;
$duedate = “$duedate1″.”T”.”$duedate2″.”Z”;
echo $duedate;
$myxml=”<?xml version=”1.0″ encoding=”UTF-8″?>n
<task>n
<description>Call recieved from $number at $datetime. Please update and assign this task if required</description>n
<dueDateTime>$duedate</dueDateTime>n
<category>incoming call</category>n
</task>”;
// The URL to connect with (note the /api/ that’s needed and note it’s person rather than party)
// SEE: http://capsulecrm.com/help/page/api_gettingstarted/
$capsulepage = “https://youraccount.capsulecrm.com/api/task”;
echo $capsulepage;
echo $number;
// Initialise the session and return a cURL handle to pass to other cURL functions.
$ch = curl_init($capsulepage);
// set appropriate options NB these are the minimum necessary to achieve a post with a useful response
// …can and should add more in a real application such as
// timeout CURLOPT_CONNECTTIMEOUT
// and useragent CURLOPT_USERAGENT
$options = array(CURLOPT_USERPWD => “$Token:x”,
CURLOPT_HTTPHEADER => array(‘Content-Type: application/xml’),
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $myxml
);
curl_setopt_array($ch, $options);
// Do the POST and collect the response for future printing etc then close the session
$response = curl_exec($ch);
$responseInfo = curl_getinfo($ch);
curl_close($ch);
echo $responseInfo;
echo $response;
?>

Have fun

 

Categories
Knowledge Base Technical

Flushing your sendmail queue.

Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue and are marked as “Deferred: Connection timed out”. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command

sendmail -q -v

does not really try to reconnect to these hosts and still assumes that the connection timed out. The reason is that the hoststatus is cached, per default for a period of 30 minutes. Using

sendmail -OTimeout.hoststatus=0m -q -v

you can re-run the mail queue and force sendmail to reconnect to the hosts. You may want to define an alias for that, say, ‘sendmail-flush-timeouts’.

You can set further options in /etc/sendmail.cf.

Categories
Blog

Zen like pondering about telephony and Asterisk

Categories
Knowledge Base Technical

Skype for SIP name to DDI with Asterisk

When using Skype for SIP trunks with Asterisk a simple an neat way to enable DDI calling for the skype names is to use the “extension” option.
This means that the ‘To’ in in the sip header is set to what you set.

This can then be picked out with a simple little bit of dialplan

exten => 99051000000000,1,Set(CALLERID(num)=${CALLERID(name)})
exten => 99051000000000,2,Set(cNum=${SIP_HEADER(TO):5:6})
exten => 99051000000000,3,Noop(${cNum})
exten => 99051000000000,4,Goto(from-pstn,${cNum}|1)

In the above example we have 6 digit ddi numbers in the context from-pstn.

Setting up the Skype end is as simple as logging into your BCP and then the relevent profile and clicking on the calling tab

and setting as below

Image

This lets you now use one account and have all your BCP accounts have DDI calls directed at the PBX

Categories
Knowledge Base

Installing Asterisk 11 on Centos 6.3

asteriskThis is a short video tutorial on the installation of Asterisk 11, I have included the blog and video in one place for ease of viewing

First, you will want to be sure that your server OS is up to date.

yum update -y

Disable SELinux by changing “enforcing” to “disabled” in /etc/selinux/config. Use a text editor or copy and paste this command.

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config

After you update and disable SELinux, you’ll need to reboot.

reboot

Next, you will want to resolve basic dependencies. (More information on Asterisk dependencies.)

yum install -y make wget openssl-devel ncurses-devel  newt-devel libxml2-devel kernel-devel gcc gcc-c++ sqlite-devel

Change into the /usr/src/ directory to store your source code.

cd /usr/src/

Download the source tarballs. These commands will get the current release of DAHDI 2.6, libpri 1.4 and Asterisk 11.

wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4-current.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

Extract the files from the tarballs.

tar zxvf dahdi-linux-complete*
tar zxvf libpri*
tar zxvf asterisk*

For the next set of commands it is important to follow the proper order: DAHDI first, then libpri, then Asterisk.

Install DAHDI.

cd /usr/src/dahdi-linux-complete*
make && make install && make config

Install libpri.

cd /usr/src/libpri*
make && make install

Change to the Asterisk directory.

cd /usr/src/asterisk*

In the next step, running the “configure” script will vary depending on whether your system is 32-bit or 64-bit. (Watch the video for more details.) When the menuselect command runs, select your options, then choose “Save and Exit” and the install will continue.

Use this command if you are installing Asterisk on 32bit CentOS.

./configure && make menuselect && make && make install

Use this command if you are installing Asterisk on 64bit CentOS.

./configure --libdir=/usr/lib64 && make menuselect && make && make install

Optional: If you ran into errors you will want to clean the install directory before recompiling.

make clean && make distclean

Once you have an error-free install, copy the sample files from the configs subdirectory into /etc/asterisk.

make samples

Then add the Asterisk start script to the /etc/init.d/ directory

make config

Start DAHDI.

service dahdi start

Start Asterisk.

service asterisk start

Connect to the Asterisk CLI.

asterisk -rvvv

And now you have Asterisk 11 running on CentOS 6!

Original Article written by Billy Chia @ digium

Categories
Handsets

Digium Handsets

The Only Phones Built Specifically For Asterisk

  • asteriskEasy provisioning from Asterisk or AsteriskNOW
  • Integrated with Asterisk voicemail, directory, parking, call recordings, call queues and more
  • Build custom phone apps with a simple JavaScript API

Digium’s family of IP Phones are the first on the market built specifically for use with Asterisk and Asterisk-based systems. All models include HD audio and plug-and-play deployment at a price that fits any budget. With multiple line appearances, context-aware soft keys, and advanced applications that integrate directly with Asterisk features, the Digium phones offer a better user experience than any other phone on the market.

Asterisk Phone Features

Smart Software

Access to information is the key to productivity in today’s business environment. The integrated applications that come standard with all Digium phones put critical information at your fingertips. With voicemail, call log, contacts, phone status, user presence, parking, call recording and call queue interface, the Digium phones provide simple, intuitive access to a wealth of information, saving valuable time.

 Simplified Provisioning

Standards-based IP phones have a reputation for being difficult to install and configure. Most systems require changes to network configurations or additional components to facilitate deployment. Digium phones support plug-and-play provisioning. Simply plug in the phone and it will automatically discover Asterisk systems on the network. Select the user you want to assign to the phone and the proper configuration is instantly loaded. For larger deployments you can pre-assign phones by tying a MAC address to an Asterisk user. It’s that simple.

Custom Applications

Most desktop phones come with a fixed feature-set that is determined exclusively by the manufacturer. Digium phones are different. All models include the Digium app engine, an innovative feature that makes it remarkably simple to build and deploy custom apps. All of the productivity apps that ship with a Digium Phone are written with the JavaScript API that is used by the app engine. A BETA version of the phone firmware with app development tools is available at phones.digium.com, along with documentation for developing your custom apps.

Getting Started With Digium Phones

Get AsteriskDigium phones will work with any version of Asterisk. However, we’ve added some compelling features that are only available today in Asterisk 11 or in special branches of Asterisk 1.8 (seeCertified Asterisk) and Asterisk 10 (the -digiumphones branch). To take advantage of simple provisioning, integrated applications and the app engine, you will need to use one of these versions

Call or email for sales enquiries 

Categories
Elastix Support Knowledge Base

Setting up extensions in Elastix

Elastix Asterisk IPPXThis is a short video on the setting up of extensions on the Elastix Asterisk based IPPX.

 

Categories
Knowledge Base

VoIP – Per Call Bandwidth

These protocol header assumptions are used for the calculations:

  • 40 bytes for IP (20 bytes) / User Datagram Protocol (UDP) (8 bytes) / Real-Time Transport Protocol (RTP) (12 bytes) headers.
  • Compressed Real-Time Protocol (cRTP) reduces the IP/UDP/RTP headers to 2or 4bytes (cRTP is not available over Ethernet).
  • 6 bytes for Multilink Point-to-Point Protocol (MP) or Frame Relay Forum (FRF).12 Layer 2 (L2) header.
  • 1 byte for the end-of-frame flag on MP and Frame Relay frames.
  • 18 bytes for Ethernet L2 headers, including 4 bytes of Frame Check Sequence (FCS) or Cyclic Redundancy Check (CRC).

Note: This table only contains calculations for the default voice payload

Codec Information Bandwidth Calculations
Codec & Bit Rate (Kbps) Codec Sample Size (Bytes) Codec Sample Interval (ms) Mean Opinion Score (MOS) Voice Payload Size (Bytes) Voice Payload Size (ms) Packets Per Second (PPS) Bandwidth MP or FRF.12 (Kbps) Bandwidth w/cRTP MP or FRF.12 (Kbps) Bandwidth Ethernet (Kbps)
G.711 (64 Kbps) 80 Bytes 10 ms 4.1 160 Bytes 20 ms 50 82.8 Kbps 67.6 Kbps 87.2 Kbps
G.729 (8 Kbps) 10 Bytes 10 ms 3.92 20 Bytes 20 ms 50 26.8 Kbps 11.6 Kbps 31.2 Kbps
G.723.1 (6.3 Kbps) 24 Bytes 30 ms 3.9 24 Bytes 30 ms 33.3 18.9 Kbps 8.8 Kbps 21.9 Kbps
G.723.1 (5.3 Kbps) 20 Bytes 30 ms 3.8 20 Bytes 30 ms 33.3 17.9 Kbps 7.7 Kbps 20.8 Kbps
G.726 (32 Kbps) 20 Bytes 5 ms 3.85 80 Bytes 20 ms 50 50.8 Kbps 35.6 Kbps 55.2 Kbps
G.726 (24 Kbps) 15 Bytes 5 ms 60 Bytes 20 ms 50 42.8 Kbps 27.6 Kbps 47.2 Kbps
G.728 (16 Kbps) 10 Bytes 5 ms 3.61 60 Bytes 30 ms 33.3 28.5 Kbps 18.4 Kbps 31.5 Kbps
G722_64k(64 Kbps) 80 Bytes 10 ms 4.13 160 Bytes 20 ms 50 82.8 Kbps 67.6Kbps 87.2 Kbps
ilbc_mode_20(15.2Kbps) 38 Bytes 20 ms NA 38 Bytes 20 ms 50 34.0Kbps 18.8 Kbps 38.4Kbps
ilbc_mode_30(13.33Kbps) 50 Bytes 30 ms NA 50 Bytes 30 ms 33.3 25.867 Kbps 15.73Kbps 28.8 Kbps

Explanation of Terms

Codec Bit Rate (Kbps) Based on the codec, this is the number of bits per second that need to be transmitted to deliver a voice call. (codec bit rate = codec sample size / codec sample interval).
Codec Sample Size (Bytes) Based on the codec, this is the number of bytes captured by the Digital Signal Processor (DSP) at each codec sample interval. For example, the G.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval).
Codec Sample Interval (ms) This is the sample interval at which the codec operates. For example, the G.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes (80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate = codec sample size / codec sample interval).
MOS MOS is a system of grading the voice quality of telephone connections. With MOS, a wide range of listeners judge the quality of a voice sample on a scale of one (bad) to five (excellent). The scores are averaged to provide the MOS for the codec.
Voice Payload Size (Bytes) The voice payload size represents the number of bytes (or bits) that are filled into a packet. The voice payload size must be a multiple of the codec sample size. For example, G.729 packets can use 10, 20, 30, 40, 50, or 60 bytes of voice payload size.
Voice Payload Size (ms) The voice payload size can also be represented in terms of the codec samples. For example, a G.729 voice payload size of 20 ms (two 10 ms codec samples) represents a voice payload of 20 bytes [ (20 bytes * 8) / (20 ms) = 8 Kbps ]
PPS PPS represents the number of packets that need to be transmitted every second in order to deliver the codec bit rate. For example, for a G.729 call with voice payload size per packet of 20 bytes (160 bits), 50 packets need to be transmitted every second [50 pps = (8 Kbps) / (160 bits per packet) ]

 

Bandwidth Calculation Formulas

These calculations are used:

  • Total packet size = (L2 header: MP or FRF.12 or Ethernet) + (IP/UDP/RTP header) + (voice payload size)
  • PPS = (codec bit rate) / (voice payload size)
  • Bandwidth = total packet size * PPS