transfer chat conversation on Openfire and anonymous login

249 views Asked by At

This will be the 3rd time attempting this question. I figure some stuff out as I go along, and then I get stuck at a different place, but I probably will need help with my final two problems.

I was given a task to create a IM solution for our company that will work with apps like IM+ etc.

A bit of background on what is required:

  • A person will use a IM app on his phone, or our website that will be setup to connect to our server.

  • I wrote a plugin that as soon as somebody connects to the server, a chat session will be initiated with a bot that will ask for some information.

  • After the bot identified the customer, I would like to "transfer" the chat session to a human that will be logged in on the server as well. This is Problem 1 Is it possible to "transfer" a chat session to somebody else?

My second problem is this. Most of the times a customer will not be registered on Openfire as a user. I've allowed for anonymous login on the server, but I can't seem to get it to work. I've downloaded jabber-net client, and the bot is currently using asgXMPP to connect. And if I try to send a null username and password, it does not connect, does not give any errors, nothing.

If anybody can help me out a bit I would appreciate it. I am TOTALLY new to XMPP, and I'm happy with what I've accomplished so far.

Jaques

1

There are 1 answers

2
Kev On BEST ANSWER

I can't really answer questions about how agsXMPP or jabber-net work, but: an anonymous session is not the same as a normal session with no password, it uses a different authentication mechanism (SASL ANONYMOUS), so you'll have to see whether those libraries support it, and how to request they use it.

For transferring chat sessions - there isn't really any sort of 'chat session' going on, it's just a series of messages. In principle you just need to send a stanza to the client asking it to talk to someone else instead of the bot once the bot's done with it. If you want to then forward the conversation history on to the new chat partner there's XEP-0297 that you could usefully apply for this.