google

Google Voice, Asterisk, Motif Channel Driver

I had some free time after a business trip to test out the motif channel driver which although not a new concept is supposed to work much better with the Google Voice/Talk Jabber/XMPP protocols.

My previous setup involved something of the following:

Main Number @ Google Voice -> Calls DID @ FlowRoute <- SIP CSIPSimple on Android Registers to FlowRoute
Voicemail & SMS hit Google Voice.
Voice calls hit Google Voice and redirect to FlowRoute.

This worked quite well, except two things.

First, people would call my Google Voice number and hear two to three rings before it even started ringing my FlowRoute number. This would throw off the number of rings my phone would receive before transferring the caller to the Google Voicemail.

Second, using Google Voice this way caused about a two to three second delay (time to transfer my voice to the other end so the conversation was always lagging behind and not flowing nicely) and sometimes had a slight, maybe 200ms, jitter (speeding up and slowing down of packets making the voice choppy and other anomalies).

I setup another VPS at my provider and installed the AsteriskNOW distribution. I previously tested AsteriskNOW, Elastix, and the FreePBX Distro on my ESXi setup to find the one I wanted. The Elastix distro I downloaded did not have Asterisk 11 so I could not use the motif channel driver (which was the point of this project), FreePBX Distro worked nicely but had lots of things I would never use installed using more memory. I ended up going with AsteriskNOW because it does not have all the extras installed, enabled and running from the start, and used less memory.

freepbx

I first opened Asterisk Advanced settings and changed the extension/user mode from `device` to `extensionanduser` so to add some extra little security.

Motif was enabled by default on AsteriskNOW so I just did the setup, verified the trunk, checked the outgoing route, created an incoming route, created an extension (device) and then created a user that was bound to that device, and registered CSIPSimple on my Android to the server. Test call went through instantly.

I then logged into the server using SSH and created a new user, gave them sudo privileges, changed SSH to listen on non-standard port, locked out root from logging in via SSH, and then setup Fail2Ban.

I also setup iptables on the server to only allow web admin from my home location (which I can VPN into if necessary), block all ports except the very few Asterisk needs to run.

By |May 29th, 2013|0 Comments

Google Voice forward to Asterisk PBX

I recently started at a new place of employment and wanted to port my cell number over from Sprint which my old employer used. This was okay with them so I ended up porting the number to my Google Voice account. I wanted to forward it to a new DID that I would get with a SIP provider and run my Asterisk PBX from that.

I then got a new phone from the employer and installed a Android SIP client on it. Registered the extension to my Asterisk server and started some testing.

Well sometimes the calls work fine, and sometimes Google Voice ends up just sending the call to the Google Voicemail. I wanted to fix this problem, and I believe I have found the solution if your trying the same thing.

On your incoming route in Asterisk for your Google Voice number, you need to setup a wait period. In the incoming route screen of FreePBX there is a field that allows you to wait before picking up the call. I changed this from an empty default field to 2 seconds.

I then checked the box above it to enable Signal RINGING.

It took me a while to figure this out, but I now have my incoming Google Voice number coming to my Asterisk server, hitting the incoming route, then an IVR, then to various extensions and ring groups.

By |April 2nd, 2013|6 Comments

Sexy and Useful Android Tablet Apps

Was playing with the tablet and decided to take some screen shots of the best looking, and most useful (to me) apps.

The best looking VLC remote control application for Android. This allows you to control a computer running VLC with it’s http interface enabled. Available on the Market, by Peter Baldwin.

The google music app allows you to store 20,000 songs on the google servers and stream them anytime, as much as you want for free.Available on the Market, by Google.

Although the Android app Plex is not free, the server component is, and is available for Linux, Windows and Mac. Plex allows you to host your own ‘Netflix’ type service from your own media files on your network.

PocketCloud by Wyse Technology, gives you access to Windows RDP Servers, VNC Servers and VMWare View servers from your tablet. Great for admins. Non-Pro is free but limits amount of saved connections.

The Droid MPD Client HD allows you to control your MPD (music player daemon) over the network. I just wish the author would fix the huge white annoying background for your songs list to something that resembles the VLC app above. When that happens, I will gladly purchase the pro version.

By |February 4th, 2012|0 Comments

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=username@gmail.com/Talk
secret=secretpassword
priority=1
port=5222
usetls=yes
usesasl=yes
;buddy=mogorman@astjab.org
;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)

By |December 5th, 2011|0 Comments