OBiTALK Community

General Support => Day-to-Day Use => Topic started by: azrobert on May 27, 2022, 07:34:55 AM

Title: GV Outbound Calls After EOL
Post by: azrobert on May 27, 2022, 07:34:55 AM
There have been several posts showing how to use a GV forwarding number to receive inbound GV calls. Most suggest using Callcentric, but any provider's inbound number can be used. You will need an SIP inbound number for GV outbound calls.

GV has a callback function. Sign into GV using an internet browser. Click on Settings and enable option "Always Use My Phone to Place Calls". Now when you place a call from the GV Website, a popup will ask which forwarding number you want to use for the outbound call. When you select a number, GV will ring that number. When you answer the call, GV will complete the outbound call. This function is clumsy, but it works.

My AutoHotKey script automates this procedure. Requirements are an OBi, and a PC running AHK. The OBi via an auto-provisioning hack (used in an unintended way) would post a URL containing the outbound number.  This will trigger the AHK script that retrieves the number and then walks thru the steps to make a call.

See instructions here:
https://www.obitalk.com/forum/index.php?msg=112105

See Version 2 of the script here:
https://www.obitalk.com/forum/index.php?msg=114020
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on May 29, 2022, 08:32:32 AM
Hi guys,

I got my AHK GV callback script working.

I had timing problems with the script. I'm no expert, but I think the script can enter keystrokes too fast and then they are not recognized properly. I had to put pauses (sleeps) between commands to get it working. The most trouble I had was selecting the forwarding number. I have 3 forwarding numbers and the script selects the 2nd. I suspect if you're going to have problems, it will be here. It is my understanding that computer speed can change AHK behavior. I have comments in the script and provided alternate methods of selecting a forwarding number. if you have timing issues, I probably won't be able to help. You'll just have to play with it. You can watch the screen as the script runs. This should give you an idea where the script is failing.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on May 29, 2022, 08:35:15 AM
Obsolete post - Removed
Title: Re: GV Outbound Calls After EOL
Post by: Koby on May 31, 2022, 09:55:43 AM
Just curious, have you ever looked at selgooglevoice (https://github.com/tsdg112/selgooglevoice)?  Instead of using AutoHotKey it uses Selenium (https://www.selenium.dev/) which if I understand it correctly is not tied to Windows, in other words it might also work on a Mac or Linux system.  Other than that it seems to perhaps be similar to what you are doing. The drawback that as far as I can tell, in both cases is that it requires you to be able to run a web browser, which means you would have to have a desktop version of the operating system installed.  So it would not work on any kind of "headless" server.

I remember when you could do this much more easily using a script called PyGoogleVoice but at some point that just stopped working and apparently the original author is no longer around to fix it.  That program did not require you to be running a web browser, it was a simple command line program that probably would have been ideal for this type of use (also it allowed you to send texts from the command line using your Google Voice account, which was very useful at times).
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on May 31, 2022, 01:47:00 PM
Never heard of selgooglevoice.
Didn't PyGoogleVoice require a server that supported Python?
Title: Re: GV Outbound Calls After EOL
Post by: Koby on May 31, 2022, 02:05:51 PM
Quote from: azrobert on May 31, 2022, 01:47:00 PMNever heard of selgooglevoice.

Not surprising, there's almost no information about it except on Github (https://github.com/tsdg112/selgooglevoice).  Only reason I mentioned it is for those that don't run Windows.  My understanding, though I might be wrong, is that AutoHotKey is a Windows-only program, while Selenium is cross-platform and can also run on a Mac or a Linux desktop.

Quote from: azrobert on May 31, 2022, 01:47:00 PMDidn't PyGoogleVoice require a server that supported Python?

Yes, but these days most Linux distros come with Python already installed.  Not certain about Windows though.  Anyway it's a moot point, that program hasn't worked for probably at least five years now.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 01, 2022, 07:42:36 AM
Hey azrobert, is there any way to make this work using a Voice Gateway? I tried but think I got stuck at the OutboundCallRoute. All 4 of my SP trunks are in use as are VG6, VG7, and VG8. SP2 and SP3 are SIP trunks. SP1 and SP4 are GV trunks.

I already have an AHK script running at all times doing a variety of things. Since you're doing a loop, I assume I could just paste in your script at the end of my script?

TIA
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 01, 2022, 08:43:43 AM
Quote from: Taoman on June 01, 2022, 07:42:36 AMHey azrobert, is there any way to make this work using a Voice Gateway? I tried but think I got stuck at the OutboundCallRoute.

Do you see the call in the OBi history?
Are the computer and OBi on the same network.
The outbound call defaults to port 5060. Click on the PhonerLite network tab to see the port number.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 01, 2022, 09:29:50 AM
Thanks for your reply. I got a new cable modem and I'm redoing my entire local network. So it will be awhile before I can get back to this.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 14, 2022, 08:53:30 AM
I have a new version of my AutoHotKey GV callback script. The script runs as a web server, so the OBi talks directly to AHK, eliminating the softphone.

You can test the AHK script by entering a URL into a browser. No need to make OBi config changes for testing the script.

If anyone is interested, let me know and I'll post instructions.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 14, 2022, 10:07:58 AM
Quote from: azrobert on June 14, 2022, 08:53:30 AMIf anyone is interested, let me know and I'll post instructions.

I'm interested. "runs as a web server" on what platform?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 14, 2022, 10:43:20 AM
Quote from: Taoman on June 14, 2022, 10:07:58 AMI'm interested. "runs as a web server" on what platform?

Windows.

I found an example on the AHK forum and modified it with my code.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 14, 2022, 12:45:15 PM
To run GV_Server on Windows just download the compiled version (GV_Server.exe).
You don't need to install AutoHotKey to run the compiled GV_Server.

Making modifications to the script:
Install AutoHokey.
Download GV_Server.ahk, AHKhttp.ahk and AHKsock.ahk
All scripts must be stored in the same folder.
Right click on GV_Server and select Edit.
Make your mods.

To compile GV_Server, right click and select Compile.

OBi Configuration:
Define a star code in your Star Code Profile:
*(1xxxxxxxxxx|xxxxxxxxxx|<480>xxxxxxx|011xx.S3), Set Speed Dial99, set($Spd[99],$code)

Change the area code (480) to yours for 7 digit numbers.

System Management -> Auto Provisioning
Under ITSP Provisioning:
Method: System Start
ConfigURL:
SET UDM0 = ""; @loop IF ($UDM0 != "" ) GOTO call; WAIT 2; GOTO loop; @call SYNC http://192.168.1.100:8000/GV?parm1=$UDM0&parm2=1&parm3=L&parm4=0; SET UDM0 = ""; WAIT 2; GOTO loop;

Change 192.168.1.100 to the IP address of the computer running AHK.
Optional parm2 will select your forwarding number.  Default  = 1.
Valid numbers 1, 2 or 3 for 1st 2nd or 3rd forwarding number.
Use optional parm3=R or parm3=r when the primary and secondary mouse buttons were switched.
Optional parm4=n used to adjust vertical position of cursor.
See for parm4 explanation:
https://www.obitalk.com/forum/index.php?msg=113092

System Management -> Auto Provisioning
Under User Defined Macro 0:
Value: $SpeedDial.99
Expandin: ANY

This is a hack of the ITSP Auto Provisioning.
The star code saves the dialed number in SpeedDial99
The user Macro equates variable UDM0 to SpeedDial99.
The ConfigURL checks SpeedDiall99 for a number.
It sleeps for 2 seconds and checks again.
When it finds a number, it issues http request with UDM0 as parm1.
This triggers the script.

Operation:
Enable "Always use my phone to place calls" in GV settings.
You must have a GV forwarding number setup to ring your OBi.
You must be signed into your Google account.

The GV_Server will automatically open a browser with GV.
Chrome, Brave, Edge and Firefox are supported.
The default browser is Chrome.
Change browser:
    Create a shortcut for GV_Server
    Right click on shortcut and select Properties
    Modify the Target by adding a space and the browser code.

Browser Codes:
    Brave: B or b
    Edge: E or e
    Firefox: F or f

The GV_Server script must be running.
To start the GV_Server script, just double click on it.
To stop script, right click on the taskbar ICON and select Exit.

Dial *8005551212
You can dial 11, 10 or 7 digit numbers after the asterisk.
It also supports international calls (011xx,)
Hang-up when you hear dial tone.
Wait for the callback and answer it.


See Version 2 of the script here:
https://www.obitalk.com/forum/index.php?msg=114020

Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 16, 2022, 12:17:23 PM
I added an optional parameter (parm2) to select the forwarding number. Values 1, 2 or 3. Will default to the 1st forwarding number when parm2 is not supplied or invalid. I only have 2 forwarding numbers defined, so I didn't test "3".

Initiate from a browser:
http://localhost:8000/GV?parm2=2&parm1=6235941000

New OBi ConfigURL:
SET UDM0 = ""; @loop IF ($UDM0 != "" ) GOTO call; WAIT 2; GOTO loop; @call SYNC http://192.168.1.100:8000/GV?parm2=2&parm1=$UDM0; SET UDM0 = ""; WAIT 2; GOTO loop;

Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 24, 2022, 08:19:32 AM
You can use SipSorcery to trigger a GV callback.
This replaces the ITSP Auto Provisioning hack.

Setup SipSorcery as a trunk.
I used an OBi VG.

Add following to the SipSorcery dial plan:

dialnum="#{req.URI.User}"
if  dialnum.match /^(1[2-9]\d{9}$)/ 
     result = sys.WebGet("http://Your_Public_IP:8000/GV?parm2=1&parm1=#{dialnum}",1)
     sys.Dial("music@iptel.org[cd=30]")
  end

In your router port forward 8000 to the computer IP running AutoHotKey.

Send 11 digit number to SipSorcery.
You will hear music.
Wait for the Call Waiting Tone.
Press Flash
Title: Re: GV Outbound Calls After EOL
Post by: Koby on June 29, 2022, 08:43:18 AM
Quote from: azrobert on June 24, 2022, 08:19:32 AMYou can use SipSorcery to trigger a GV callback.
This replaces the ITSP Auto Provisioning hack.

Setup SipSorcery as a trunk.
I used an OBi VG.

Add following to the SipSorcery dial plan:

dialnum="#{req.URI.User}"
if  dialnum.match /^(1[2-9]\d{9}$)/ 
    result = sys.WebGet("http://Your_Public_IP:8000/GV?parm2=1&parm1=#{dialnum}",1)
    sys.Dial("music@iptel.org[cd=30]")
  end

In your router port forward 8000 to the computer IP running AutoHotKey.

Send 11 digit number to SipSorcery.
You will hear music.
Wait for the Call Waiting Tone.
Press Flash


I hope you realize that only computers running Windows can run AutoHotKey.  Is there some reason you're adverse to finding a cross-platform solution that can run on other platforms (MacOS, Linux, FreeBSD, etc.)?

But in any case you've totally lost me with this post. I remember using SipSorcery at one point way back when but now you have to pay them $69 a year (payable ONLY in Bitcoin, no less, which makes me wonder if they are doing something shady) but also in their FAQ (https://www.sipsorcery.com/mainsite/Home/FAQ) it explicitly says:

QuoteDoes SIP Sorcery work with Google Voice?

No.

So I have absolutely no idea what you are doing here but I can't see it as being a useful option for anyone else, unless I am totally missing the point.  But I still wish you'd find a way to do this that isn't restricted to Windows.
Title: Re: GV Outbound Calls After EOL
Post by: hapollo on June 29, 2022, 01:19:38 PM
Quote from: Koby on June 29, 2022, 08:43:18 AMSo I have absolutely no idea what you are doing here but I can't see it as being a useful option for anyone else, unless I am totally missing the point.  But I still wish you'd find a way to do this that isn't restricted to Windows.

Maybe because the whole windows marketshare is still 75% of worldwide OS installs and Macs only 15% and Linux 5% So not only 15% then only .1% of Mac users wanting to use a custom calling method? Thus rewrite the whole script for a single user? So, do the math. Plus windows is perfectly capable of running on Macs using bootcamp. But why use bootcamp when you can get someone to rewrite a script just for you?!

Thanks azrobert for your continued optimizing of the script for the benefit of the majority and contributions to the community.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 29, 2022, 04:04:02 PM
Quote from: hapollo on June 29, 2022, 01:19:38 PMBut why use bootcamp when you can get someone to rewrite a script just for you?!


Exactly!
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 29, 2022, 06:12:42 PM
Quote from: Koby on June 29, 2022, 08:43:18 AMI hope you realize that only computers running Windows can run AutoHotKey.  Is there some reason you're adverse to finding a cross-platform solution that can run on other platforms (MacOS, Linux, FreeBSD, etc.)?

But in any case you've totally lost me with this post. I remember using SipSorcery at one point way back when but now you have to pay them $69 a year (payable ONLY in Bitcoin, no less, which makes me wonder if they are doing something shady) but also in their FAQ (https://www.sipsorcery.com/mainsite/Home/FAQ) it explicitly says:

So I have absolutely no idea what you are doing here but I can't see it as being a useful option for anyone else, unless I am totally missing the point.  But I still wish you'd find a way to do this that isn't restricted to Windows.

I'm a Windows person and also have used AHK. I have an old Dell XPS that I use to test things like this. My knowledge of Linux is limited and zip on other platforms, therefore my choice was Windows and AHK.

This isn't rocket science and I don't have a patent on the Idea, so anyone with more knowledge of other platforms can follow my example and create something.

My suggestion to use SipSorcery was directed at people that already had an SipSorcery account. I didn't think someone would buy a $69 subscription just to trigger my AHK script. A long time ago SipSorcery offered a limited function free account and I assumed some people still had one of these accounts.

You are not running Google Voice on SipSorcery. You are just posting a URL to trigger my AHK script. I like the SipSorcery solution better than the ITSP auto provisioning hack.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 29, 2022, 06:42:01 PM
Quote from: hapollo on June 29, 2022, 01:19:38 PMThanks azrobert for your continued optimizing of the script for the benefit of the majority and contributions to the community.

Thank you for the feedback. There were only 7 downloads of my script and I was wondering if anyone got it to work. Actually, you don't say it worked. Anyway, it's nice that someone appreciates my effort.

I have another version of the AHK script that is about 1 second faster. It takes 9-10 seconds from the time a number is sent to SipSorcery until the callback rings. There is a URL parm to send GV the outbound number, so the new script doesn't have to enter the number. Timing has change from the old script and it takes 10 tabs to get to where you select the forwarding number, up from 2. Following is a URL example. The number is placed after the "%2b" and must be 11 digits.

https://voice.google.com/u/0/calls?a=nc,%2b16235941000

I was going to post a question on DLSReports if anyone knew of a URL parm that will pass the forwarding number to GV, but I haven't gotten around to it. Does anyone here know of such a parm?

Title: Re: GV Outbound Calls After EOL
Post by: Koby on July 02, 2022, 08:20:43 AM
Quote from: hapollo on June 29, 2022, 01:19:38 PMMaybe because the whole windows marketshare is still 75% of worldwide OS installs and Macs only 15% and Linux 5% So not only 15% then only .1% of Mac users wanting to use a custom calling method? Thus rewrite the whole script for a single user? So, do the math. Plus windows is perfectly capable of running on Macs using bootcamp. But why use bootcamp when you can get someone to rewrite a script just for you?!

First of all no one asked YOU to do anything!  Second, I mentioned three different non-Windows operating systems, and bootcamp only runs on one of them.  But also, when you are running bootcamp you are still running fucking Windows!  And you are NOT running MacOS at the same time (if I understand how bootcamp works correctly, you can either run MacOS OR Windows, but not both at the same time) so now you have to dedicate your Mac to running Windows, and I can't think of many Mac users who would find that option appealing.  They pay the "Apple Tax" on their Macs just so they don't ever have to deal with Windows again!

Since you seem so opinionated, I have to ask, are you personally using azrobert's script right now?  If so then maybe I could understand your concern.  But if not then you are just being a troll, chiming in with a--hole comments.  Nobody is holding a gun to azrobert's head and forcing him to do anything; he is perfectly free to ignore any suggestions that you or I or anyone else makes.  I suspect he wrote this for his own use and was maybe hoping to get others to use it, and all I am saying is that if he really wants others to use his script he'd be better off to get it running on something that is cross-platform, or at least something that also runs on Linux, so that it could also run on the same machine as certain popular PBX software.  But if all he cares about is that it works for him (and any other Windows user that may find a use for it) that is fine.  Just because someone makes a suggestion doesn't mean you need to emerge from under your bridge and start making snarky comments.

If you read the other thread at https://www.obitalk.com/forum/index.php?topic=19376.0 you will see that azrobert suggested to someone else that they try his script and that they responded that they couldn't because they were running Linux.  So I'm not the only one who would need a solution that isn't Windows-centric.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on July 10, 2022, 01:52:17 PM
I'm using a new call handling procedure. The script didn't change for this. You now just place the call and wait. You don't hang-up or press any extra keys after placing the call. It uses SipSorcery and PBXes.com's Call Parking function.

I did make one change to the script. The timing keeps changing for the selection of the Forwarding Number causing the script to fail. I changed the Sleep before the Enter that selects the Forwarding Number to 2 seconds. The script seems stable now.

Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 15, 2022, 09:38:17 PM
Seems to be working. Pretty slick.

It didn't work at all when I first tried because I have my mouse buttons switched. Can you tell me where to edit the script if I want my primary & secondary mouse buttons switched?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 15, 2022, 11:04:42 PM
There are only 2 places where I do a "MouseClick, Left....."
Change both to "MouseClick, Right....."
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 06:02:59 AM
Quote from: azrobert on October 15, 2022, 11:04:42 PMThere are only 2 places where I do a "MouseClick, Left....."
Change both to "MouseClick, Right....."

Thanks! Works great.

Now I have to figure out how to incorporate my existing ahk script into yours.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 06:59:21 AM
I believe you can have both scripts running concurrently.

If you don't want to do that, try placing your code near the beginning of the script immediately before the "return".
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 07:20:29 AM
Quote from: azrobert on October 16, 2022, 06:59:21 AMI believe you can have both scripts running concurrently.

If you don't want to do that, try placing your code near the beginning of the script immediately before the "return".


Got all my commands working inside your script without issue although placement matters. I put all my commands close to the top after this code block:
Quoteserver := new HttpServer()
server.SetPaths(paths)
server.Serve(8000)

Me thinks your script is the best solution available for when direct connection to GV from an OBi stops working. All you need is a forwarding number and you don't have to pay for a separate provider for outbound calls. Plus all outbound calls will have an A attestation level.

You rock, azrobert! That Koby whiner can go pound sand.

PS. Just curious.......about how many hours do you think you put in to get this working? I've been testing extensively and it seems rock solid.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 09:31:08 AM
Quote from: azrobert on October 16, 2022, 06:59:21 AMI believe you can have both scripts running concurrently.

If you don't want to do that, try placing your code near the beginning of the script immediately before the "return".


Got all my commands working inside your script without issue although placement matters. I put all my commands close to the top after this code block:
Quoteserver := new HttpServer()
server.SetPaths(paths)
server.Serve(8000)

Me thinks your script is the best solution available for when direct connection to GV from an OBi stops working. All you need is a forwarding number and you don't have to pay for a separate provider for outbound calls. Plus all outbound calls will have an A attestation level.

You rock, azrobert! That Koby whiner can go pound sand.

PS. Just curious.......about how many hours do you think you put in to get this working? I've been testing extensively and it seems rock solid.

Edit: So I started having an issue when the callback window came up and the mouse clicked on it the tab took me to my call history and then arrowed down 3 spots. Not sure what if anything changed. I ended up adding an additional MouseClick and that "seems" to have fixed it but I'll have to test more.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 10:14:37 AM
Instead of an extra mouseclick, you can try increasing the sleep after the mouseclick, maybe to 500. How fast is your cpu?
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 10:28:27 AM
Quote from: azrobert on October 16, 2022, 10:14:37 AMInstead of an extra mouseclick, you can try increasing the sleep after the mouseclick, maybe to 500. How fast is your cpu?

Very old and slow (not unlike myself). It's an i3-3240 running at 3.40Ghz.
I'll try increasing sleep time.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 10:36:59 AM
I did some limited testing on an even older I3 than yours. It seems I didn't test enough.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 11:11:02 AM
Now it doesn't seem to matter what I do it always tabs over to my call history.

Any other ideas?

I'll have to play with it some more. When I close and reopen Chrome the script seems to work fine. But after a period of time it seems to change to having the tab go over to the call history.

I've made so many calls in testing this I'm afraid I might trigger a Google algorithm that might lock my GV account. So I'm going to give it a rest for now.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 12:05:50 PM
I don't know what would cause those symptoms.
If it works after the window is closed, the script can close the window after initiating the callback.
Near the end of the script there is a WinMinimize.
Change it to WinClose
The next time you place a call the script will automatically open a new window.
It will just take 2-3 seconds longer for the callback.

The script is failing and the call is never placed, right?
Why would Google lock your account?
I made a bazillion calls during testing and my account wasn't locked.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 01:03:50 PM
This is crazy. How can it go from rock solid to not working. Do you have something running that will slow down your computer like Windows Update?

You can exit the script at different points by inserting a return.
Insert a return after "SendInput %dialnum%"
Now run the script.
Does it type the outbound number?
If yes, move the return after the next Enter.
Do you get the popup for the forwarding number?
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 01:55:54 PM
Quote from: azrobert on October 16, 2022, 12:05:50 PMThe script is failing and the call is never placed, right?
Why would Google lock your account?


I've made well over a 100 successful outbound calls in a short period of time. If you were to look in the GV support forum you'd find dozens of people who got their GV account locked. Supposedly making a bunch of short calls in a short period of time can trigger Google's algorithm to lock the account for a period of time. Good to hear that didn't happen to you during your testing.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 02:40:42 PM
Quote from: azrobert on October 16, 2022, 01:03:50 PMThis is crazy. How can it go from rock solid to not working.


Think I found the issue. If the script is loaded but a GV window isn't open then all calls will fail because even though a GV window was automatically opened, a tab goes to call history. From then on, if I try and make a call it will fail every time.
But if I close that GV window and reload the script which opens a new GV window then everything is "rock solid" and all calls work. I increased sleep from 600 to 1000 but it still doesn't work if the GV window is automatically opened by placing a call.

That shouldn't be a problem because if I load the script it also opens a GV window. I just can't make a call if a GV window isn't already open and it has to open automatically.

Edit: Forgot to add that when a GV window gets opened automatically by making a call and it fails, then every subsequent attempt to make a call opens a new GV window so I'd have several open GV windows. I found this confusing so I would delete every instance of a GV window. Then I would try another call and the same thing would happen all over again. It wasn't until I deleted all GV windows and reloaded the script that calls would start working for me.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 07:18:30 PM
FYI mine works when a GV window isn't open.

I don't understand "a tab goes to call history". Please explain.

Why isn't a GV window open? Script opens a GV window on startup and it should stay open. Do you manually close it or does it close automatically?

When a call is placed, the script looks for a window name "Voice - Calls".  If it doesn't find one, a new window is opened. If it opens a new window when it shouldn't, Is the current window name exactly "Voice - Calls"? 

Script should always open GV in a new window, never in a 2nd tab. Is this true?

During testing I had a problem after a called failed, but I can't remember exactly the circumstances. After a failure do you see a pending call?
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 16, 2022, 08:46:52 PM
Quote from: azrobert on October 16, 2022, 07:18:30 PMI don't understand "a tab goes to call history". Please explain.
After the MouseClick you send a tab to move to outbound number field. When I try and make a call with no GV window open, after the GV window opens automatically that "tab" sends me to my call history and then arrows down 3 times since that is what the 2nd parm is set to and then opens the Call Options panel. So no call is made and the window minimizes. Even though there is now a GV window open, if I try another call it opens an additional GV window with the same errors happening again. Every new call results in a new GV window opening with the same errors. Only fix is to close all GV windows and reload the script. Then everything is rock solid.

Quote from: azrobertWhy isn't a GV window open? Script opens a GV window on startup and it should stay open. Do you manually close it?
Yes, I was manually closing it based on your DSLR post telling me Chrome doesn't have to be open for the script to work. I was merely testing. But I kept on testing getting error after error not realizing I needed to close all GV windows and reload the script.

Quote from: azrobertWhen a call is placed, the script looks for a window name "Voice - Calls".  If it doesn't find one, a new window is opened. If it opens a new window when it shouldn't, Is the current window name exactly "Voice - Calls"?
Hadn't noticed that. When call is made with no GV window open, when it does open a GV window it's called "Voice - Contact name" or "Voice - number." When calls are working as expected then yes, it says "Voice - Calls."

Quote from: azrobertScript should always open GV in a new window, never in a 2nd tab. Is this true?
Script never opens a new tab. It opens a new window. But if making call with no window open the call fails after opening the new window for the reason listed above. Then when making a 2nd call it opens a 2nd GV window. I realize now why that's happening since it's not finding a window named "Voice - Calls." At one point I looked down and I had over a dozen GV windows open all with the same error.

Quote from: azrobertAfter a failure do you see a pending call?
Yes, with the Call Options panel open on top of the pending call because the tab sent me to the call history. See attached.

Again, everything works fine if I just leave the GV window open when I load the script. But if I close that window and try to make a call it errors out because the tab sends me to my call history and not the outbound number field.

ScriptError.JPG
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 16, 2022, 10:52:12 PM
This script is the 3rd major version. The purpose was to increase performance. I intended to have a GV window open all the time.  The callback arrives about 2-3 seconds faster than if the script has to open a new window. I included the function to open a new window in case the window was accidentally closed.

When the script opens a new GV window the first thing displayed should be the popup for forwarding number selection. Your screenshot does show the popup, but maybe window is not fully loaded when the script tries to tab to the forwarding number. Try giving the script more time to load the window.

Find where I open Chrome (Run, chrome.exe)
Below the run is a Sleep 2000
You can see in the comments to the right "Slower computers might need to increase this value."
Change it to Sleep 4000

I did test with a slower computer than yours, so maybe there is something else wrong.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 17, 2022, 06:20:33 AM
Quote from: azrobert on October 16, 2022, 10:52:12 PMTry giving the script more time to load the window.

Change it to Sleep 4000

That change fixed the issue! Thanks for all your hard work on this, azrobert. Very much appreciated.

I really think this is a great solution and I hope it gets more traction on DSLR/Reddit/OBiTALK if and when OBi devices can no longer directly connect to Google Voice.

Now that the script appears to be working flawlessly I'm going to make a compiled version and see how that goes. I assume the compiled version would also have to be executed from a folder containing AHKhttp.ahk and AHKsock.ahk?

PS. Running your script and my script simultaneously works fine. Thanks for that tip.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 17, 2022, 08:03:26 AM
Quote from: Taoman on October 17, 2022, 06:20:33 AMThat change fixed the issue!

I assume the compiled version would also have to be executed from a folder containing AHKhttp.ahk and AHKsock.ahk?

Great to hear! I doubled the wait time just to be safe. It added 2 seconds to the process time and probably doesn't have to be that long. I don't know if you want to screw with something that works, but you can try 2500 to speed things up.

Your assumption is incorrect. You don't need to other 2 scripts.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 17, 2022, 09:05:10 AM
Quote from: Taoman on October 17, 2022, 06:20:33 AMI really think this is a great solution and I hope it gets more traction on DSLR/Reddit/OBiTALK if and when OBi devices can no longer directly connect to Google Voice.

Not much interest at all. You're the first person that acknowledged trying the script. Maybe it will pick up the closer we get to the drop dead date.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 17, 2022, 09:58:35 AM
Quote from: azrobert on October 17, 2022, 08:03:26 AMbut you can try 2500 to speed things up.

I got it down to 2400. At 2300 it started puking again.

Quote from: azrobert on October 17, 2022, 09:05:10 AMMaybe it will pick up the closer we get to the drop dead date.
I'm guessing it definitely will.

Edit: Compiled version works just fine.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 17, 2022, 10:02:26 PM
Ran into a "gotcha" this evening that you may want to address in the script.

Since I now have an open window to my GV account at all times when using the script I use it to send and read SMS rather than opening a new tab. However, if you leave it on the SMS/messages page and then try to make a call using the script it fails miserably.

The script seems to work if I'm on the voicemail, archive, or spam page but fails if I'm on the messages page. Does it work for you if the GV window is on the messages page and you make a call?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 17, 2022, 11:47:28 PM
I already fixed the problem. I realized the bug because of your answer to one of my questions. The problem happens because the window name changes. This also happens when you click on a call history or voicemail entries. The fix is looking only for window name beginning with "Voice". This new version also works when you're in GV Settings, I do a Page Back. I included the change you needed, but used value 2500.

I'll post this update tomorrow.

Edit:
Script will fail if you're in Help or Audio Settings.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 09:53:32 AM
Unfortunately, new script is not working at all for me now because I switch primary and secondary mouse buttons because of my carpal tunnel. You must have made some additional changes because even if the GV window is on the Calls page the mouse moves over to the right and just reloads the GV page and then minimizes.

If I switch mouse buttons back to normal the script works as expected.

I had to switch back to the old script.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 18, 2022, 10:15:11 AM
Here's the fix for the right mouse button:

https://www.obitalk.com/forum/index.php?msg=112916
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 10:20:46 AM
Quote from: azrobert on October 18, 2022, 10:15:11 AMHere's the fix for the right mouse button:


Yes, I know. That was the first thing I did with the new script.

Problem I described is after I made that switch.

I'll give it another try.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 11:07:11 AM
Ok, it is working if GV window is on Calls page. But if GV window is on messages page I get a certificate popup. I put in a "return" to stop it at that point. See attached.

Edit: If GV window is closed and I make a call, when the GV window opens it is not maximized.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 18, 2022, 11:32:40 AM
It works for me from the message page. I don't know what it's doing to get that popup. I manually clicked on different points on the screen and can't reproduce the error. I'm going to be busy most of the afternoon and won't be able to look at this. Can you try to manually reproduce the popup?
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 11:44:57 AM
Quote from: azrobert on October 18, 2022, 11:32:40 AMCan you try to manually reproduce the popup?

Took me awhile but I found it.

Click on lock at far left of url address field.
A popup screen will appear.
Then click on "Connection is secure"
That's the screen that the script ends at and then GV window minimizes.


Edit: I think I fixed the issue by adding the following code. I don't understand how it was working for you without this code if your GV window was on the Messages page?

if WinExist("Voice - Messages")          ; Does a GV Messages exist?
  {
  WinActivate
  Send !{Left}                          ; Go Back to GV Calls
  Sleep 200                           
  }

Edit2: Everything seems to be working now as expected with the added code. Haven't been able to break it so far.
My guess is you meant to add that code but forgot?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 18, 2022, 02:53:12 PM
I'm back, but have to leave again in about half hour.

I don't understand how the script can fail like that. It's the exact same code whether you're on calls or messages. My message page looks like the call page. The only difference is the left column has messages instead of call history.

The script does a mouse click around the phone symbol and some tabs and enters. The place it clicks is based on the screen size. I can't get to the lock symbol with tabs and enters. The only way is to mouse click directly on the lock symbol. Even if it did that, the same thing should happen on the call page.

Is the GV window full size or smaller?
Right click on the desktop and select Display Settings.
Is the text size 100%
What is the Display Resolution.

Edit:
In the script find where I type the outbound number, %dialnum%
put a return immediate after
Does the script type the outbound number?

Now move the return after the Enter.
Do you get the forwarding number popup?
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 05:00:17 PM
Damn. Had long answer typed out but it logged me out and I lost all of it.

If messages icon is highlighted in GV window I go to lock symbol after 2 tabs. If calls icon is highlighted I get to lock symbol after around 20 tabs because it tabs thru every suggested Contact.

GV window is full size.
Text size is 125%.
Display Resolution is 1920 x 1080

Quote from: azrobert on October 18, 2022, 02:53:12 PMEdit:
In the script find where I type the outbound number, %dialnum%
put a return immediate after
Does the script type the outbound number?

Now move the return after the Enter.
Do you get the forwarding number popup?

Tried but I never get that far if messages icon is highlighted. I go to lock symbol then certificate popup I posted above. Then it's full stop and minimize.
But if calls icon is highlighted everything works as expected.

But if I uncomment out the code I added then everything works everywhere.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 18, 2022, 05:35:56 PM
Ok, help me out here because I'm no code jockey and don't know what I'm doing or talking about.

However, in your script I only see "Send !{Left}" (which sends me back to calls icon) when ("Voice - Settings") exists. Why don't you have a "Send !{Left}" if ("Voice - Messages") exists?

Quote from: azrobert on October 17, 2022, 11:47:28 PMThe fix is looking only for window name beginning with "Voice".

This doesn't appear to be the case for me.

So I tested your script when I was highlighting all the other icons: voicemail, archive, and spam and they all work along with calls. It's only messages that screws up because after 2 tabs I'm on the lock symbol. Go figure.

Same results if I open GV window manually. If messages icon is highlighted then 2 tabs lands me on the lock symbol.

Same results if opening GV window in Firefox.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 18, 2022, 10:30:02 PM
I found a problem with the Messages page. The layout changes depending on the window size. When the width is less than about 3/4 size, it causes everything on the right to disappear, including where you enter the outbound number. A 4:3 aspect ratio monitor might always have this problem. I don't have one, so I can't test. You can maximize the window for 16:9 monitor, but that might not fix a 4:3. I think your fix to page back to the Calls page is the best solution. It's strange that the Messages page is the only one with this problem.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 19, 2022, 06:10:55 AM
Quote from: azrobert on October 18, 2022, 10:30:02 PMI found a problem with the Messages page. The layout changes depending on the window size. When the width is less than about 3/4 size, it causes everything on the right to disappear, including where you enter the outbound number.

Now I'm really confused. When you have the messages icon highlighted do you still see the dialpad and dialing icon on the right hand part of the screen? I don't although I do see it with all other icons: calls, voicemail, archive, and spam. But not with messages. So when your script has the mouse go to the right part of the screen to make the dialer active there's nothing there to activate.

I'm using a 27" high quality Dell monitor with 16:9 aspect ratio and GV window is full size.

Edit: Ok, found the problem. It's because I have text size set to 125%. When I set it back to 100% I get the dialer on the right hand part of the screen when messages icon is highlighted and your script then works. Unfortunately, I have poor eyesight and I need to have text size set to 125% so I'll have to stick with my solution.

I think you should include that little block of code in your script also in case there are other old-timers like me or anyone with limited eyesight that might run into the same issue.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 19, 2022, 07:05:19 AM
When the window is 3/4 up to full size, the dial pad, the number field and phone symbol appear. If the window is resized less than about 3/4 everything on the right disappears. This only happens in Messages.

I have a 27" LG 1920x1080 monitor. I don't have a 4K monitor.

The Page Back fix will work either way.

I added a 3rd parm (parm3=R) to indicate when the mouse buttons were switched. I only tested that it didn't screw up anything with the default mouse settings. Could you test when the buttons are switched. I already made changes to the instructions.

https://www.obitalk.com/forum/index.php?msg=112105

Do you think the script needs any more mods? I don't want to post if it needs more changes.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 19, 2022, 07:48:39 AM
First I forgot to put in my computer's ip address. Then I forgot I had put 2 returns in the script for testing. Then I realized I forgot to change parm 2 and it rang my cell phone instead of Callcentric. Aaaarrrrgggghhhh!

Anyway, after fixing all that it seems to be working normally.

But I'm going to get some coffee and come back and do some more testing.

Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 19, 2022, 09:44:13 AM
I know you don't want to hear this but the new GV_server.ahk is not working for me.

First problem is mouse buttons. Script doesn't seem to recognize my mouse buttons are switched. I have the parm 3 set to R. Only way I can get it to work is by commenting out:

else
    MouseClick, Left, %M1%, %M2%

Second problem is if messages icon is highlighted I still have same problem of 2nd tab takes me to lock symbol.

I have to leave for now. Will be back later to look at it more closely.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 19, 2022, 10:58:07 AM
Didn't realize you deleted latest version of GV_server.ahk. I made so many edits I deleted it and wanted to download it again to test.

I reverted back to my previous version with the couple edits I made and everything really does work for me. Whether the GV window is open or closed or if the messages icon is highlighted or not. Everything seems to work and I can't seem to break it.

Leaving again for a few hours.

Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 20, 2022, 09:48:17 AM
I think we almost have a winner. However, I was able to break it.

If I just have the messages icon highlighted everything works as expected.

However, if I have the messages icon highlighted and have an SMS highlighted so I see the conversation in the right panel the script bombs.

I can see the mouse go over to the right-hand part of the screen where there is no dialer and it pops up with my photo album as if I want to attach a picture to an outgoing text message.

In that situation I have to hit alt-left arrow twice to get back to calls page.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 20, 2022, 10:30:00 AM
Mine works, but I don't get the photo album popup.

Does the window name contain a phone number? The new code I added should close the window.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 20, 2022, 10:50:46 AM
Quote from: azrobert on October 20, 2022, 10:30:00 AMMine works, but I don't get the photo album popup.

Right, but remember I don't have the dialer visible when I'm on the Messages page.

Quote from: azrobert on October 20, 2022, 10:30:00 AMDoes the window name contain a phone number? The new code I added should close the window.


No, just "Voice - Messages"

I "seem" to have fixed it (at least for me) by just adding another:

Send !{Left}
Sleep 400

Still testing..........
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 20, 2022, 11:20:28 AM
Quote from: azrobert on October 20, 2022, 10:30:00 AMMine works, but I don't get the photo album popup.

When you say it's working for you what page are you on? If I am on the Messages page with an SMS highlighted, a single alt-left arrow (Send !{Left}) doesn't bring me to the calls page. I remain on the Messages page but with just no SMS highlighted. So I still can't make a call because I don't have the dialer visible. I need another alt-left arrow to get me to the calls page so the script will work.

So far, the code I added seems to be working for me. I'm curious if you add the same code if you notice any negative side effects?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 20, 2022, 09:31:55 PM
Your solution won't work. My behavior is the same, but if you click on 2 messages, it takes 3 Backs. Click on 3 messages it takes 4 Backs. This scenario is likely you occur. You click on a message to read or reply, then click on the next message.

When I'm in Messages there are 3 Window Title formats:
Voice - Messages
Voice - (xxx) xxx-xxxx
Voice - xxxxx

The last 2 are when I'm in SMS.

My solution is to close the Messages window. The normal script processing will automatically open a Calls window. I already made the change, but the code only checks for the 1st and 2nd formats. I'm not an AHK expert, so I have to do research on how to match 5 digits. Right now I'm burned-out screwing with this script and need a break. Maybe I'll feel differently tomorrow.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 21, 2022, 07:21:28 AM
Quote from: azrobert on October 20, 2022, 09:31:55 PMYour solution won't work. My behavior is the same, but if you click on 2 messages, it takes 3 Backs. Click on 3 messages it takes 4 Backs. This scenario is likely you occur. You click on a message to read or reply, then click on the next message.
Good catch. I didn't even notice this.

Quote from: azrobertWhen I'm in Messages there are 3 Window Title formats:
Voice - Messages
Voice - (xxx) xxx-xxxx
Voice - xxxxx

The last 2 are when I'm in SMS.

I'm not experiencing this unless I'm missing something. How do you view the "Window Title" name? The only way I know of is to minimize the window and then hover the mouse over it to see the title. Regardless of whether I'm just on Messages page or viewing a SMS my Window Title always says the same thing: "Voice - Messages - Google Chrome."
It does act the way you describe when I'm on the Calls icon but not the Messages icon.

I'm probably missing something but it appears (so far) that all I need to do is:

if WinExist("Voice - Messages") or WinExist("Voice - Settings")
{
   WinActivate
   WinClose
}

I've tested this when highlighting SMS 10-digit numbers and also SMS short codes. Always seems to work for me.
The GV window closes and then reopens and dials the number. Seems to be working reliably......so far.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 21, 2022, 08:51:58 AM
Here are pictures of the Messages tabs when in SMS 10 and 5 digit numbers.

I already made the changes for 5 and 10 digit numbers. It didn't take very long. I only tested the code in a separate script. I have to test GV_Server to make sure I didn't screw up anything.

Click on Windows Start
Find AutoHotKey app
Expand it
Start Windows Spy
Activate a GV window
Window Spy will show the full window name (Top line) of the active window

Capture1.GIF
Capture2.GIF 
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 21, 2022, 05:44:44 PM
We seem to be getting different results when we are on the Messages tab which I don't understand. Whether the Messages tab is just highlighted or I've selected a specific SMS the Window Title remains the same: "Voice - Messages"

which is why WinClose is working for me (I assume) in all cases when on Messages tab.

GVMessages.JPGGVTitle.JPG 
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 22, 2022, 11:35:10 AM
This version contains another bug fix. It also supports Chrome, Brave, Edge and Firefox browsers. The default browser is Chrome. If you want to use a different browser, see instructions here:

https://www.obitalk.com/forum/index.php?msg=112105

Title: Re: GV Outbound Calls After EOL
Post by: Koby on October 22, 2022, 12:50:47 PM
I just wanted to mention that if anyone wants to make this work in Linux (not azrobert's specific script, but doing something similar) it might be possible using selgooglevoice (https://github.com/tsdg112/selgooglevoice) which I had mentioned previously.  But the question has always been how to install selenium. Today I discovered this article:

Setup Selenium with Python and Chrome on Ubuntu & Debian (https://tecadmin.net/setup-selenium-with-python-on-ubuntu-debian/)

In that article I would think you would use the method shown in "Example 1: Selenium Python Script with Headless Chrome" to run the selgooglevoice script.  I have not personally tested this because I don't have the time right now and it will be another year before we really need anything like this, but for those who hate the idea of running Windows as much as I do, this may be a workable alternative.

If you are a Windows user then I would stick with azrobert's script - it appears he has put a lot of time and effort into it, and hopefully will continue to maintain it going forward (since you just know Google will probably change the page layout from time to time).

If anyone actually tries this before I get around to it I'd be interested to hear whether it works for you.  I am just curious whether the selgooglevoice script actually still works.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 22, 2022, 01:18:53 PM
It supports international calls.
Just change the Star Code to:
*(1xxxxxxxxxx|xxxxxxxxxx|<480>xxxxxxx|011xx.S3), Set Speed Dial99, set($Spd[99],$code)
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 22, 2022, 07:17:09 PM
Quote from: azrobert on October 22, 2022, 11:35:10 AMThis version contains another bug fix. It also supports Chrome, Brave, Edge and Firefox browsers.

Looks like a winner version. I've been unable to break it.......and I've been trying!

HIGHLY RECOMMENDED.

Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 22, 2022, 10:15:20 PM
To be clear, if you use azrobert's GV callback solution (and you should) it WILL NOT conflict or change your existing GV or SIP provider OBi configurations in any way. So you can continue using your existing configuration the way you have been and also have azrobert's GV callback script ready to go at a moment's notice. With the script loaded, all you have to do is preface your outgoing dialed number with an asterisk * and the callback script will kick in and complete the GV callback process via your DID automatically.

 
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 24, 2022, 07:12:31 AM
Another bug fix. If you had unread message(s), the window name will indicate how many. This might cause a failure.

Capture.GIF

GV_Server.ahkGV_Server.exe   
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on October 24, 2022, 11:21:08 AM
Quote from: azrobert on October 24, 2022, 07:12:31 AMAnother bug fix.


Good catch. I missed that.

Note: in this version the GV window opens in Normal size and never maximizes. It doesn't affect the efficacy of the script but I prefer the GV window to be maximized. So I put in a couple WinMaximize commands in the script which fixed the issue for me.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 24, 2022, 03:34:05 PM
A window opened by the script should take the characteristics of the last window closed. If the last window closed was maximized then a window opened by GV_Server should also be maximized.

I didn't like the way the script was checking for a Messages window. It now assumes a Voice window is Messages if it's not one of the other Voice window types. Using this method, the script doesn't have to compare for that un-printable character, therefore it doesn't have to be saved with special encoding.

You don't have to use this version. It should function exactly like the last. I attached the scripts to the post with the GV_Server instructions.

https://www.obitalk.com/forum/index.php?msg=112105
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 24, 2022, 09:13:20 PM
Can't seem to get this right. Another fix.

When there is a missed call or an un-played VM, the window would close and re-open. The call would complete, but callback would take a little longer. Window title format "Voice – (n) Calls/Voicemail" would cause the problem.

Updates are here:
https://www.obitalk.com/forum/index.php?msg=112105
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on October 26, 2022, 10:28:08 AM
I added an Escape to the script. This will close any popup (Help, Audio Settings, etc). The script would fail when any popup was active.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on November 02, 2022, 12:15:17 PM
Here is a new version and hopefully my last. I keep finding a way to cause the script to fail. When I fix the problem, I cause a different failure. The script repositions the cursor so it's only a single tab to the number field. The cursor must be below the line above "Call as" and above the line below the Call button. This position is a moving target depending on the window setup. Here are some ways the target changes:

Window size
Zoom level
Bookmark bar or not
Google sound warning or not

This version is the best I can do and will work with many screen variations, but will fail with some. If the script fails, I've included "parm4=n" on the URL to adjust the vertical position of the cursor when it's not in correct area as described above. You should be able to see the position of the cursor as a call is processed.   " n" is the number of pixels the cursor is moved vertically. A number will move the cursor down and a negative number will move it up.

See for scripts attachments and URL syntax:
https://www.obitalk.com/forum/index.php?msg=112105
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on November 03, 2022, 05:55:59 AM
Working well with no issues found. Can't seem to break it. Even on my ancient computer it runs pretty fast.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on November 03, 2022, 09:28:23 AM
Quote from: Taoman on November 03, 2022, 05:55:59 AMCan't seem to break it.

If you have the Bookmark Bar enabled and have GV warning "Your browser might prevent calls from ringing" do this:
Reduce the width of the window until the warning message expands to 3 lines. Keep the window height at max. The script will now fail. Adding "&parm4=100" will fix this.

Zoom 250% will also cause the script to fail.

AHK will not detect a window title when there is a 2nd tab and it's active. In this scenario the script will open another GV window and complete the call. I haven't researched why it doesn't detect the window.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on November 03, 2022, 10:23:19 AM
Quote from: azrobertIf you have the Bookmark Bar enabled and have GV warning "Your browser might prevent calls from ringing" do this:
Reduce the width of the window until the warning message expands to 3 lines. Keep the window height at max. The script will now fail. Adding "&parm4=100" will fix this.
I've always had the Bookmark Bar enabled but have never seen that error/warning message before. But I take your point about how parm4 would be used.

PS.
From the time I dial the number and then hear the dial tone it takes 6.5 seconds until my Callcentric extension starts ringing. Pretty damn fast.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on May 26, 2023, 10:18:09 AM
I have an updated GV_Server and have a new version.

I made a change in Chrome settings and the script started failing, so I fixed the code again. I also created a more stable version 2. The old script repositions the cursor, so it takes 1 tab to the outbound number field and then enters the number. I explained in a previous post why this target area changes based on different settings.

The new version takes a different approach. It enters the full GV URL which contains the outbound number. Selecting the Forwarding Number is the only thing left for the script to do. This is basically the same as the old script when it doesn't find a GV window. I originally didn't use this method because it takes about 2 seconds longer to receive the callback.

If the old script works, you can continue using it. If it doesn't work, try the new V2. The updated old version and the instructions are found at the link below. The OBi forum only allows 4 attachments per post, so I attached the new GV_Server_V2 here.

https://www.obitalk.com/forum/index.php?msg=112105


Title: Re: GV Outbound Calls After EOL
Post by: Taoman on May 26, 2023, 11:45:40 AM
Very cool.
FYI: the ahk script works fine for me but the exe does nothing. It executes and I can see that it loaded (alongside my personal ahk script) but when I make a call nothing happens.*
Edit: so while I was writing this post I still had the exe loaded. I just now exited the exe and loaded the new ahk script and the script immediately started completing the call I had tried to make with the exe. It completed the call with no issues.

Also, how hard would it be to just hardcode in my forwarding number or is that even possible? The more I think about I'm guessing it's not possible......

* I compiled the working version 2 ahk script but still no joy with the exe.

PS. Nice touch.
Quoteif (Winfound != "Y")
   WinClose, Voice
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on May 26, 2023, 02:23:42 PM
GV_Server.exc and GV_Server_v2.exe both work for me.

Did you allow it access thru the firewall?

Go to:
Windows Security.
Firewall & network protection
Allow an app through firewall

Is GV_Server.exe checked?

I thought that there might be a way to pass the forwarding number with the URL, but I couldn't find anything. I even posted a question on the GV forum and they said it can't be done.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on May 26, 2023, 03:20:12 PM
Quote from: azrobert on May 26, 2023, 02:23:42 PMDid you allow it access thru the firewall?

Yeah, that was it. Thanks.
Title: Re: GV Outbound Calls After EOL
Post by: Pnay on June 14, 2023, 09:52:47 AM
Why is this necessary? Won't Google Voice on Obi still work for outbound and inbound after EOL until Google breaks something?
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 25, 2023, 03:22:34 PM
Here is a Batch file you can use to trigger GV_Server. Double clicking on it will open a terminal window and ask for a phone number. It will prompt for another number after triggering GV_Server. Close the window to stop it. It's setup to use the 1st forwarding number. If you need a different number, edit the Batch file and change parm2 to the number you need. It uses the Chrome browser. This can easily be changed. It also doesn't have any error checking, so enter the phone number correctly.

The Batch file opens another browser window for the URL. If you want to automatically close the window, add the following code to near the end of GV_Server and before "res.status := 200".
if WinExist("Untitled")                  ; GV-Server triggered by BAT file?
  WinClose

You can optionally pin the Batch file to the Start menu:
Right click on the Batch file and select Create Shortcut
Right click on the Shortcut and copy or cut it
Right click on the Start button and select Run
Enter shell:programs
This will open the Programs folder
Paste the shortcut into the folder
Now the shortcut will show as a Start menu program
Click Start button
Window 10: scroll down to the shortcut
Windows 11: Click All apps then scroll down to shortcut
Right click on shortcut and select Pin to Start

GV_Server can be pinned to Start using the same procedure.


Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 25, 2023, 05:27:59 PM
I just run the compiled versions of your script and my script at startup.
My guess is that most users that would be running your script regularly would want to do the same.

But I can test it if you want me to.
Title: Re: GV Outbound Calls After EOL
Post by: Taoman on June 25, 2023, 05:34:12 PM
Quote from: Pnay on June 14, 2023, 09:52:47 AMWhy is this necessary? Won't Google Voice on Obi still work for outbound and inbound after EOL until Google breaks something?

Correct. But don't you think it's prudent to have an alternate solution already tested and in place?

You should try azrobert's script (if you have a Callentric $1/month DID). It is quite slick. And the edit you would need to make on your OBi won't interfere with your existing configuration.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on June 26, 2023, 08:41:24 AM
Quote from: Taoman on June 25, 2023, 05:27:59 PMBut I can test it if you want me to.

You don't have to test the batch file. I know it works. I had nothing to do one afternoon and came up with the idea. The original version only had 2 lines of code. I added a loop, so you don't have to start it every time you make a call. The rational was that you basically need an OBi device to run GV_Server. The only other way I know to generate a URL with parms is with SipSorcery and probably FreePBX/Asterisk. These are both overkill. The batch file can be used with any ATA.
Title: Re: GV Outbound Calls After EOL
Post by: NKYadav on August 16, 2023, 12:21:50 PM
A lot of reading and figuring out how I want to provision my pair of Obi200s due to the upcoming EoL.

Thank you @azrobat for all the hard work you've been putting into these scripts to make this so much easier to manage, I was about to go crazy trying to figure out how I would be able to locally manage these as at least one is not going to be in my own home to begin with.

If the current set up on that device ever breaks, I like having this as a backup, as Taoman mentions.
Title: Re: GV Outbound Calls After EOL
Post by: unmesh on October 12, 2023, 04:05:10 PM
Quote from: Taoman on June 25, 2023, 05:34:12 PM
Quote from: Pnay on June 14, 2023, 09:52:47 AMWhy is this necessary? Won't Google Voice on Obi still work for outbound and inbound after EOL until Google breaks something?

Correct. But don't you think it's prudent to have an alternate solution already tested and in place?

You should try azrobert's script (if you have a Callentric $1/month DID). It is quite slick. And the edit you would need to make on your OBi won't interfere with your existing configuration.
My Mom uses her Obi200 with GV primarily as a way for her LifeLine fall detection device to call the service center in case she falls. They then call her back to see if she needs 3rd party assistance.

Will the callback methodology work for this application or should I plan to set her up with some other outbound calling service, avoiding GV altogether?
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on November 04, 2023, 02:11:56 PM
I don't understand the connection between this "script" that runs in a PC and a ATA??
Someone enlighten me?

Also, why would one direction of calls work and the other not unless something/someone is blocking them??
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on November 06, 2023, 05:33:25 AM
The script is triggered by a URL. The URL also passes the outbound number to the script. The OBi generates the URL using a hack of the Auto Provisioning feature.

I don't understand your 2nd question.

If you want to try the script, I suggest using V2:
https://www.obitalk.com/forum/index.php?msg=114020
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on November 06, 2023, 05:46:42 AM
Sorry;
inbound vs outbound calls.

Most, or all of this is well over my head. Do you have to have your PC on 24/7 to get this "GV Server" (if that is what this is) script to work??  :(
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on November 06, 2023, 06:29:18 AM
Do you have a Non-GV SIP phone number?

Assuming after EOL, GV doesn't work on OBi devices. You can receive GV inbound calls on your OBi by defining that number as a GV forwarding number and registering it on the OBi. People have done this to get CallerID Name and there are several topics on OBiTalk with setup instructions. My script covers outbound GV calls.
Title: Re: GV Outbound Calls After EOL
Post by: azrobert on November 06, 2023, 06:45:05 AM
I didn't answer the 2nd part of your question.

You don't need your computer on to receive inbound calls. You do need it on with the script running to make outbound calls.
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on November 06, 2023, 06:51:13 AM
Yes, it's with Phone Power (formally Broadvoice) but they refuse to support (help) ObiTalk customers self provisioning them themselves, stating they will provision the ATA from their end, but it will lock out the 2nd port (GV).
From ObiTalks website;

QuoteOBi200, OBi202 and OBi212 devices registered prior to the End of Engineering Support date won't be able to be provisioned via OBiTALK after the December 18, 2023 and can only be managed and provisioned locally (manually).[/qoute]

Title: Re: GV Outbound Calls After EOL
Post by: videobruce on November 06, 2023, 06:54:55 AM
Quote from: azrobert on November 06, 2023, 06:45:05 AMI didn't answer the 2nd part of your question.

You don't need your computer on to receive inbound calls. You do need it on with the script running to make outbound calls.
Then that makes it a non starter for me. I have never left PC's on 24/7 or even 12/7 in the past almost 25 years, too much of a power hog!  

But, thanks for the clarification.  :)
Title: Re: GV Outbound Calls After EOL
Post by: AClaborn on March 10, 2024, 06:22:43 AM
Quote from: videobruce on November 06, 2023, 06:51:13 AMYes, it's with Phone Power (formally Broadvoice) but they refuse to support (help) ObiTalk customers self provisioning them themselves, stating they will provision the ATA from their end, but it will lock out the 2nd port (GV).

Fully aware this is an older post, but wanted to provide some information regarding PhonePower for videobruce or anyone else utilizing or considering PhonePower.

In 2014, we signed up for an account with PhonePower using the OBiLite package which was ~ $35/year for 911 service and to have an alternative to GV as Google was ending support for some XMPP services, which might impact the ability to use GV+OBi devices.

The PhonePower service was quite decent for years.  The PhonePower customer service (billing and technical support) was also very decent - effective, responsive, and proficient at correcting issues or answering questions.

In early 2019, PhonePower changed the billing parameters to collect taxes for their services, including the OBi packages.  Not a huge issue.  But the billing rate for us jumped approximately 30% from ~ $35/year to ~ $45/year.

Later in 2019 and early in 2020, we contacted PhonePower support several times regarding some technical issues, ranging from connectivity issues on PhonePower's side of things to outright removal of PhonePower features that we were using (specifically, Incoming Call Manager or ICM).  There were large delays in their responses - we had to follow-up several times to even get the issues "acknowledged".  Few issues were solved.  After waiting nearly a year for an update on ICM, we contacted support again and were told, " Incoming Call Manager [ICM] [...is a ...] feature is no longer working and there is no estimated time of repair."  We issued one final ticket to request at least an ETA on restoration of ICM or that we would not renew. Months later, we had still received no response from PhonePower.  We checked other user forums and saw similar experiences from current or former PhonePower customers.  So, we cancelled our PhonePower services. 

Can't recall when, but PhonePower eventually got delisted from the OBiTalk "Approved Service Providers" in the dashboard portal as well.

As for replacement providers, thankfully there were and are better quality, feature- rich, price competitive alternatives.

We'd recommend:
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on March 10, 2024, 06:43:54 AM
Thanks for the above. Yes, PP is surely not Broadvoice when they also were consumer. There is a "Broadvoice" now, but it is only commercial (AFAIK).

I took a look in obitalk's web site and PP is listed at least for the Obi202 adapters;

"Configure Service Provider Accounts
Please Choose Your Service Provider:
    Anveo
    Asterisk Compatible System
    Broadvox
    Callcentric
    Engin
    flowroute
    freephoneline
    Google Voice
    InPhonex
    ippi
    Localphone
    OneSuite
    Phonepower
    RealCalls
    RingCentral
    T38Fax
    Telecube
    Twilio
    Vitelity
    voip.ms
    VoIP2Go
    VOIPo
    Vonage"


When you say "we'd", just who are 'we'?
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on March 10, 2024, 06:47:31 AM
And as far as outbound calls using GV, I haven't had a problem to date (knock on wood).  ;)
Title: Re: GV Outbound Calls After EOL
Post by: AClaborn on March 10, 2024, 11:11:13 AM
Quote from: videobruce on March 10, 2024, 06:43:54 AMI took a look in obitalk's web site and PP is listed at least for the Obi202 adapters;

Sorry for the confusion.

That statement pertained to the "Approved Service Providers" section.  PhonePower was listed there at one time.  It's no longer there (see screenshot). 

(https://i.imgur.com/0uMJqKN.jpeg)

PhonePower is still listed in the "Compatible Service Providers" section, but so are many providers that wouldn't get a "recommend" these days.

Edited the previous post to better reflect that.
Title: Re: GV Outbound Calls After EOL
Post by: videobruce on March 11, 2024, 04:42:12 AM
Ok, understood. There is a difference.