Best way to associate phone numbers with names - ruby-on-rails

My application stores lots of its users friends' phone numbers. I'd like to allow users to associate names with these phone numbers, but I don't want to make users manually type in names (obviously).
I'm curious what the best overall approach is here, as well as the best way to implement it
Overall approach-wise, I imagine using Gmail / Yahoo / Windows Live contacts is best (the Facebook API doesn't let you access phone numbers), though the gems I've found for interacting with these contacts APIs (this and this) only give you access to the names and email addresses of each contact.

Most people don't have phone numbers in Gmail's contacts.
You can allow to import phone book via vCard or do smth to impot from iPhone/Android
Alternatively, you can write a custom parser for google's phone book or use gData API (not sure if it supports it)

Related

In Twilio how could I get the usage of only active phones

I was just wondering if there is any endpoint in the Twilio API to get the usage filtered by Active Phone Numbers.
I've been going through the docs but can't seem to find a solution other than checking the calls endpoint for each one of the phone numbers in my account which is not ideal.
If I check the usage endpoint and filter by category phone numbers since the account was opened it says I've had 300 phones so far, but I can't seem to find how many of those are active or not.
Updated
Also, is there a way to filter the usage per phone number? For example I'd like to see the usage for a specific phone number but I don't want to call the Calls endpoint I just want the Usage.
Twilio developer evangelist here.
You can check how many currently active phone numbers you have with the Incoming Phone Numbers resource.
I'm afraid there's no way to separate your usage records by phone number within the one account.
However, you can do this by subaccount. If you are trying to measure different users' usage within your system then the best thing to do is to create subaccounts for each of those users. Your main account can still view usage records for all subaccounts, but the subaccounts can also be viewed individually.
Let me know if that helps at all.

Online Data Storage and Transfer with Swift

I am trying to make a series of applications which require the user to make an account and login, therefore they could use the application on multiple devices and have the same data (e.g.. amount of virtual money and player score is about it), however, I have no idea how to go about this, I have decided it would be best for my app not use the apple GameKit (game centre) as it has a lot of limitations (e.g not showing usernames). What methods could I use to do this? Do I need to learn another language
Thank you
You can try Firebase, which serves as a backend especially for mobile applications. Basically, send a kind of a POST request to Firebase when the values you want to store have been changed in your game and send a kind of a GET request to fetch the said values to your mobile app(s). By this way, you can store data on Firebase and fetch it via multiple devices when the same user logs in from different devices.
For more information and a quick start, check this link: https://www.firebase.com/docs/ios/quickstart.html

Address validation form API or Database on iOS?

I'm working on an iOS app where users can purchase products and get them delivered home. Before the actual purchase, the user will have to input his delivery address in the United Kingdom.
For example, the user types in the postcode "SW1A 2AB", and a UIPicker shows up listing the possible matches such as "11 Downing St".
I would like to know if there any ressources or services online (free ideally) to do an address lookup based on a UK postcode that the user will provide on the form. Since the app will be launched in the UK only and products can only be delivered here, I don't have to worry about other kinds of address formats.
It sounds like you are after Postcode to Address lookup which within the UK involves using the Royal Mail Postcode Address File (PAF) which comes with a cost, however is the most reliable source for UK address data. It can be bought as a data file directly from Royal Mail however several APIs also exist, meaning you don't need to worry about storing and updating over 29 million addresses.
I work for Allies Computing who provide a cloud hosted REST based API, which uses Royal Mail's daily updates and can be paid for on a per search basis.
Of course other providers exist offering very similar APIs, Royal Mail's Powered by PAF website has a full list of them.
So long as your application will have access to the internet you can make use of these, although it would be a good idea to present users with a full address form if they don't have internet connection.

How do you retrieve a caller ID from from a digital line or a VOIP phone?

On my work place, we have some (PBX)Business Communications Manager 450 Telephone System and some (PBX)BCM50 also. The BCM450 is hybrid, which mean it can use digital lines and at the same time VOIP phones.
Right now, for example a user can have a Nortel Avaya 1120E or a Nortel T7316 Norstar in their desk.
I would like to know if there is a way in which way I can get the phone number of the caller, so I can use that number on a custom software for the company. In other words I want the phone number of the person calling me (maybe the extension if that is the case).
What I'm looking for, is that when a customer calls, the information associated with the telephone number can be seen on the screen programmatically (without input from system operator).
I can see there is someone talking about TAPI API, but i believe this is only for analog lines? Maybe somebody can put me on the right path or maybe somebody can provide an example of how it is done using any programming language.
If the VOIP phones are SIP based then you'd sniff eth. ports of the phones. SIP messages contains caller Id and called Id.
You can google like "SIP sniffer" for source code example...

Twilio Voice: Tracking a user from website to twilio phone call?

I'm trying to see if this is even possible in twilio. I'm hoping maybe someone's had a similar challenge and came up with a creative solution...
Our company has a unique phone number that's only displayed on our website. I've been asked if it's possible to find out not only how many calls we're getting (which is simple enough to track in twilio), but also who's calling. Basically, they want to follow the details of a users activity. From website to phone call.
Theoretically, they'd like something like this:
A user, lets call him John, comes to the website & is assigned a unique id of "12345". The id is stored in a cookie for returning users (this I can already handle).
If John calls the phone number displayed on the website, we...somehow through the use of twilio...know it's user #12345.
We can then create monthly reports stating user #12345 called the phone number 7 times this month for a total of 18 minutes.
There's so many "what if's" that go into this, that I'm just not sure it's even possible, but perhaps someone knows of a creative way this can work? A few things I've considered, but none of them are foolproof:
Tracking a combination of John's geographical location while browsing the website and the time of web browsing, then using twilio voice to track the geographical location & time of the phone call, to make a best guess. The problem is it sounds like twilio voice isn't always great at providing geo location.
Tracking mobile click to calls on the website, then matching the time of the click to the time of the phone call. Several problems with this, including multiple users calling at the same time, and we'd only be tracking those who browsed the website via mobile, then clicked to call.
For mobile click to call, passing the user's id via a phone extension, which twilio then reads (not sure if this is even possible in twilio). But again, this would be limited to mobile users.
So, I'm just not sure if this is even possible. Any idea's on how this could be implemented?
Thanks so much for any help.
Twilio developer evangelist here.
Have you considered making it possible to make the calls through the website itself? If you implemented Twilio Client you would be able to directly track users who called from the website and they'd be able to do so without picking up the phone too. That direct connection would allow you to make the calls more personal too, as you'd know exactly which user was calling.
Check out the tutorial on implementing browser calls in Twilio and let me know what you think.
I can't think of any straightforward ways to connect a user's browsing session to a phone call made with a different device though. You could ask the user to input their ID in order to start the call, using <Gather> to receive the input and tie that call to the user and whether they currently have a live session on the site. That might be an unnecessary barrier to people calling though, so you'd have to weigh up that option.

Resources