Ward's article on Send SMS Messages w/o Google got me to thinking that in the past we had a way to make Google Voice calls before Asterisk offered any kind of Google Voice support. It took a few more seconds for the call to go through, but it worked. The basic idea was that you would send a command to Google Voice using an API, then Google Voice would first call you, and then when you answered it would call the other party. In order for this to work you had to have a number that came in through some other means than Google Voice. Back then there were several ways to get a free DID, but I don't know how many of those are still available. When the callback came, it would be bridged to the original caller.
I was reading a thread on the Obihai forum where a user (giqcass) said this: "Actually Callcentric doesn't have to cost any money. I'm using it now and paying nothing. When you sign up for Callcentric use your real address but say you don't plan to use Callcentric in the US. Then you won't be forced to buy E911 and you won't be charged anything." So that might be one option to get an inbound number from someone other than Google Voice. I am neither encouraging nor discouraging that, since I have no experience with Callcentric. Even if you decide to pay for a DID, they are cheaper now than they used to be, but that's a discussion for another thread.
But to get to the point, I was searching through some notes from way back when and some Google-fu brought me to this:
How it used to be done: How to use Google Voice for free outgoing calls on an Asterisk/FreePBX system (the no-XMPP way)
Although that's very close to what I used to use, the only thing I don't like about that method now is that it uses PyGoogleVoice, which for some reason I've always had problems with. I prefer the Google-Voice-PHP-API by aaronpk. The only thing you need to do if you are going to use that is first install php-xml - you can do yum install php-xml or whatever would be the correct way of installing it on a system running another OS. Then you can copy the GoogleVoice.php script to a directory and run it from there.
I ran a quick test to see if that API could be used the way the old PyGoogleVoice script was used, by creating a quick PHP script in the same directory as GoogleVoice.php:
Replace 8005551212 with the number you want to call, 9999999999 with the DID you are using as a Google Voice destination, and 'mobile' with the type of number you registered that number as with Google Voice - the options are 'mobile', 'work', or 'home'. This did cause Google Voice to initiate a call to the '9999999999' number (obviously not the actual number) and then when I answered it extended the call to the '8005551212' number. So this is a method that could work if you can't get PyGoogleVoice to install or have issues using it. Now that I think about it, PyGoogleVoice might come with PBX in a Flash, and if so perhaps the original method would work without change. But I still prefer the PHP solution.
This isn't a full solution because I am not among those that are going into full panic mode, believing that Google Voice will totally shut down XMPP access without any warning. But if I am wrong, it shouldn't take more than a few minutes to go back to the old method, except that I would likely call GoogleVoice.php rather than the script from PyGoogleVoice. I even went ahead and added a "call cancel" function into GoogleVoice.php, which was an interesting exercise, just to be prepared in case we do need to go back to the old ways. If it looks like they are really going to pull the plug on XMPP, check back and I might have a more developed PHP script that accepts variables from Asterisk and sends them on to GoogleVoice.php - it should be a very simple thing to write.
I totally understand those who are just fed up with Google Voice and want to move on, and this isn't for those people. But if you have people on your system that make about one outgoing call a week through Google Voice like I do, it's just not worth it to move their number to a paid account.
I was reading a thread on the Obihai forum where a user (giqcass) said this: "Actually Callcentric doesn't have to cost any money. I'm using it now and paying nothing. When you sign up for Callcentric use your real address but say you don't plan to use Callcentric in the US. Then you won't be forced to buy E911 and you won't be charged anything." So that might be one option to get an inbound number from someone other than Google Voice. I am neither encouraging nor discouraging that, since I have no experience with Callcentric. Even if you decide to pay for a DID, they are cheaper now than they used to be, but that's a discussion for another thread.
But to get to the point, I was searching through some notes from way back when and some Google-fu brought me to this:
How it used to be done: How to use Google Voice for free outgoing calls on an Asterisk/FreePBX system (the no-XMPP way)
Although that's very close to what I used to use, the only thing I don't like about that method now is that it uses PyGoogleVoice, which for some reason I've always had problems with. I prefer the Google-Voice-PHP-API by aaronpk. The only thing you need to do if you are going to use that is first install php-xml - you can do yum install php-xml or whatever would be the correct way of installing it on a system running another OS. Then you can copy the GoogleVoice.php script to a directory and run it from there.
I ran a quick test to see if that API could be used the way the old PyGoogleVoice script was used, by creating a quick PHP script in the same directory as GoogleVoice.php:
PHP:
<?php
include('/root/GoogleVoice.php');
$gv = new GoogleVoice('[email protected]', 'mypassword');
$gv->callNumber('8005551212', '9999999999', 'mobile');
?>
Replace 8005551212 with the number you want to call, 9999999999 with the DID you are using as a Google Voice destination, and 'mobile' with the type of number you registered that number as with Google Voice - the options are 'mobile', 'work', or 'home'. This did cause Google Voice to initiate a call to the '9999999999' number (obviously not the actual number) and then when I answered it extended the call to the '8005551212' number. So this is a method that could work if you can't get PyGoogleVoice to install or have issues using it. Now that I think about it, PyGoogleVoice might come with PBX in a Flash, and if so perhaps the original method would work without change. But I still prefer the PHP solution.
This isn't a full solution because I am not among those that are going into full panic mode, believing that Google Voice will totally shut down XMPP access without any warning. But if I am wrong, it shouldn't take more than a few minutes to go back to the old method, except that I would likely call GoogleVoice.php rather than the script from PyGoogleVoice. I even went ahead and added a "call cancel" function into GoogleVoice.php, which was an interesting exercise, just to be prepared in case we do need to go back to the old ways. If it looks like they are really going to pull the plug on XMPP, check back and I might have a more developed PHP script that accepts variables from Asterisk and sends them on to GoogleVoice.php - it should be a very simple thing to write.
I totally understand those who are just fed up with Google Voice and want to move on, and this isn't for those people. But if you have people on your system that make about one outgoing call a week through Google Voice like I do, it's just not worth it to move their number to a paid account.