Google Voice using Asterisk

You will need a Google voice account to do this. You can get one for free by having a normal Google account, and visiting the Google Voice page.

The top most portion of this page: http://pbxinaflash.com/forum/showthread.php?t=10825 will help you setup the Google Voice portion on the Google side. Once you see the screen shots on that page, you can then use this configuration, or read up if you have their software to continue.

Just my working configuration files for using a google voice number on your asterisk server.

gtalk.conf

[general]
context=googlein
bindaddr=0.0.0.0
externip=xxx.xxx.xxx.xxx
;stunaddr=mystunserver.com
allowguest=yes

[guest]
disallow=all
allow=ulaw
connection=asterisk
context=googlein

jabber.conf

[general]
debug=no
autoprune=no
autoregister=yes
;collection_nodes=yes
;pubsub_autocreate=yes
;auth_policy=accept
;———————————————-
[trunkname]
type=client
serverhost=talk.google.com
;pubsub_node=pubsub.astjab.org
username=[email protected]/Talk
secret=secretpassword
priority=1
port=5222
usetls=yes
usesasl=yes
;buddy=[email protected]
;distribute_events=yes
status=Available
statusmessage=”I am an Asterisk Server”
timeout=100
keepalive=yes

Add following block to extensions_custom.conf

[googlein]
exten => _[0-9a-z].,1,Noop(Incoming Google Voice call for ${EXTEN})
exten => _[0-9a-z].,n,Set(CALLERID(name)=${CUT(CALLERID(name),@,1)})
exten => _[0-9a-z].,n,GotoIf($["${CALLERID(name):0:2}" != "+1"]?notrim)
exten => _[0-9a-z].,n,Set(CALLERID(name)=${CALLERID(name):2})
exten => _[0-9a-z].,n(notrim),Set(CALLERID(number)=${CALLERID(name)})
exten => _[0-9a-z].,n,Wait(1)
exten => _[0-9a-z].,n,Answer
exten => _[0-9a-z].,n,Wait(1)
exten => _[0-9a-z].,n,SendDTMF(1)
exten => _[0-9a-z].,n,Goto(from-trunk,gv-incoming-${CUT(EXTEN,@,1)},1)
exten => h,1,Macro(hangupcall,)

[gvoice-trunkname]
exten => _X.,1,Dial(Gtalk/username/+${EXTEN}@voice.google.com)
exten => _X.,n,Noop(GVoice Call to ${EXTEN} failed)
exten => h,1,Macro(hangupcall,)

Custom Trunk Configuration:
Trunk Name: GVoice-trunkname
Outbound Callerid: “Name”
Custom Dial String: local/$OUTNUM$@gvoice-trunkname

Outbound Route Configuration:
Use the GVoice trunk.

Incoming Routes DID will be:
gv-incoming-username (without @gmail.com)

Comments

Elastix 2.2.0 Stable Release

Elastix 2.2.0 Stable was released. I didn’t think much of it until I saw the new interface.

Along with a new interface, included are:

Kernel
Linux(x86_64)-2.6.18-238.12.1.el5

Elastix
elastix-2.2.0-14
elastix-firstboot-2.2.0-5
elastix-pbx-2.2.0-14
elastix-email_admin-2.2.0-9
elastix-reports-2.2.0-6
elastix-asterisk-sounds-1.2.3-1
elastix-system-2.2.0-14
elastix-my_extension-2.2.0-5
elastix-a2billing-1.8.1-16
elastix-addons-2.2.0-4
elastix-extras-2.0.4-4
elastix-agenda-2.2.0-5
elastix-vtigercrm-5.1.0-8
elastix-im-2.0.4-2
elastix-security-2.2.0-7
elastix-fax-2.2.0-4

RounCubeMail
RoundCubeMail-0.3.1-10

Mail
postfix-2.3.3-2.3.el5_6
cyrus-imapd-2.3.7-7.el5_6.4

IM
openfire-3.5.1-3

FreePBX
freePBX-2.8.1-7

Asterisk
asterisk-1.8.7.0-0
asterisk-perl-0.10-2
asterisk-addons-1.8.7.0-0

FAX
hylafax-4.3.10-2rhel5
iaxmodem-1.2.0-1.1

DRIVERS
dahdi-2.4.1.2-5
rhino-0.99.4-2.rc1
wanpipe-util-3.5.23-1

1 Comment

Avaya (Nortel) 1120E IP Phone with Asterisk

I got a hold of some Nortel IP phones at work and was doing some reaserch on how to connect them to an Asterisk server. At first I was using them with the UNIStim protocol support in Asterisk, but instead found out that you can download SIP firmware versions for most Nortel and Avaya phones directly from Avaya since they purchased Nortel.

You can get the SIP 4.x firmware here, or browse the other firmwares as well. You do not need a username and password to download them.

This site can help as well, to get you updated to a SIP firmware from UNIStim firmware and how to configure your TFTP settings.

I needed some more configuration settings in my TFTP DeviceConfig file so this is what I ended up using.

DNS_DOMAIN archaicbinary.home
SIP_DOMAIN1 archaicbinary.home
SERVER_IP1_1 192.168.XXX.XXX
SERVER_PORT1_1 5060
SERVER_RETRIES1 3
DEF_USER1 6001
ENABLE_SERVICE_PACKAGE YES
ENABLE_3WAY_CALL YES
TRANSFER_TYPE STANDARD
REDIRECT_TYPE RFC3261
FORCE_BANNER YES
BANNER Zharvek
UPDATE_USERS NO
ENABLE_UPDATE YES
ENABLE_PRACK YES
RTP_MIN_PORT 50000
RTP_MAX_PORT 50100
SIP_PING YES
AUTOLOGIN_ENABLE YES
DEF_LANG English
VMAIL *98
VMAIL_DELAY 300
EXP_MODULE_ENABLE YES
ENABLE_BT YES
DST_ENABLED YES
TIMEZONE_OFFSET -18000
# (GMT-10:00) Hawaii -36000
# (GMT-09:00) Alaska -32400
# (GMT-08:00) Pacific time (US and Canada) -28800
# (GMT-07:00) Mountain time (US and Canada) -25200
# (GMT-06:00) Central time (US and Canada) -21600
# (GMT-05:00) Eastern time (US and Canada) -18000
# (GMT-04:00) Atlantic time (US and Canada) -14400
# (GMT-03:00) Brasilia, Buenos Aires -10800
# (GMT+00:00) Greenwich, Dublin, London 0
# (GMT+01:00) Amsterdam, Madrid, Paris 3600
# (GMT+02:00) Athens, Istanbul 7200
# (GMT+03:00) Moscow, St. Petersburg 10800
# (GMT+05:30) Bombay, Calcutta, Madras 18000
# (GMT+08:00) Beijing, Chongqing, Hong Kong 28800
# (GMT+09:00) Osaka, Sapporo, Tokyo, Seoul 32400
# (GMT+10:00) Canberra, Melbourne, Sydney 36000
# (GMT+12:00) Auckland, Wellington 43200
SNTP_ENABLE YES
SNTP_SERVER pool.ntp.org
AUTO_UPDATE YES
AUTO_UPDATE_TIME 3600
# 48600 = 1:30pm
# 3600 = 1:00am
# 28800 = 8:00am 29700
# 54900 = 3:15pm
AUTO_UPDATE_RANGE 1
MAX_INBOX_ENTRIES 50
MAX_OUTBOX_ENTRIES 50
MAX_REJECTREASONS 5
MAX_CALLSUBJECT 5
IM_NOTIFY NO
IM_MODE DISABLED
DEF_DISPLAY_IM NO
MAX_IM_ENTRIES 20
MAX_ADDR_BOOK_ENTRIES 100
ADDR_BOOK_MODE BOTH
RECOVERY_LEVEL 0
ADMIN_PASSWORD 123456789
DISABLE_PRIVACY_UI YES
LOGOUT_WITHOUT_PASSWORD NO
NAT_SIGNALING NONE
NAT_MEDIA NONE
HOLD_TYPE RFC2543

Comments

Linksys PAP2 Phone Adapter

I found some information on this topic by searching around the internet, I have tried this information and it works great for me. Please note that I have not created any of this content, I am just mirroring it.

First things first –

Download: SP2KPAP2.zip
Download: PAP2SP2K.zip

DO NOT CONNECT THE PAP2 TO ANY NETWORK WITH INTERNET ACCESS until directed. The unit will attempt to connect to a Vonage TFTP server on power-up and update firmware without your intervention. If this happens the unit could become a brick. Keep the unit isolated until these parameters are changed and you are directed to connect the unit to the net and/or public internet.

New Unit -
A new “out of the box” pap2 will not have ANY network parameters setup (IP Address, IP mask, gateway, etc). First, configure the pap2 via a touch-tone phone with minimal IP information that will permit later access via your web browser.

Review Chapter 4 of the Linksys pap2 Installation and Troubleshooting Guide.

Connect a standard touch-tone phone to port #1 and make the following changes:
a) Disable DHCP – ‘****’, ‘101#’, ‘0#’, ‘1’ hang-up
b) Set Static IP Address – ‘****’, ‘111#’, ‘192*168*2*10#’, ‘1’ hang-up
c) Set Network Mask – ‘****’, ‘121#’, ‘255*255*255*0#’, ‘1’ hang-up
d) Set Gateway Address – ‘****’, ‘131#’, ‘192*168*2*20#’, ‘1’ hang-up

The following steps have set the pap2 IP address to 192.168.2.10, mask 255.255.255.0 & gateway of 192.168.2.20. This document will utilize these addresses later. If your network uses different address/mask/gateway adjust accordingly.

Reboot the pap2 and use the phone to confirm the changes were saved. You can also check around to determine current firmware version, MAC address, etc. You don’t need them for later steps, but feel free to check them out. NOTE: you will be unable to enter the ADMIN account at this time (unit is locked).

Change your DNS addresses –
Modify the DNS (Primary & Secondary) to match your ISP’s DNS values. It may be necessary to change these at a later date to ones associated with the VoIP provider.

Isolate your network from internet –
For this next sequence disconnect your LAN from access to the public internet. Also, DO NOT ATTEMPT to update firmware via a wireless connection – bad results. Hardwired connects only!

Install tftp server utility –
Included on the CD-ROM is a free tftp server utility – tftp-desktop-free ver 2.5. Suggest you use this utility because you can monitor the firmware download/update process. This can be downloaded from www.download.com, search for tftp. While this utility is free, it’s possible it can only be used for 30 days. You may need to get a “fresh” download.

NOTE: The tftp utility installs nicely under WinXP and creates a directory in /Program Files/TFTP Desktop . You will need to know this in order to copy the firmware images to that area and rename the files.
ALSO: The utility does NOT start/run automatically when your system is booted. It is necessary to click on the ICON to start the utility.

Uncompress/Copy Firmware Image Files –
Two Firmware image files need to be unzipped, renamed and placed in the tftp default directory, which is /Program Files/TFTP Desktop. Uncompress the following files:
pap2SP2K.zip and SP2Kpap2.zip. After the files are uncompress into the tftp default directory it is CRITICAL to RENAME the file to correct a naming error. The files must be renamed to add a ‘-‘ as follows: pap2SP2K.bin to pap2-SP2K.bin and SP2Kpap2.bin to SP2K-pap2.bin

Next, if your PC/Laptop does not have a static IP address you should assign one at this time. While not absolutely necessary to have a static IP address, your IP address must be known (and does not change) in order for the pap2 to find the tftp server and thus the firmware to be downloaded. For purposes of this example the tftp server PC has an IP address of 192.168.2.110, mask 255.255.255.0

Connect the pap2 ethernet port to your isolated network. Remember, you don’t want the pap2 to get to the internet – not yet!

Next, ping the pap2 device to make sure your network connection is working.
PING 192.168.2.10

START OF FIRMWARE UPDATE -

Open a browser and enter the IP address of the pap2:
»192.168.2.10

You should have opened a Linksys pap2 configuration page on the INFO tab. Select the SYSTEM tab. Enter an USER password of 1234 and at the bottom of the page select SAVE SETTINGS.

Now refresh your link and you should be prompted with a login screen.
Enter a User Name of USER , password = 1234
Keep this browser page open, but shift it down to the lower right section of your display.

Next, start the tftp server utility and position the window in the upper left section of your screen. This is to permit monitoring the firmware download process.

Next, return to the open browser page and position the open window such that you can continue to monitor the tftp desktop window – keep at least 1/3 of that window visable.

Update the browser address line and enter the following: »192.168.2.10/upgrade?tftp://192.···SP2K.bin
Monitor the tftp window and you should see a progress bar indicate the download status.
At this time the Power LED should turn RED.
Wait at least 1 or 2 minutes after the status shows complete – do not interrupt it.

Once RED, update the browser address to your pap2. (our IP in this example is 192.168.2.10) login using user account USER , password = 1234

At this point you should now see a Sipura Phone Adapter Configuration screen.

Click the “admin login” link near the top-right.
Click the “advanced” link near the top-right.
Click the PROVISIONING tab and set PROVISION ENABLE=NO.
Click SUBMIT ALL CHANGES.

At this point you might get an “unable to display” page on your open browser page – don’t worry about it – leave it as is.

Next, update the browser address line and enter the following: »192.168.2.10/upgrade?tftp://192.168.2.110/ SP2K-pap2.bin [ver 3.1.3]
Alternate version
»192.168.2.10/upgrade?tftp://192.168.2.110/ pap2-BIN-03-01-06-ls.bin [ver 3.1.6]
* * * * *
Again, monitor the tftp window and you should see a progress bar indicate the download status. Wait at least 1 or 2 minutes after the status shows complete – do not interrupt it.

The Cisco/Linksys pap2 will eventually reboot (2 solid blue LEDs) (BE PATIENT)

DONE – The firmware update/unlock is now complete.

When you login to the pap2 unit you will again have a Linksys pap2 configuration screen and you should be able to access the ADMIN LOGIN link without a password.

The unit is now unlocked and can be configured for various VoIP services. You can now safely connect the pap2 unit to a network exposed to the internet. HOWEVER – never attempt to do a FACTORY RESET – or your unit may be locked again to Vonage and might not be unlockable a second time. Still working on it.

Comments

Setting up Asterisk with TelaSIP

So you have your Asterisk / Asterisk@Home server setup and running, and now you wish to receive calls from the outside world (PSTN or Public Service Telephone Network).

I will try to make this page as easy to use as possible, walking through each of the steps. My setup includes Asterisk@Home 2.8 with freePBX web interface version 2.0.1, and Asterisk version 1.2.7.1.

First you need to signup with TelaSIP. I recommend the Plus or Premium Plans.

In the web interface click on FreePBX Administration.

Enter the username and password, the username is maint, and you should already know your password here. On the next page, click on Setup at the top.

Then on the left, click on Trunks.

In the content pane, click on SIP because we want to add a SIP trunk.

Now we have to fill out some information, this information works for me, and hopefully, will work for you too. Please note that the information in italics needs to be replaced with the information you got from TelaSIP. Information in bold and italics is your choice.

Outbound Caller ID: “yourname” your phone number
Maximum Channels: 2
Dial Rules: 1|NXXNXXXXXX
Trunk Name: telasip-gw

PEER Details:

allow=g726
context=from-pstn
disallow=all
host=gw4.telasip.com
insecure=very
qualify=yes
secret=password
type=peer
username=username

Incoming Settings: All Blank

Registration String: username:[email protected]

Once you are done, click on Submit Changes at the bottom of the page. Once you are done, click on Outbound Routes on the left.

Fill out the following information,

Route Name: Outgoing
Emergency Dialing: Checked

Dial Patterns

911
1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX

Trunk Sequence: SIP/telasip-gw for the first.

Then click on Submit Changes. You can now make calls on your Asterisk server, lets continue so you can receive calls.

On your left click, Inbound Routes.

Then fill out some information:

DID Number: your phone number from telasip
Destination: Wherever you want your call placed, from TelaSIP.

Click on Submit, and at the top of the page, click the red bar to reload Asterisk with your new settings. You may need to wait a few hours if you just created your TelaSIP account, so the phone number becomes active.

Comments