Placing a simple call

215 views
Skip to first unread message

Jacob Isreal

unread,
Feb 2, 2012, 5:33:48 PM2/2/12
to google-v...@googlegroups.com
Hi guys,

I am new to all this, but I need to make Google Voice connect me to a static number a couple times a month.
All I need is a program that I can run from a command line that will dial the static hard-coded number and connect me.  I can schedule it using task scheduler or something like that.

I am not a Java programmer, but I have knowledge of Java and some other programming languages.  If someone could really help me out I'd appreciate it.

Thanks,

Jacob

Tobias Eisentrager

unread,
Feb 3, 2012, 4:36:06 AM2/3/12
to google-v...@googlegroups.com
Hello Jacob,

It's pretty simple. Please review the Test.java class -  http://code.google.com/p/google-voice-java/source/browse/trunk/src/test/test.java 

Start with your main method:
public static void main(String[] args){
//test.java shows you how to create the Voice object on line 73l
String userName = "us...@gmail.com";
String pass = "secr3tPassw0rt";
Voice voice = new Voice(userName, pass,"GoogleVoiceJava",true,Voice.GOOGLE); 

//Once you have the Voice object you can use the call method to place a call. You can find this method in the Voice.java class on line 900
String originNumber = "5557891234";
String destinationNumber = "5557895678";
String phoneType = "1";
voice.call( originNumber, destinationNumber, phoneType);
 
}

Please let me know if it works out.

Toby

--
You received this message because you are subscribed to the Google Groups "Google Voice Java" group.
To post to this group, send email to google-v...@googlegroups.com.
To unsubscribe from this group, send email to google-voice-j...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-voice-java?hl=en.

Jacob Isreal

unread,
Feb 3, 2012, 5:55:50 AM2/3/12
to google-v...@googlegroups.com
This was helpful.  So, if I'm just going to use a text editor and create this program, how would I import the API at the beginning of the program so I can call the classes?  It seems like something that should be really simple, but I haven't actually written and compiled a java app before.  I would just want to call the jar in a commandline with the options to dial hard-coded or specified as parameters.

Jacob Isreal

unread,
Feb 3, 2012, 5:56:23 AM2/3/12
to google-v...@googlegroups.com
I'm not real sure about classpaths and all that.  

Jacob Isreal

unread,
Feb 5, 2012, 12:16:05 AM2/5/12
to google-v...@googlegroups.com

I cant pay for friendly help.  A couple of people asked me to pay.  I just wanna dial a number guys. How?

C. Howard

unread,
Feb 5, 2012, 2:23:33 PM2/5/12
to google-v...@googlegroups.com
Jacob,

I don't think your question (how to compile and run a java program) is a good one for this forum. If you need help getting a quick start in java there are many resources available on the web to do so. Java itself has a quick start tutorial.

However I don't think very many people here are going to teach you how to do that.

Sorry

Chris
"I rather be hated for who I am than to be loved for who I'm not." 
"If you think I'm talking about you...I probably am." ~Chow

Jacob Isreal

unread,
Feb 5, 2012, 3:43:16 PM2/5/12
to google-v...@googlegroups.com
Then what's the point of having a group of developers in here for the API when no one can tell me how to use it?  The python API isn't working for me, so I thought I'd try java.

So if there's someone here who wants to take the 5 minutes that it would obviously take to write the code for me and send me the jar file, I'd appreciate it and give you credit.

Jeesh.

Jason Shaw

unread,
Feb 5, 2012, 4:23:43 PM2/5/12
to google-v...@googlegroups.com
Jacob,


Sure. I'll help you. Then if you want, maybe I could do a couple loads
of laundry for you and get dinner going.

The problem you're having isn't related to the library, which is the
focus of this forum. It's your lack of knowledge of Java and at the
simplest level at that. Helping others with Java isn't the point of
this group. Try a Java group for that.

Did you try Googling "Java class path"? What about entering "javac
-help" at the command and looking at the -classpath flag? Or maybe see
how one would enter a class path in Eclipse.

Maybe this Wikipedia entry, which was the first to show up in a Google
search, will help.

http://en.wikipedia.org/wiki/Classpath_(Java)

And sorry if I'm sounding like a jerk, but it doesn't really sound
like you're trying to help yourself and you just want someone to do
the work for you. Maybe if you had said, "I've got the library in path
A, my class path set as foo, and I keep getting the error message 'foo
bar'" people would be more likely to help you.


Jason

Reply all
Reply to author
Forward
0 new messages