Telesocial API allows developers to make phone calls easily. It is an easy way to integrate phones with the Social Web. Actions possible are call, record, blast, and voicemail.
- Developers can manage mobile calling features from social networks to mobile devices.
- For users, Telesocial is like a firewall for your mobile phone number, protecting it from the social web.
- Telesocial can be implemented in any language as it is just a simple REST service over SSL. There are wrappers available for most of the languages like Java, Objective-C PHP, .NET, Ruby, Python etc.
- The most important feature is it does not cost anything. It uses up the users calling minutes for making voice calls. Developers just need to register with an email account and have access to the documentation and samples.
How it Works
Telesocial works by authenticating devices to users using applications. Once authorized, apps can then use mobile devices in a secure and anonymous way and at huge scale.
The relationships that Telesocial manage are the following:
- User — i.e. @Telesocial (Twitter) or 6815841748 (Facebook)
- Device – the person’s phone number(s)
- Network – One of the 9 supported networks (Facebook, Twitter, iOS, Android / Google+, LinkedIn, Box.com, Yammer, Email, Minecraft)
- Application – this is your app that runs on one of the 9 networks (or any of the 9 in combination)
- Operator – the mobile operator for the user’s device (Sprint, Verizon, ATT, TMobile, MatroPCS, etc. all US WIRELESS DOMESTIC 48 STATES). Currently, the service is only available to US based phone numbers.
Demo Application
In this case, we will be building an iphone application that can make phone calls. We will use the Objective-C wrapper for Telesocial API
- Developers must first sign up and get an application key. Then developer needs to create an app using the network specific information. The steps are present at the following link
//sites.telesocial.com/docs/getting-started/signup-add-your-app - Start building your applications, which implement the Telesocial API. Using any of the wrappers for Java, Objective-C etc. or using the REST API for any of the mobile platforms. We will use the Objective-C Wrapper for iOS.
- Create a new XCode Project and Add Core telephony framework and Telesocial SDK into the project
- The ViewController.h file, needs to implement TSRestClientDelegate
@interface ViewController : UIViewController - The ViewController.m file, needs to have
[TSRestClient defaultClient].applicationKey = @”Your_Application_key”;
[TSRestClient defaultClient].serviceUrl = @”https://api.telesocial.com/”;
[TSRestClient defaultClient].delegate = self;
The TSRestClient will give u the client instance to make api calls. The application key is created when you registered for a new application earlier. Setting the delegate to self allows access to the delegate calls. - Register phone numbers with users accounts
[[TSRestClient defaultClient] registerNetworkId:@”id1″ phone:@”1xxxxxxxxxx”];
[[TSRestClient defaultClient] registerNetworkId:@”id2″ phone:@”1xxxxxxxxxx”];
Each phone number to be used will be associated with a unique string id. Each phone number needs to have 1 appended at its beginning of the 10 digit phone number. - Create a talkspace with the a registered user
[[TSRestClient defaultClient] createConferenceWithNetwork:@”id2″ greetingId:nil recordingId:nil];
This will create a talkspace with the phone number associated with id2 which is similar to the host of a conference call. - Add members to the talkspace. Once the talkspace is created members can be added to it. As a best practice, always do this within the delegate method call which ensures that the conference has been created
(void) restClient:(TSRestClient*) client didCreateConferenceId:(NSString*) conferenceIdNowithStatus:(TSStatus*) status - The conference call is started once the talkspace is created and more members are added as the networks are added to the talkspace.
- Hangup the conference call by ending the phone call or by using the API call
– (void) closeConference:(NSString*) conferenceId;
Points to consider while trying the demo application
- Enter the application id created during the registration procedure during step 1 in step 5
- Enter the phone numbers that you will use for calling in step 5 also. I have labelled them in code as phone1 and phone2. Please replace them with exact phone numbers.
- Also, there is a provision for getting back into the app after the phone call begins by tapping on a local notification. The code for it is present in the app delegate.
- The zipped xcode project is attached here Telesocial Social Call Demo Application
Important Sources
- Telesocial API Documentation:
//sites.telesocial.com/docs/ - Telesocial Website:
//telesocial.com - Telesocial API wrappers list:
https://dev.telesocial.com/docs/sdks/ - Telesocial API Objective-C wrapper for iOS
https://github.com/Telesocial/Telesocial-SDK-IOS