What is the URL to make a Google Voice call using

2019-06-27 02:58发布

问题:

I am trying to write a Google Voice app and was wondering if anyone knew the url and post parameters to make a call using the direct access number instead of the ring-back.

回答1:

I did not test it, but check this api: http://code.google.com/p/google-voice-java/

Specially, the voice.java at line 711, which is the method:

public String call(String originNumber, String destinationNumber,
                        String phoneType) throws IOException {

In line 737 they use:

URL callURL = new URL("https://www.google.com/voice/call/connect/");

and the full comments for the methods say:

            // POST /voice/call/connect/ 
            // outgoingNumber=[number to call]
            // &forwardingNumber=[forwarding number]
            // &subscriberNumber=undefined
            // &phoneType=[phone type from google]
            // &remember=0
            // &_rnr_se=[pull from page]

I hope this helps.



回答2:

I don't think there is an official API, but this site seems to have made some progress with the URLs you are after: http://posttopic.com/topic/google-voice-add-on-development , and there is an unofficial API here: http://sourceforge.net/projects/gvoicedotnet/



回答3:

Google Voice does not expose an API to the service however, there are many 3rd party libraries that mock an API by screen scraping via Google Voice's HTML website. I better solution though is to use the google voice service via SIP. Search for "google voice sip asterisk" and you will find out about this. Basically if you install this software called asterisk it can make calls via google voice.

See this article for a start: http://eggie5.com/10-installing-asterisk-on-osx