Comments (6)
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.
[deleted comment]
from google-voice-java.
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.
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.
Original comment by [email protected]
on 20 Apr 2010 at 4:57
- Changed state: Invalid
from google-voice-java.
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)
- java.io.IOException: Answer did not contain rnr_se! HOT 4
- unread messages ? its not in the right spot HOT 3
- java.lang.VerifyError issue when importing jar file in eclipse HOT 2
- voice.getUnreadSMS doesn't seem to work right
- 2-Step Authentication HOT 3
- Get Authentication Tokens? HOT 2
- IOException returns www.google.com when creating voice object. HOT 4
- Contact does not implement proper equals/hashCode method
- Google Voice API does not support in JDK 1.5.0_18 HOT 1
- Keeps crashing the program
- Is that possible to call any phones in India?
- Patch for /trunk/test/test.java
- If setSmsEnabled(boolean) doesn't correspond to "Receive text messages on this phone" then what does?
- [deleted issue]
- getSMS() returns the orifianl SMS an none of the responses.
- Enhanced Voicemail Methods
- What would be the third argument for the method voice.call
- Null Pointer Exception Error Parsing Contact HOT 1
- The Read-Only SVN URL has a space in it on the Source page
- ClientLogin has been officially deprecated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-voice-java.