GTalk2VoIP Application Programmer's Interface (API)

This API is to be used by authorized GTalk2VoIP partners only. Unauthosized use is prohibited!

1. Our partners can use GTalk2VoIP system to subscribe, setup and configure VoIM users to be used with their SIP and other services. All requests to such API could be made over HTTPS protocol.

2. All users and partners are encouraged to use powerful GTalk2VoIP callback tool to set up mutli-channel (two, three or more participants) conferencing calls with any mixture or PSTN, Google Talk, MSN, Yahoo or SIP legs. Callback requests are made over XMPP protocol as a simple text IM message.

Format of the HTTPS request to the API is the following:

https://www.gtalk2voip.com/api.cgi?partnerid=PARTNERID&nonce=NONCE&md5digest=MD5DIGEST&cmd=CMD&...&...

Where:

  • PARTNERID - Some alpha-numeric identifier of the Pertner. To obtain partnerid please contact us (see Contact Us)
  • NONCE - A randomly generated text string used in partner authentication mechanism.
  • MD5DIGEST - An MD5 digest calculated by Partner to pass authentication.
  • CMD - A performing command identifier, see below.

Partner Authentication Mechanism

To pass authentication you will have to calculate MD5 digest of the following:

  • Generate a random string named NONCE which you will then send in your request as a nonce.
  • Produce an auth string as a concatination of your partnetid, password and nonce separated by ':' sign.
  • Compute MD5 digest on the auth string.
  • Translate the digest into hex format and us it to fill md5digest string in your requests.

Perl5 example:

use Digest::MD5;

sub gtalk2voip_auth {
	($partner_id, $partner_password) = @_;

	$nonce = int rand(10000) . int rand(1000);
	$ctx = Digest::MD5->new();
	$ctx = $ctx->add("$partner_id:$partner_password:$nonce");
	$md5digest = $ctx->hexdigest;
	return ($nonce, $md5digest);
}

	

Available commands

  • cmd=subscribe - to subscribe a new VoIM user to gtalk2voip service. The following extra parameters must be sent in HTTPS request:
    • jid must contain a valid Instant Messenger identifier of the user you are going to subscribe, like someuser@hotmail.com
    • type must specify an IM system type the user belongs to. Valid values are: gtalk, jabber, msn and yahoo.

  • cmd=addcontact - to add a new contact to user's roster. This method is available for Google Talk users only. The following extra parameters must be sent in HTTPS request:
    • jid must contain a valid Instant Messenger identifier of the user to whose roster you are going to add new contact.
    • type must specify a new contact type. Valid values are: phone - a E.164 phone number, sipuri - a valid SIP URI, like someuser@sipprovider.com.
    • contact must contain a new contact you want to add (phone number or SIP URI).

  • cmd=setsip - to set up SIP parameters. The following extra parameters must be sent in HTTPS request:
    • jid must contain a valid Instant Messenger identifier of the user you are going setup SIP settings to.
    • sip_login must specify username which will be used to log into SIP proxy.
    • sip_password must specify a password for SIP login name.
    • sip_host must specify a SIP proxy host name.
    • sip_port must specify a SIP proxy port address.
    • sip_techprefix must specify a technical prefix which will be prepended to destination address. Usually a + sign.
Calling software

We accept credit cards