Closed mndrix closed 7 years ago
It looks like Conversations supports XEP-0172. That's also easy to implement so it could be a good place to start.
XEP-0172: User Nickname
I did a test implementation which generated stanzas like this:
<message
xmlns="jabber:component:accept"
id="ejkw5k6nazxsiggkjnhrkdwoea"
from="+13075551212@sms.example.com"
to="joe@example.com"
type="chat">
<body>First incoming</body>
<nick xmlns="http://jabber.org/protocol/nick">John Doe</nick>
</message>
Despite several variations on the XML and variations in roster status this did not show "John Doe" anywhere in any client I tried.
Before abandoning this XEP, I want to make sure that we're handling subscriptions correctly. Conversations requires mutual subscriptions before displaying nick names. Prosody's roster shows ["subscription"] = "to"
where I would have expected ["subscription"] = "both"
. This suggests that there's more to do related to #13
Now that mutual presence subscriptions are in place (commit 154676d1f93bee3a83ff19ec18e249586456234f), Conversations uses <nick>
for the display name in my tests. Time to add real support for XEP-0172.
At this point, I'm convinced that I can't make progress on this issue until #18 is done.
This is working pretty well in Conversations via XEP-0172 and an external script that does caller ID based on my address books.
I'll leave this issue open as I try to implement some kind of caller ID support for XMPP clients that don't support nicknames.
After using this for a while, results in Conversations have been spotty. Sometimes caller ID works. Sometimes it doesn't. Time to investigate some of the other options. I think XEP-0054 is a good candidate to try next.
Summarizing XEP-0054 vcard-temp:
We add <feature var='vcard-temp'/>
to our list of disco features.
Client requests a vcard:
<iq from='john@example.com/phone'
id='v1'
to='+13075551212@sms.example.com'
type='get'>
<vCard xmlns='vcard-temp'/>
</iq>
sms-over-xmpp responds with the details from caller ID:
<iq from='+13075551212@sms.example.com'
to='john@example.com/phone'
type='result'
id='v1'>
<vCard xmlns='vcard-temp'>
<FN>Susie Sheep</FN>
</vCard>
</iq>
The spec makes some other requirements, but that's the essence.
XEP-0084 User Avatar has no mechanism for providing a user name. We can't use it to support caller ID.
We have pretty good support for caller ID at this point. Future work will be on follow-up issues.
When an SMS arrives, it'd be nice if the server could handle caller ID and pass that info along to the XMPP client. Try using some of the following:
One should be able to write static caller ID into the config file or specify an external script that's executed to generate caller ID info.