maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] The One Ring (https://talk.maemo.org/showthread.php?t=41817)

xur17 2010-07-12 23:37

Re: [Announce] The One Ring
 
I was looking into how android calls using google voice, and it appears that they send a request over a data connection to google, and then dial 347-234-5001. This would be a much cleaner way to call, but it doesn't look like this is an exposed api. I might tray sniffing packets to see if I can make any sense of it.

Does anyone have any clue on how this works or anything?

xur17 2010-07-13 01:25

Re: [Announce] The One Ring
 
I am having trouble getting packet sniffing to work... I have tried redirecting traffic from my wireless router to my desktop, but it doesn't seem to be working. Has anyone else had any luck?

The traffic does not seem to be http, so my guess is that it is https...

Edit: I am getting packet captures now, and it definitely is https traffic... This is going to make this a lot more difficult. My phone is actually dialing 916-538-0100

epage 2010-07-13 02:08

Re: [Announce] The One Ring
 
I've not got to much experience with that sort of thing. All I know is at times when my coworkers are debugging our network devices they are using a tool called wireshark.

xur17 2010-07-13 02:56

Re: [Announce] The One Ring
 
Unless we can somehow use a man in the middle attack to figure out what android is doing, the only way to get this to work is to get google to release the api for it.

I posted a message on google's forums. We'll see if it gets us anywhere. Feel free to post in the thread to try and get more attention for it:

http://www.google.com/support/forum/...10fd5e21&hl=en

uvatbc 2010-07-13 06:24

Re: [Announce] The One Ring
 
Wireshark is what I had thought of as well, but unfortunately all gv traffic goes over https. I don't want to waste time trying to hack that. What I thought of instead was to try to understand the html and javascript for the html5 page served up for the iphone. I did this by switching my firefox UA to iphone then saving and pretty printing the javascript. At that point I realized that I don't know enough javascript to continue.

It would be great if the js gurus here can help out.

PS: the code fragment to look for in the js is "tel:" - thats how the js tells the iphone to dial out to a number.

uvatbc 2010-07-13 06:31

Re: [Announce] The One Ring
 
In response to another comment about an API or the lack of it:
As of this moment, all my attempts to contact the Google Voice people have resulted in stonewalling - which to me means they're up to something.
I am guessing here, but I think the API will come at about the same time they decide to publicly make gizmo available again. Since April 1st is the traditional "release" date of many google products, I fear it might only be next year.

xur17 2010-07-13 10:00

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 749883)
Wireshark is what I had thought of as well, but unfortunately all gv traffic goes over https. I don't want to waste time trying to hack that. What I thought of instead was to try to understand the html and javascript for the html5 page served up for the iphone. I did this by switching my firefox UA to iphone then saving and pretty printing the javascript. At that point I realized that I don't know enough javascript to continue.

It would be great if the js gurus here can help out.

PS: the code fragment to look for in the js is "tel:" - thats how the js tells the iphone to dial out to a number.

I take it the iphone html5 page automatically dials out using a similar format, instead of a callback?

uvatbc 2010-07-13 11:57

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 750098)
I take it the iphone html5 page automatically dials out using a similar format, instead of a callback?

When I tried on a freind's iphone, it dialed out. There was no dialback.

This is what I think it does:
It sends a data request to gv which returns it a number to call.
This number is then appended to a "tel:" string.
The js then "opens" that url, and that makes the iphone dial the number given by the gv servers, because iphone safari knows how to handle a tel url.

Otoh, firefox on linux does not know how to handle a tel url and complains about it.

lemmyslender 2010-07-13 13:10

Re: [Announce] The One Ring
 
After reading the last several comments, it sounds interesting and would be cool to get working. However, am I missing something with it?

I would normally use TOR/GV to make a "free" call. In other words, TOR accesses a web page and initiates the call, which then rings my Gizmo5 # (that has free incoming calls), once connected to me it places the call to the other person, thereby giving me a "free" call.

Correct me if I'm wrong, but with Android and IPhone, if they send data, then dial a number, it would use minutes from my calling plan, correct? I guess to me, most of the point of TOR (and DialCentral) is to get "free" calls and sms on my phone. If it ends up dialing a number (which may work better), there is no real advantage to using this (for calls) over just using my phone calling plan.

If you do get this working, I'd ask that at least the option is there for the current setup, "call back".

epage 2010-07-13 13:12

Re: [Announce] The One Ring
 
Quote:

Originally Posted by lemmyslender (Post 750305)
After reading the last several comments, it sounds interesting and would be cool to get working. However, am I missing something with it?

I would normally use TOR/GV to make a "free" call. In other words, TOR accesses a web page and initiates the call, which then rings my Gizmo5 # (that has free incoming calls), once connected to me it places the call to the other person, thereby giving me a "free" call.

Correct me if I'm wrong, but with Android and IPhone, if they send data, then dial a number, it would use minutes from my calling plan, correct? I guess to me, most of the point of TOR (and DialCentral) is to get "free" calls and sms on my phone. If it ends up dialing a number (which may work better), there is no real advantage to using this (for calls) over just using my phone calling plan.

If you do get this working, I'd ask that at least the option is there for the current setup, "call back".

I rely on the free calls so that shouldn't go away. The main use case is I've had brought up is they want to use their cell but want to make sure it appears from their GV account. Not using the callback might be simpler.

uvatbc 2010-07-13 15:02

Re: [Announce] The One Ring
 
Quote:

Originally Posted by epage (Post 750307)
I rely on the free calls so that shouldn't go away. The main use case is I've had brought up is they want to use their cell but want to make sure it appears from their GV account. Not using the callback might be simpler.

I have two reasons for a callout:
1. for me, skype out is free (I have a subscription)
2. gv callbacks are quite flaky when it comes to calling me. it is much better if I am able to cancel a call in some way if the callback doesn't happen. qgvdial handles that by providing a way to cancel. a callout would make it even simpler to cancel.

epage 2010-07-13 15:09

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 750411)
I have two reasons for a callout:
1. for me, skype out is free (I have a subscription)
2. gv callbacks are quite flaky when it comes to calling me. it is much better if I am able to cancel a call in some way if the callback doesn't happen. qgvdial handles that by providing a way to cancel. a callout would make it even simpler to cancel.

That is a good point on canceling and I also have a skype account. I probably should implement canceling for Dialcentral. TOR's lack of it is mainly an artifact of how it interacts with the system (I don't have Hold support working right so TOR blocks calls rather than allowing you to switch)

Though one downside for Skype for me is DTMF doesn't seem to work which means I can't use the call screener but then the Skype voicemail picks it up and they refuse the disable voicemail on my account. My Linux client has voicemail disabled but its weird in terms of how this applies to Maemo 5 which doesn't have voicemail settings. I'm curious what you do for Skype...

grantlowrance 2010-07-13 20:27

Re: [Announce] The One Ring
 
IS there another location to download TOR? The repository seems to be down

epage 2010-07-13 20:35

Re: [Announce] The One Ring
 
Quote:

Originally Posted by grantlowrance (Post 750751)
IS there another location to download TOR? The repository seems to be down

At least the web interface is working
http://repository.maemo.org/extras-t...hy-theonering/

activemind 2010-07-15 01:40

Re: [Announce] The One Ring
 
New error:
(18:18:41) ERROR MainThread.connection: __init__
Traceback (most recent call last):
File "/opt/theonering/lib/util/misc.py", line 48, in wrapper
return func(*args, **kwds)
File "/opt/theonering/lib/connection.py", line 118, in __init__
constants._telepathy_implementation_name_
File "/opt/theonering/lib/tp/conn.py", line 82, in __init__
_Connection.__init__(self, bus_name, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 480, in __init__
self.add_to_connection(conn, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 571, in add_to_connection
self._fallback)
KeyError: "Can't register the object-path handler for '/org/freedesktop/Telepathy/Connection/theonering/gv/myGVAccount': there is already a handler"
(18:18:47) ERROR MainThread.connection: __init__
Traceback (most recent call last):
File "/opt/theonering/lib/util/misc.py", line 48, in wrapper
return func(*args, **kwds)
File "/opt/theonering/lib/connection.py", line 118, in __init__
constants._telepathy_implementation_name_
File "/opt/theonering/lib/tp/conn.py", line 82, in __init__
_Connection.__init__(self, bus_name, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 480, in __init__
self.add_to_connection(conn, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 571, in add_to_connection
self._fallback)
KeyError: "Can't register the object-path handler for '/org/freedesktop/Telepathy/Connection/theonering/gv/myGVAccount': there is already a handler"

And if I remember the sequence of events correctly, this started happening after I added erminig-ng to my n900 which uses the same account. Also, I deleted my GV account thinking of readding it and now it does not even sign in. Looks like an interaction problem, one is creating a handler and the other one rather than reusing, is trying to create a new one?

epage 2010-07-15 01:48

Re: [Announce] The One Ring
 
Quote:

Originally Posted by activemind (Post 752285)
New error:
(18:18:41) ERROR MainThread.connection: __init__
Traceback (most recent call last):
File "/opt/theonering/lib/util/misc.py", line 48, in wrapper
return func(*args, **kwds)
File "/opt/theonering/lib/connection.py", line 118, in __init__
constants._telepathy_implementation_name_
File "/opt/theonering/lib/tp/conn.py", line 82, in __init__
_Connection.__init__(self, bus_name, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 480, in __init__
self.add_to_connection(conn, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 571, in add_to_connection
self._fallback)
KeyError: "Can't register the object-path handler for '/org/freedesktop/Telepathy/Connection/theonering/gv/myGVAccount': there is already a handler"
(18:18:47) ERROR MainThread.connection: __init__
Traceback (most recent call last):
File "/opt/theonering/lib/util/misc.py", line 48, in wrapper
return func(*args, **kwds)
File "/opt/theonering/lib/connection.py", line 118, in __init__
constants._telepathy_implementation_name_
File "/opt/theonering/lib/tp/conn.py", line 82, in __init__
_Connection.__init__(self, bus_name, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 480, in __init__
self.add_to_connection(conn, object_path)
File "/usr/lib/pymodules/python2.5/dbus/service.py", line 571, in add_to_connection
self._fallback)
KeyError: "Can't register the object-path handler for '/org/freedesktop/Telepathy/Connection/theonering/gv/myGVAccount': there is already a handler"

And if I remember the sequence of events correctly, this started happening after I added erminig-ng to my n900 which uses the same account. Also, I deleted my GV account thinking of readding it and now it does not even sign in. Looks like an interaction problem, one is creating a handler and the other one rather than reusing, is trying to create a new one?

This error means that Mission Control (the Connection Manager Manager) lost track of the active TOR connection some how. TOR doesn't know this and can't force it to close. TOR needs to stop and restart to work again. This can be done by rebooting or killing the process.

This happens when a specific Connection Manager is unresponsive when creating connections. I had thought I fixed all cases in TOR but system load can also be a factor. So this might be my fault or might be the systems fault. "They" had done work to make it better with PR1.2 but I've occasionally hit it with TOR and sometimes SIP becomes really bad.

activemind 2010-07-15 01:57

Re: [Announce] The One Ring
 
Well whatever it was, a reboot fixed it! I am connected now.

xur17 2010-07-16 00:53

Re: [Announce] The One Ring
 
I played around with the google voice iphone page, and I could get my phone to dial using it, but I can't figure out any way to get the number that you need to dial (it is obfuscated in javascript). I could post data at this address:
https://www.google.com/voice/m/x?m=c...664411&f=&v=6:

with post content (content removed):
{"gvx":"random-letters-and-numbers-here:thirteennumbershere"}

and then calling the number I got from dialing on android as the outgoing number, I reached 18004664411.

This could definitely work if someone could figure out how to get the outgoing telephone number. Hint: search for "tel:" in the javascript.

qt4eva 2010-07-16 01:36

Re: [Announce] The One Ring
 
If we can't figure out how android does it, can we just do this by dialing our GV# + 4 digits VM pass + 2 + Dial out number?

epage 2010-07-16 01:42

Re: [Announce] The One Ring
 
Quote:

Originally Posted by qt4eva (Post 753435)
If we can't figure out how android does it, can we just do this by dialing our GV# + 4 digits VM pass + 2 + Dial out number?

That is a possibility but am unsure if it fits within the scope of TOR

uvatbc 2010-07-16 01:45

Re: [Announce] The One Ring
 
Quote:

Originally Posted by epage (Post 753437)
That is a possibility but am unsure if it fits within the scope of TOR

However it can be in the scope of DC and qgvdial.
I'll start rnd and update progress.

PS: Actually now that I think about it, wouldn't it be so much better if we had an app that could do what CardKaller does?

uvatbc 2010-07-16 01:50

Re: [Announce] The One Ring
 
I just saw this. Maybe we can use it?

xur17 2010-07-16 01:51

Re: [Announce] The One Ring
 
I used the international calling card program, and it worked fine for google voice calls. It is a little bit annoying to have to wait that long for the call to connect, but it is better than waiting for a callback.

edit: vicar mentioned in the post above was what I was talking about.

epage 2010-07-16 01:56

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 753444)
I just saw this. Maybe we can use it?

Looking at the code, it seems to use the direct dbus api for the phone rather than Telepathy which means no VOIP support.

uvatbc 2010-07-16 02:19

Re: [Announce] The One Ring
 
Quote:

Originally Posted by epage (Post 753448)
Looking at the code, it seems to use the direct dbus api for the phone rather than Telepathy which means no VOIP support.

Which means back to r&d.

techngro 2010-07-18 01:14

Re: [Announce] The One Ring
 
I can't find The One Ring in the app catalog. I do have extras-devel and testing enabled. I can see dial central, but not the One Ring.

Can anyone help me find it plz.

thx

epage 2010-07-18 01:26

Re: [Announce] The One Ring
 
Quote:

Originally Posted by techngro (Post 755371)
I can't find The One Ring in the app catalog. I do have extras-devel and testing enabled. I can see dial central, but not the One Ring.

Can anyone help me find it plz.

thx

Are you searching for "The One Ring" or "Google Voice plugin for Conversations and Calls"?

I figured I would follow the pattern of the other connection managers and give a name that would have some meaning rather than the project's code name.

techngro 2010-07-18 02:25

Re: [Announce] The One Ring
 
LOL. Yeah I was searching for The One Ring. I installed the plugin now. Thx

xur17 2010-07-19 01:43

Re: [Announce] The One Ring
 
I have been playing with the android google voice dialing, and have made some progress. It appears that a request just needs to be made to:

Code:

https://www.google.com/voice/m/x?m=call&n=18004664411&f=&v=6
With a user agent of:

Code:

User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
You should receive a response back that contains access_number as a variable. This is the number that than needs to be dialed to make an outgoing call.

I tried to look through the code for TOR, but I don't know python, and don't even know where to begin looking. I have made some code before that logged into a site, and submitted some post parameters, but I am having some trouble logging into google.

Some help / direction would be great.

uvatbc 2010-07-19 02:38

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 756286)
Some help / direction would be great.

I tried what you tried in my app. It seems that the google servers _DO_ respond with a meaningful answer, however this is what I get:
Code:

{"app_version":6,"x_failure":true,"auth_failure":true}
What you've found is definitely a very big step in the right direction but we need more!
See this line onwards for what I've done.

xur17 2010-07-19 02:45

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 756315)
I tried what you tried in my app. It seems that the google servers _DO_ respond with a meaningful answer, however this is what I get:
Code:

{"app_version":6,"x_failure":true,"auth_failure":true}
What you've found is definitely a very big step in the right direction but we need more!
See this line onwards for what I've done.

When I tried entering the url into my browser (with my useragent set as an iphone), I got that same response. I managed to get a correct response when I used the live http headers extension for firefox, and replayed a recording of dialing the number using the iphone web app.

The post content listed in the Live HTTP Headers extension is:

Code:

{"gvx":"random-letters-and-numbers-here:thirteennumbershere"}
EDIT: I figured out what the post data is. This is the content of the cookie named gvx.

Were you submitting the url as a post request, or a get request?

I can attach the Live HTTP Headers file if that would be helpful.

uvatbc 2010-07-19 03:42

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 756318)
When I tried entering the url into my browser (with my useragent set as an iphone), I got that same response. I managed to get a correct response when I used the live http headers extension for firefox, and replayed a recording of dialing the number using the iphone web app.

The post content listed in the Live HTTP Headers extension is:

Code:

{"gvx":"random-letters-and-numbers-here:thirteennumbershere"}
EDIT: I figured out what the post data is. This is the content of the cookie named gvx.

I installed the Live HTTP headers addon (thanks for the tip).
I concur with your conclusion: gvx comes through as a cookie.
I'll have to investigate a bit more before I can make use of this.

Quote:

Originally Posted by xur17 (Post 756318)
Were you submitting the url as a post request, or a get request?

I've submitted it url as a post.

Quote:

Originally Posted by xur17 (Post 756318)
I can attach the Live HTTP Headers file if that would be helpful.

No no! Please do *not* post those headers.
The live headers contains all the authentication values for your user login. Not a good idea to share on a public forum or even on PM.

I'll look into this in more detail in the next few days. Right now I need to go out. I'll post back on this as soon as I can.

epage 2010-07-19 23:17

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 756286)
I have been playing with the android google voice dialing, and have made some progress. It appears that a request just needs to be made to:

Code:

https://www.google.com/voice/m/x?m=call&n=18004664411&f=&v=6
With a user agent of:

Code:

User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
You should receive a response back that contains access_number as a variable. This is the number that than needs to be dialed to make an outgoing call.

I tried to look through the code for TOR, but I don't know python, and don't even know where to begin looking. I have made some code before that logged into a site, and submitted some post parameters, but I am having some trouble logging into google.

Some help / direction would be great.

Hmm,. I just experimented with this but was getting HTTP Error 400 Bad Request

test_directdial.py
gvoice.py

uvatbc 2010-07-20 01:12

Re: [Announce] The One Ring
 
All right I've reached the stage where I am able to consistently get the access number to dial out to.

See the code starting here to see the type of request that I send out.

See the code here to see how I parse out the response for the access number.

At this point I'm taking a breather while I try to figure out how to dial out using telepathy, because without that, this effort is mostly useless.

xur17 2010-07-20 01:36

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 757348)
All right I've reached the stage where I am able to consistently get the access number to dial out to.

See the code starting here to see the type of request that I send out.

See the code here to see how I parse out the response for the access number.

At this point I'm taking a breather while I try to figure out how to dial out using telepathy, because without that, this effort is mostly useless.

Awesome! This is one of the main things that I really wish I had that android has. Dialing out while in the car is a pain in the neck because I have to wait so long, and click so much to make a call go through.

uvatbc 2010-07-20 02:00

Re: [Announce] The One Ring
 
Quote:

Originally Posted by xur17 (Post 757361)
Awesome! This is one of the main things that I really wish I had that android has. Dialing out while in the car is a pain in the neck because I have to wait so long, and click so much to make a call go through.

I agree about the "number-of-clicks-it-takes-to-dial-out" bit, but I'm not jubilant about my status yet: I don't have a common way to dial out.
On the n900 to dial out via GSM, there is a d-bus "api".
But it is recommended to use telepathy. Why? Because thats "the one way" that works for GSM, skype, and sip on the n900 without any hackiness like talking straight to dbus.

In the last 2 months that I've read and re-read the telepathy documents, I've learnt a lot, but not enough to understand how to dial out without me being the one handling the protocol details.

My hunch is that I will probably have to be content with dialing out using dbus on the n900 - which means no dial out for skype or sip on n900.

PS: On desktop linux and windows, I can dial out using skype - no telepathy involved there.

epage 2010-07-20 02:04

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 757367)
I agree about the "number-of-clicks-it-takes-to-dial-out" bit, but I'm not jubilant about my status yet: I don't have a common way to dial out.
On the n900 to dial out via GSM, there is a d-bus "api".
But it is recommended to use telepathy. Why? Because thats "the one way" that works for GSM, skype, and sip on the n900 without any hackiness like talking straight to dbus.

In the last 2 months that I've read and re-read the telepathy documents, I've learnt a lot, but not enough to understand how to dial out without me being the one handling the protocol details.

My hunch is that I will probably have to be content with dialing out using dbus on the n900 - which means no dial out for skype or sip on n900.

PS: On desktop linux and windows, I can dial out using skype - no telepathy involved there.

Before I've always hunted around on the CM side of things. Today I looked a bit at the client APIs. There is the Approver Interface. Sadly I think the call is already approved before the "Accept"/"Reject" buttons appear.

This means its back to hacking the UI through CM if at all. What I tried before was trying to imitate hitting the "Accept" button. The main problem with this is the Ui has to recognize you've done this. I've only played with this through adding the person and maybe a little bit extra.

I'm at the point of concluding that I don't think its possible. I'm contemplating talking with the Telepathy folk about some possible additions to the Client API to make our job easier.

epage 2010-07-20 02:09

Re: [Announce] The One Ring
 
Quote:

Originally Posted by uvatbc (Post 757348)
See the code starting here to see the type of request that I send out..

Let me see if I get this straight. You are constructing the URL with all of the parameters, sending the cookies through the header (as expected I assume is the normal Qt way of doing cookies), and POSTing the gvx?

uvatbc 2010-07-20 02:21

Re: [Announce] The One Ring
 
Quote:

Originally Posted by epage (Post 757373)
Before I've always hunted around on the CM side of things. Today I looked a bit at the client APIs. There is the Approver Interface. Sadly I think the call is already approved before the "Accept"/"Reject" buttons appear.

Also the call handler are not "required" to listen to approvers... I recall the tp wiki says something to the effect of "client handlers can indicate that they do not need an external approver".
Also when I last tried an approver client, it just did not get *anything* on the n900. I know that it was not a a code fault because it worked well on Ubuntu.

Quote:

Originally Posted by epage (Post 757373)
This means its back to hacking the UI through CM if at all. What I tried before was trying to imitate hitting the "Accept" button. The main problem with this is the Ui has to recognize you've done this. I've only played with this through adding the person and maybe a little bit extra.

I'm at the point of concluding that I don't think its possible. I'm contemplating talking with the Telepathy folk about some possible additions to the Client API to make our job easier.

"me too!!". Here is another post that says it is not possible.

Count me in when you go talking to the telepathy people.
I tried their IRC but it was ghostly silent.

uvatbc 2010-07-20 02:22

Re: [Announce] The One Ring
 
Quote:

Originally Posted by epage (Post 757377)
Let me see if I get this straight. You are constructing the URL with all of the parameters, sending the cookies through the header (as expected I assume is the normal Qt way of doing cookies), and POSTing the gvx?

Yes, yes and yes.


All times are GMT. The time now is 00:15.

vBulletin® Version 3.8.8