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-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 04:21.

vBulletin® Version 3.8.8