Asterisk on xen

From PrgmrWiki
Revision as of 02:07, 3 December 2009 by Andrew (talk | contribs) (Nufone is now a parking page for godaddy..)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

so, I don't like giving out my cellphone number, as like most Americans, I have a locked-down (carrier subsidized) cellphone that gives me little control over who can and can not ring my phone. Also, my cellphone plan is a data-only plan (I pay $30/month for unlimited data and txt, but I have no included minutes. if I use the so-called voice features of my sidekick, it costs $0.30 per minute, so I'd prefer to use SIP.)

So, a few years back I signed up with a provider that will rent you IAX trunks for cheap... (now defunct). I've got an 866 (US toll-free) number, and I had it setup with my previous astrisk setup, something that was not important enough to move last time I moved.

So, I'm setting it up now. I created a 128M Debian image for myself: apt-get install asterisk edit /etc/defaults/asterisk and set RUNASTERISK=yes First, I want to make it so that I can dial into the asterisk system. I've got Ekiga installed on my box (a CentOS 5.2 box; this must have been part of the default install, I don't remember installing it) but first I need to make a sip account on the asterisk server. edit /etc/asterisk/sip.conf - first, change scroll down to

Definitions of locally connected SIP phones

and add

callerid=Luke Crawford <8664385853>
nat=yes ; because my home box is behind a nat
qualify=yes; to keep the nat session open

(the bit in brackets is the username)

I start it up, I hit edit-> accounts account name: luke-home protocol: sip registrar: user: ***** password: *****

at this point, I start up asterisk, and

tail -f /var/log/asterisk/messages

next I conect from my local sip client, I see:

Jul 6 11:43:34 NOTICE[2806] pbx.c: Cannot find extension context 'from-sip'

in the logfile. So, now I go back to my control panel.

from my control panel, I click 'new device' -> asterisk using iax

from there I created a username/password and 'unique name' (I use the dns name for the host) everything else can be left default.

The next screen gives me:

Add the following to your iax.conf:


and the following to extensions.conf:

exten => _1NXXNXXXXXX,1,Dial,IAX2/*******@NuFone/${EXTEN} the appropriate context as defined by your 
source channel (Zap, SIP, etc)

There is no need to register for outbound calls.

Make sure you set a valid, 10-digit US48 CallerID value.
Unset or Invalid CallerID values can cause call failures.

Note:  This tutorial only details outbound calling.  If you have
a telephone number from us, you will find the inbound calling
tutorial under the Number detail section of the Members

ok, so I append:


to iax.conf,

and now I edit extensions.conf, appending:

exten => _1NXXNXXXXXX,1,Dial,IAX2/*******@NuFone/${EXTEN} 

I can now make outgoing calls

In the morning, incoming calls.