Closed GoogleCodeExporter closed 8 years ago
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 malone.j...@gmail.com
on 3 Apr 2010 at 8:56
[deleted comment]
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 kevindiffily@gmail.com
on 4 Apr 2010 at 3:12
Attachments:
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 malone.j...@gmail.com
on 7 Apr 2010 at 6:42
Original comment by malone.j...@gmail.com
on 20 Apr 2010 at 4:57
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 themasko...@gmail.com
on 7 Apr 2012 at 6:03
Original issue reported on code.google.com by
narayana...@gmail.com
on 3 Apr 2010 at 2:55