News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

GV Outbound Calls After EOL

Started by azrobert, May 27, 2022, 07:34:55 AM

Previous topic - Next topic

Koby

#20
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.

azrobert

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.


Taoman

#22
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?

azrobert

There are only 2 places where I do a "MouseClick, Left....."
Change both to "MouseClick, Right....."

Taoman

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.

azrobert

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".

Taoman

#26
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.

Taoman

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.

azrobert

Instead of an extra mouseclick, you can try increasing the sleep after the mouseclick, maybe to 500. How fast is your cpu?

Taoman

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.

azrobert

I did some limited testing on an even older I3 than yours. It seems I didn't test enough.

Taoman

#31
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.

azrobert

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.

azrobert

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?

Taoman

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.

Taoman

#35
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.

azrobert

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?

Taoman

#37
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.

No message is associated with this attachment.

azrobert

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.

Taoman

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.