GithubHelp home page GithubHelp logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
Nadu, 
The phoneType field actually is a number referring to Google's internal 
phoneType.

1) Home
2) Mobile
3) Work
7) Gizmo

It references the type of phone with which you are calling - not the 
destination 
phone.

If you replaced

 voice.call(originNumber, destinationNumber, "Mobile");

with

 voice.call(originNumber, destinationNumber, "2");

then your code should work.  If you access the Phone object corresponding to 
the 
number you are callng with you can pull out the phoneType.  

Phone[] phoneAr = voice.getSettings.getPhones();

int i = {whatever};

int phoneTypeInt = phoneAr[i].getType();


and finally plug it back in.

voice.call(originNumber, destinationNumber, String.valueOf(phoneTypeInt));

I hope this helps.  Definitely look into the Phone objects if you are still 
confused 
at all.  I think we could rework the code to make things easier.

-JM

Original comment by [email protected] on 3 Apr 2010 at 8:56

  • Changed state: Accepted
  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
[deleted comment]

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
I am receiving the following when I run the attached file:
Login success - auth token received.
Login success - auth token received.
[id=9;number=+1xxxxxxxxxx;name=Gizmo 
Home;carrier=;type=7;verified=true;enabled=true;formattedNumber=(xxx) 
xxx-xxxx;, 
id=12;number=+1xxxxxxxxxx;name=iPhone;carrier=;type=2;verified=true;enabled=true
;formattedNumber=(xxx) 
xxx-xxxx;]
{"ok":false,"data":{"code":20}}

google-voice-java:
google-voice-java-1.4.jar
Java:
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) Client VM (build 14.3-b01-101, mixed mode, sharing)
OS: 
ProductName:    Mac OS X
ProductVersion: 10.6.3
BuildVersion:   10D573

Original comment by [email protected] on 4 Apr 2010 at 3:12

Attachments:

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
Kevin,
I tested your script and it worked fine for me.  I am assuming your origin 
number was 
your cell phone since you used phoneType = 2?  

The key result is this: {"ok":false,"data":{"code":20}}  That is Google's 
response to 
your call attempt.

When I ran the code I got {"ok":true,"data":{"code":0}}

0 must be a success.  I do not know exactly what code 20 means.  That would be 
something nice to find out.  I think you may have set something incorrectly 
rather 
than it being a problem with the API, but given phone number/password 
constraints 
here it is a little challenging to diagnose your problem.

Good Luck and if you have a good guess as to what code 20 is let us know.

Original comment by [email protected] on 7 Apr 2010 at 6:42

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024

Original comment by [email protected] on 20 Apr 2010 at 4:57

  • Changed state: Invalid

from google-voice-java.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 24, 2024
hi malone,

i am using it in android. i got successful msg like 
{"ok":true,"data":{"code":0}},

then nothing happened. what can i make call from mobile?

Original comment by [email protected] on 7 Apr 2012 at 6:03

from google-voice-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.