TIPS SMS Messaging with Google Voice

peivoip

Member
Joined
Jun 13, 2008
Messages
117
Reaction score
0
Hi,

I got Ward setup working great.

Is there a way that we can add this to the "Voicemail &Recordings" so that user would need to login there to use the SMS ?
 

bosshog

New Member
Joined
Jul 27, 2011
Messages
1
Reaction score
0
I cant get this script to run via the web browser. It will run via Command Line. I added $output.=$runcommand; and if I copy and past the output into CLI it works fine. This is the output from my CLI

root@pbx:/var/www/html/sms $ /usr/bin/gvoice -e [email protected] -p mypassword send_sms 208XXXXXXX Test Message&
[1] 13798
root@pbx:/var/www/html/sms $ Logging out of voice...
[1]+ Done /usr/bin/gvoice -e [email protected] -p mypassword send_sms 208XXXXXXX Test Message

This is running in the latest stable release so the SMS was already included and accessible via the menu. This is at least now my command in the script
$runcommand = '/usr/bin/gvoice -e ' . $gvoiceuser . ' -p ' . $gvoicepass . ' send_sms ' . $phonenumber . " " . $message .'&';

I also ran dos2unix on the file to make sure it was not dos encoded. I also checked the permissions to make sure httpd could execute /user/bin/gvoice and it can. I have also tried system($runcommand); and $output .= system($runcommand); and nothing, no output or anything. I'm really at a loss here why httpd will not run this script. Or at least execute it so it will send a message.
 

raphou

Member
Joined
Nov 8, 2008
Messages
77
Reaction score
2
Unfortunately it doesn't work with the password generated for the 2-step authentication with google :-(
But that's a problem with Google, not the script.

Thanks!
 

jmurray

New Member
Joined
Jun 10, 2010
Messages
4
Reaction score
0
I see several references to
"/usr/bin/gvoice"

I have not been able to locate this file/script. I have looked at the .tgz file and see that it is not in there. I have updated all of my modules and then upgraded to PIAF purple 2.9.0.2 (core) as well as all other modules.

I have searched the forums unsuccessfully. What module do I need to install so that /usr/bin/gvoice will be installed?

thank you,

John
 

jmurray

New Member
Joined
Jun 10, 2010
Messages
4
Reaction score
0
After further searching, I found the location of gvoice.

I went to

http://code.google.com/p/pygooglevoice/downloads/list

and downloaded
pygooglevoice-0.5.tar.gz
I extracted that into a directory under ~root/pygooglevoice-0.5

I then ran
python setup.py install

With that addition, I was able to send text messages. I am sure that everyone else had already configured calls through google. As I had not ever done that, I did not have the pygooglevoice scripts installed.

Thank you!

John
 

BeerCan

Guru
Joined
Nov 25, 2008
Messages
175
Reaction score
30
Having a problem with this and I am not sure what direction to head. Web interface and cmd line both fail. Here is the output of the cmd line (#,PW and UN redacted). Any ideas?

Code:
root@pbx:/ $ usr/bin/gvoice -e [email protected] -p xxxxxx snd_sms 123456789 testing
Traceback (most recent call last):
  File "usr/bin/gvoice", line 129, in ?
    getattr(voice,action)(*args)
AttributeError: 'Voice' object has no attribute 'snd_sms'
Logging out of voice...
 

localnation

New Member
Joined
Apr 29, 2011
Messages
19
Reaction score
0
Having a problem with this and I am not sure what direction to head. Web interface and cmd line both fail. Here is the output of the cmd line (#,PW and UN redacted). Any ideas?

Code:
root@pbx:/ $ usr/bin/gvoice -e [email protected] -p xxxxxx snd_sms 123456789 testing
Traceback (most recent call last):
  File "usr/bin/gvoice", line 129, in ?
    getattr(voice,action)(*args)
AttributeError: 'Voice' object has no attribute 'snd_sms'
Logging out of voice...

Did you install the script acording to the first post? try reinstalling with the instructions in the first post, and make sure you're editing the index.php file locally on your server, not in windows and uploading.
 

BeerCan

Guru
Joined
Nov 25, 2008
Messages
175
Reaction score
30
Did you install the script acording to the first post? try reinstalling with the instructions in the first post, and make sure you're editing the index.php file locally on your server, not in windows and uploading.

Installed exactly as the first post indicated.
Could you do me a favor? Can you tell me the size of the gvoice file in /usr/bin ?
 

localnation

New Member
Joined
Apr 29, 2011
Messages
19
Reaction score
0
Installed exactly as the first post indicated.
Could you do me a favor? Can you tell me the size of the gvoice file in /usr/bin ?

File size is 4318. The reason I wanted you to make sure you reinstalled and edited the file in vi/nano is because the script (Just redownloaded to verify) has the line 'send_sms', and you're getting the error 'snd_sms' unless there's a bad copy/paste. If you edited the file in windows and copy/pasted or ftp'ed it over, there may have been some transfer/transposition errors.

script line should read:
$runcommand = '/usr/bin/gvoice -e ' . $gvoiceuser . ' -p ' . $gvoicepass . ' send_sms ' . $phonenumber . " " . $message . ' &';
 

BeerCan

Guru
Joined
Nov 25, 2008
Messages
175
Reaction score
30
wow I must have really borked something. I can use google on the voice side. It just seems like the sms does not want to work at all. This is what i get when I run the correct cmd (send_sms) from the command line.

Code:
Traceback (most recent call last):
  File "usr/bin/gvoice", line 125, in ?
    getattr(voice,action)(*args)
  File "/usr/lib/python2.4/site-packages/googlevoice/voice.py", line 140, in send_sms
    self.__validate_special_page('sms', {'phoneNumber': phoneNumber, 'text': text})
  File "/usr/lib/python2.4/site-packages/googlevoice/voice.py", line 210, in __validate_special_page
    load_and_validate(self.__do_special_page(page, data))
  File "/usr/lib/python2.4/site-packages/googlevoice/voice.py", line 223, in __do_special_page
    return self.__do_page(page, data, headers)
  File "/usr/lib/python2.4/site-packages/googlevoice/voice.py", line 203, in __do_page
    return urlopen(Request(getattr(settings, page), data, headers))
  File "/usr/lib/python2.4/urllib2.py", line 130, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
    response = self.parent.error(
  File "/usr/lib/python2.4/urllib2.py", line 402, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error
Logging out of voice...
 

BeerCan

Guru
Joined
Nov 25, 2008
Messages
175
Reaction score
30
OK just for fun I installed incredible pbx2 on a new machine to see if I could get this to work. I get the same exact error on that machine. Could something have changed on the google side? or perhaps I have something wrong in my google voice setup? (on the google end)

EDIT:
OK this is where I owe an apology for asking for help without checking *everything* on my side.
I know I created a did in my google voice account when I set it up, but I went there today and it was gone. I set up a new did in GV and now automajically the sms app is working. All is not for naught however, now we know what error we get when there is no GV did LOL
 

hybj.pbx

New Member
Joined
Apr 23, 2011
Messages
5
Reaction score
0
Login Failed when gvoice send_sms

Anyone sent sms using gvoice today??
I got "Login Failed" error message but I can login gmail or gvoice form web page.
The gvoice incoming and outgoing call is working except the SMS.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Since Google changed the IP address and/or port number, would/could that have broken the "gvoice" command? I noticed my GVSMS application won't send messages now either. :(
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Since Google changed the IP address and/or port number, would/could that have broken the "gvoice" command? I noticed my GVSMS application won't send messages now either. :(


Hi Tried the script in new incredible pbx 2.0 install
and its not working

Tried manually with
usr/bin/gvoice -e [email protected] -p password send_sms 7135686896 Test Message

Login failed. Retry?[Y/n]

Even the password is the correct one in the php file... i am not Using 2-step verification

Any idea ???


Thanks in advance
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Yep - they changed the IP. The gvoice program will probably need to be changed.
 

hybj.pbx

New Member
Joined
Apr 23, 2011
Messages
5
Reaction score
0
solved

I modified the LOGIN in settings.py, it works for me.

LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral&continue=https://www.google.com/voice'

there're 3 settings.py , I modified all of them.
/root/pygooglevoice-0.5/build/lib/googlevoice/settings.py
/root/pygooglevoice-0.5/googlevoice/settings.py
/usr/lib/python2.4/site-packages/googlevoice/settings.py
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
I modified the LOGIN in settings.py, it works for me.

LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral&continue=https://www.google.com/voice'

there're 3 settings.py , I modified all of them.
/root/pygooglevoice-0.5/build/lib/googlevoice/settings.py
/root/pygooglevoice-0.5/googlevoice/settings.py
/usr/lib/python2.4/site-packages/googlevoice/settings.py

:party::party::party::party:
WooHoo! Works for me! :) Now to find out which one actually needs to be changed...my guess is the last one.
Edit: Yep - only the last one (/usr/lib/python2.4/site-packages/googlevoice/settings.py) needs to be changed. Others are from the initial download and install.
Also works on my Ubuntu Server box with my GVSMS on it. Cool!
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
I modified the LOGIN in settings.py, it works for me.

LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral&continue=https://www.google.com/voice'

there're 3 settings.py , I modified all of them.
/root/pygooglevoice-0.5/build/lib/googlevoice/settings.py
/root/pygooglevoice-0.5/googlevoice/settings.py
/usr/lib/python2.4/site-packages/googlevoice/settings.py


Well done working fine again. !!!!!!!!!!!!!!
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
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