Paul Maunders | Web log
Economics, Business, Telecoms, Tech and Gadgets

Asterisk - Outgoing calls rejected because extension not found

May 2nd, 2008 by Paul Maunders

I had been having problems making external calls from my asterisk box. When I initially set it up, I used the asterisk-gui to setup a service provider for outgoing calls. This automatically appended the following context to extensions.conf

[numberplan-custom-1]
plancomment = Default DialPlan
include = default
include = parkedcalls
exten = _0XXXXX!,1,Macro(trunkdial,${trunk_1}/${EXTEN:0},${trunk_1_cid})
comment = _0XXXXX!,1,test,standard

However, since the default context for users is default, and the [default] context did not include this custom context, the calls weren’t being routed. This was giving the following error:

Call from '6000' to extension '08448160000' rejected because extension not found.

The simple way to fix it was to include the custom [numberplan-custom-1] context within the default context:

[default]
;
; By default we include the demo.  In a production system, you
; probably don’t want to have the demo there.
;
include => demo
include => numberplan-custom-1
exten => 1571,1,VoiceMailMain

Posted in asterisk | No Comments »

Asterisk - Rejected incoming IAX connection

May 2nd, 2008 by Paul Maunders

I was having trouble getting an inbound IAX connection to connect successfully to test my asterisk box. The asterisk console was showing the following error:

 Rejected connect attempt from 213.166.5.129, who was trying to reach '448448160404@'

After some hacking around it turns out that the username in the IAX address must match the [header] name in iax.conf, even though you specify the username separately.

E.g. if your iax address is something like IAX2/xxxx:password@domain.com then your iax.conf defintion will need to be:

[xxxx]
type=user
context=inboundmagrathea
username=xxxx
secret=password

I also added the inboundmagrathea context to extensions.conf

[inboundmagrathea]
exten => 448448160404,1,Dial(SIP/6000)
exten => 448448160404,2,Hangup

Posted in asterisk | No Comments »

Learning Asterisk

May 2nd, 2008 by Paul Maunders

In preparation for the launch of a new Fubra VOIP service later this year, I decided that it would be wise if I knew a little more about asterisk (our chosen PBX software). Although I’m not building the underlying phone system (we have an asterisk expert working on that), nor the user control panel (our in-house developers will be doing that), I think it’s always helpful as a director of a technology company to have a fairly in-depth knowledge of your systems.

So over the next few weeks I will be installing an asterisk PBX at my house, and setting it up to make and receive calls via VOIP to the PSTN and beyond.

We’ve been using asterisk in our office to power our phone system since 2005, and so I’ve gotten pretty good at configuring Snom phones and other sip devices, but this is the first time I will have actually tried to setup an asterisk box from scratch.

Posted in asterisk | No Comments »

Setting up asterisk-gui on Ubuntu

May 1st, 2008 by Paul Maunders

Tonight I had a go at installing Digium’s asterisk-gui. I followed some instructions from Asterisk Guru, but then had to apply a fix at the end because the static-http folder was in the wrong place.

Installation Instructions

Download the asterisk-gui source code from SVN:

mkdir -p ~/downloads/asterisk-gui
cd ~/downloads/asterisk-gui
svn checkout http://svn.digium.com/svn/asterisk-gui/trunk .

Compile the source code:

./configure
./make
./make install

Backup your asterisk config:

cp -r /etc/asterisk /etc/asterisk.backup

Install the sample settings if you wish (this adds things like a list of VOIP providers to use as a PSTN gateway).

./make samples

Edit /etc/asterisk/manager.conf to enable the web management interface and to add a user:

enabled = yes
webenabled = yes
[administrator]
secret = YoUrPaSwOrD
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Edit /etc/asterisk/http.conf to enable asterisk’s mini webserver. If you are accessing from your local machine use 127.0.0.1 otherwise you might want to bind to a public ip, but be aware this is less secure.

enabled=yes
enablestatic=yes
bindaddr=127.0.0.1

Run make checkconfig to verify your configuration settings:

./make checkconfig

I then had to do an additional step to link the static http scripts folder to inside /usr/share/asterisk as it seems asterisk was looking in here instead of /var/lib/asterisk/

sudo ln -s /var/lib/asterisk/static-http/ /usr/share/asterisk/

After that you should be able to login to the control panel at http://127.0.0.1:8088/asterisk/static/config/cfgbasic.html (replacing the IP address with whichever one you chose).

Posted in asterisk, linux, ubuntu | No Comments »

Missing asterisk config files in Ubuntu / Debian

May 1st, 2008 by Paul Maunders

If you install Asterisk on Ubuntu via apt-get, and then remove it and re-install again, you may find that you are missing the all the config files in /etc/asterisk.

This is a bug in the debian asterisk package that means that the config files are deleted when you remove the asterisk package even though they are part of the asterisk-config package.

To fix it simply run the following commands: (NB: This will nuke any asterisk installation you have)

sudo dpkg --purge asterisk
sudo dpkg --purge asterisk-config
sudo apt-get install asterisk-config
sudo apt-get install asterisk

Posted in asterisk, linux, ubuntu | No Comments »

Mobile Broadband Market Roundup - May 2008

May 1st, 2008 by Paul Maunders

It’s been 8 months since I posted my last summary of the mobile broadband market in the UK, and things have developed fairly rapidly since then. In November, O2 launched the iPhone with unlimited Internet access along with some competitive USB dongle packages. Orange have also now joined in the fun, which means that all 5 major UK networks have a reasonably priced mobile broadband offering, compared to only 3 of networks in September 2007.

The time I’m going to separate the tariffs into 2 sections. The first shows the prices when added to a standard voice tariff. The second shows the prices for a standalone mobile broadband account (e.g. through a data card or USB modem).

NB: For this study, I’m only interested in the cheapest “unlimited” packages offered by each provider, as there are too many tariffs if I list every one.

Mobile broadband + phone packages

Network Tarrif Speed Inclusive Data Price
O2 iPhone contract + data pack 200-300 kbps? Unlimited Free with contract
T-mobile Web’n’Walk Plus with Phone contract 1.8 mbps 3 GB / month Normal contact + £7.50/12.50 per month (phone only/phone+laptop)
Three X-Series up to 2.8 mbps 1 GB / month Normal contact + £5.00 per month
Vodafone Phone contract + data pack 7.2 mbps? 500 MB/month Free with contract

With the Vodafone and 02 iPhone tariffs above, I’m unsure whether these can be used as a modem for a laptop or computer. It is certainly technically possible to use an iPhone as a modem. If anyone knows any more on this please add a comment to this post.

Mobile broadband only packages

Network Tarrif Speed Inclusive Data Price (Device + Monthly)
O2 USB Modem - Mobile Broadband (18 months) 1.8 mbps 3GB / month Free + £20 per month (O2 customers only)
Orange USB Modem - Mobile Broadband (18 months) 1.8 mbps 3GB / month Free + £15 per month
T-mobile Web’n’Walk Plus USB Modem / Data card (24 months) 1.8 mbps 3 GB / month Free + £15 per month
Three USB Modem - Broadband Lite (18 months) 2.8 mbps 1GB / month Free + £10 per month (or £5 per month for existing customers)
Vodafone USB Modem - Mobile Broadband (24 months) 7.2 mbps 3GB / month Free + £15 per month

Summary

As you can see, £15 a month for 3GB transfer seems to be the most common price point, but you can get it as low as £5 a month from Three if you have an existing mobile contract with them. If you don’t need (or have) a phone line or Sky TV, then at these prices mobile broadband is probably now the cheapest way to get online.

Posted in mobiles | 1 Comment »

Installing phpMyAdmin Advanced Features on Ubuntu

April 30th, 2008 by Paul Maunders

phpMyAdmin

To install the advanced features of phpMyAdmin you have to create a special control database that PMA uses to store bookmarks and relationships etc… PMA comes with a script called create_tables.sql that contains the relevant sql statements to set these tables up. Normally, when you install phpMyAdmin directly from source, this create_tables.sql script can be found in the scripts sub-folder.

Today I was feeling lazy so I decided to use apt-get to install PMA on my Ubuntu machine. However, when I went to enable advanced features, the scripts sub folder was pretty much empty (except for a setup.php script). It seems that with the debian package the advanced feature scripts have been moved to /usr/share/doc/phpmyadmin/examples - It took me ages to work this out, so hopefully this post might save someone some time!

Instructions
Firstly, unzip and run the create_tables.sql file:

cd /usr/share/doc/phpmyadmin/examples
sudo gunzip create_tables_mysql_4_1_2+.sql.gz
mysql -u root -p < create_tables_mysql_4_1_2+.sql

Then setup a user/password for phpMyAdmin to use:

mysql -u root -p -e 'GRANT SELECT, INSERT, DELETE, UPDATE ON `phpmyadmin`.* TO 'pma'@'localhost' IDENTIFIED BY "password"'

Then edit the config file, and uncomment the advanced features options for your chosen server, and add the user / password you setup in the previous step. If you haven’t edited this file before you may need to also uncomment the rest of the server definition.

sudo vim /etc/phpmyadmin/config.inc.php

Posted in linux, ubuntu | No Comments »

Army use Xbox-like controller to fly Desert Hawk 3 UAV

April 29th, 2008 by Paul Maunders

In November last year, I saw an advert in which the British Army appeared to use an Xbox controller to fly a miniature UAV. A few people commented on my blog on whether they thought this was real or not, so I decided to find out for certain by sending a Freedom of Information Act request to the Army.

Today I received a reply from the Army Recruiting and Training Division. You can see my original post for the full response, but in summary it confirmed the following points:

  • The UAV shown in the advert is a Desert Hawk 3, which is currently deployed in Iraq
  • The plane uses an XBOX-like controller, but it is not exactly the same. Specifically, it does not have any Microsoft branding nor a wired headset port.
  • The advert was specifically designed to show people that (gaming?) skills developed prior to joining the Army can come in useful during current operations.

I’m actually pretty satisfied with their response. To be honest, after receiving a somewhat negative answer from the press office when I first enquired I was expecting more of a fight before they gave anything away.

Desert Hawk 3 Facts

Length: 36 in./91 cm.
Wingspan: 54 in./137 cm.
Wing area: 504 sq. in./1283 cm.
Empty weight: 6.5 lbs./3 kg.
Payload growth: Up to 2.0 lbs./ 1 kg. or 288 cu. in./ 732 cu. m.
Endurance: 90+ min.
Portability: Backpack or small suitcase
Operational range: Up to 15 km./9.3 mi. depending onfrequency and configuration

Posted in current affairs, gadgets | No Comments »

Fixing the backspace key with OS X and Linux Screen

April 28th, 2008 by Paul Maunders

Here’s the problem: You ssh in to a linux system from your Macbook’s terminal and join a shared “screen” session. Instantly your backspace key stops working as a backspace key and becomes a forward delete key, resulting in those annoying “Wuff Wuff” messages at the bottom of your terminal.

Well I found a solution to this tonight. Simple do the following:

  1. Go to Terminal > Preferences > Settings> Advanced
  2. Tick Delete sends CTRL - H

Et voila. It should be fixed.

Posted in apple | No Comments »

Changing the Sent Items folder in OS X Mail

April 28th, 2008 by Paul Maunders

We have a linux IMAP server that uses “Sent” as the default name for it’s Sent Items folder. However, at least in my case, the OS X Mail app seemed to expect the folder to be called “Sent Items”.

To set the Sent folder to be pointed at the correct Sent Items folder, you must select that folder from the account tree, and then select Mailbox > Use This Mailbox For > Sent.

It took me a while to work this out, so I have posted here for future reference.

Posted in apple | No Comments »

« Previous Entries