64characters / Telephone

SIP softphone for Mac
https://www.64characters.com/telephone
GNU General Public License v3.0
1.09k stars 208 forks source link

Plugin mechanism for contacts #350

Open stephanschuler opened 7 years ago

stephanschuler commented 7 years ago

Hey there.

tl;dr

What about adding a mechanism to provide simple contact information as an alternative data source for searching contacts before dialing or to resolve numbers of incoming calls?

I'm thinking about something HTTP based, since that makes for an easily understandable and wiresharkable protocol.

Are there any chances to introduce something like this to Telephone?

Here's what bothers me.

I'm having a hard time making remote contacts available in the Telephone app. I guess that's all related to the Apple Contacts.app dealing with remote source poorly. But that's clearly something I cannot influence at all.

And as you mentioned earlier, you never payed closer attention to those remote sources. Like having e.g. "Google Mail" contacts or "Exchange" or "LDAP" added to Contacts.app, those might work with Telephone, but chances are they don't.

In my current situation, they work just partially. I think the Contacts.app and its remote source mechanism of contacts is meant to synchronize those, not to live search. Which means my 300 Google Mail contacts work nicely, my 60 Exchange contacts work nicely too, but the nearly 10'000 "Federated Contacts of the Exchange Skype for Business integration" don't.

And on top of that, I'm currently trying to connect an LDAP source of another 6'000 contacts to my Contacts.app, which results in an instant ban of my Active Directory account which is required for authentication in that LDAP scenario.

Here's what I'm dreaming of.

I'm thinking of another type of "Accounts" which is not SIP but Remote Addressbook. Ideally there's only three input fields defining such an account: An URI, a username and a password. The URI would look something like http://my-contacts-server/whatever-service-name?q=%s.

Every search would trigger a simple HTTP request to that URI where %s is replaced by the search term. The response would be a JSON array of results providing at a bare minimum only a display name and some phone numbers for that contact.

Request:

GET /whatever-service-name?q=Ste
Host: my-contacts-server
Authorization: Basic d2lraTpwZWRpYQ==

Response:

[{
    displayName: 'Schuler, Stephan',
    numbers: [
        {phone: '+49 911 53 99 09-0'},
        {phone: '+49 911 53 99 09-something'},
        {fax: '+49 911 53 99 09-99'}
    ]
}, {...}]

Regards, Stephan.

eofster commented 7 years ago

It looks like a nice feature to have, but realistically don’t expect it to come in the near future. There’s a ton of other things that is always asked for and needs to be done first.

At the same time, as part of the call history that I’m implementing right now, I’ll create the new abstraction for the address book matching mechanism. At first there will be only one implementation of it – macOS contacts – but it’s also a step towards having possibly several contact matching implementations that work with different contact data sources.