SOLVED SMSBlast and gvoice CLI Dead: Here's (yet another) Fix

Richard Beyer

New Member
Joined
Nov 11, 2015
Messages
2
Reaction score
1
I'm successfully using my google voice account as a trunk for IncrediblePBX. I decided to give the smsblast script a try and it failed. Using the gvoice app directly and entering my Google credentials at the prompts results in:

Traceback (most recent call last):
File "/usr/local/sbin/gvoice", line 79, in <module>
login()
File "/usr/local/sbin/gvoice", line 49, in login
voice.login(options.email,options.passwd)
File "/usr/local/lib/python2.7/dist-packages/googlevoice/voice.py", line 71, in login
galx = re.search(r"name=\"GALX\" type=\"hidden\"\n *value=\"(.+)\"", content).gro

I know that Google now requires oAuth2 logins and this apparently doesn't provide for that but I thought they might be using the credentials in some other way to gain access. Apparently not.

Is this app now a "dead horse" that I should dismount? Any future plans to somehow resurrect this great app?
 

Richard Beyer

New Member
Joined
Nov 11, 2015
Messages
2
Reaction score
1
After some debugging, it appears that Google has modified the order of the form field parameters, so the regex lines need to be changed. To fix it, open the file "/usr/local/lib/python2.7/dist-packages/googlevoice/voice.py" in your favorite text editor and change the lines starting at or around line 73 to:

Code:
    galx = re.search(r"type=\"hidden\" name=\"GALX\" value=\"(.+)\"", content).group(1)
    service = re.search(r"type=\"hidden\" name=\"service\" value=\"(.+)\"", content).group(1)
    utf8 = re.search(r"type=\"hidden\" id=\"_utf8\" name=\"_utf8\" value=\"(.+)\"", content).group(1)
    bgresponse = re.search(r"type=\"hidden\" name=\"bgresponse\" id=\"bgresponse\" value=\"(.+)\"", content).group(1)

Remember to keep the line indentation EXACTLY as it is---python code is position sensitive!
 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Worked like a champ. Thanks, @Richard Beyer. We'll push it out ASAP.

For Incredible PBX users, the file to edit is /usr/lib/python2.6/site-packages/googlevoice/voice.py AND each line needs to begin with a TAB.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
Here's the Incredible PBX patch. Log into your server as root and issue the following commands:
Code:
cd /
wget http://incrediblepbx.com/gvoice-patch.tar.gz
tar zxvf gvoice-patch.tar.gz
rm -f gvoice-patch.tar.gz

If this patch doesn't work, try the one two doors down.
 
Last edited:

Thomas Lageotakes

New Member
Joined
Aug 30, 2015
Messages
17
Reaction score
1
I tried the update and I still get the following error. I made sure the updated file was there as I saw the holy hackjob comment.

Traceback (most recent call last):
File "/usr/local/sbin/gvoice", line 79, in <module>
login()
File "/usr/local/sbin/gvoice", line 49, in login
voice.login(options.email,options.passwd)
File "/usr/local/lib/python2.7/dist-packages/googlevoice/voice.py", line 71, in login
galx = re.search(r"name=\"GALX\" type=\"hidden\"\n *value=\"(.+)\"", content).group(1)
AttributeError: 'NoneType' object has no attribute 'group'


While I tried both, should I use my gmail password or the token I created that I use with my google sip?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
@Thomas Lageotakes Try this using your plain text Gmail password:
Code:
cd /root
rm -rf pygooglevoice
yum -y install python-setuptools python-simplejson
easy_install -U setuptools
easy_install simplejson
yum -y install mercurial gcc-c++ python-devel unzip python-pip python-pbr python-virtualenv
git clone https://github.com/wardmundy/pygooglevoice
cd pygooglevoice
python setup.py install
cp /root/pygooglevoice/bin/gvoice /usr/bin/.
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,849
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top