OfflineMessaging

Version 16 (Adrian Georgescu, 10/31/2012 09:34 am) → Version 17/18 (Adrian Georgescu, 11/18/2012 10:13 am)

h1. Offline Message and audio mailbox Storage Application

For this to work, work well, both voice and chat offline messaging must be handled by SylkServer, Asterisk will be dropped.

h2. Approach 1


* Add failure route to OpenSIPS for chat sessions
* SylkServer answers the session in behalf of the called user
* SylkServer sends an automatic answer with 'I am offline but you can type a message'
* Session is automatically kept open for 90 seconds so that remote party has the chance to write something if he did not already before connect
* Session is
closed after 1 minute of inactivity and saved to local history database
* SylkServer detects when targeted user comes online
* Establish
a new session to the user that came online and fake the original caller, deliver the stored messages, hangup and wipe delivered messages

h2. Approach 2: VoiceMail style

* Add failure route to OpenSIPS for chat sessions
* SylkServer answers the session in behalf of the called user
* SylkServer sends an automatic answer with 'I am offline but you can type a message'
* Every time a chat message is received SylkServer sends a
MWI (RFC 3842) PUBLISH is on behalf of the caller to the proxy.
The payload contains both Text-Messages, Text-Messages instead of Voice-Messages (RFC 3458) 3458, sec 6.2).
* When the user comes back online she will subscribe to MWI and learn that she has offline text messages waiting. She can get them by starting a chat session to the URI in the Message-Account field of the MWI payload. Messages from multiple
* When the user fetches all messages SylkServer will terminate the session and send one last PUBLISH indicating that there are no new offline messages.
* SylkServer will provide a single URI for all
users are aggregated inside to fetch messages, the same From header URI will be used to select the appropriate user. This assumes SylkServer is deployed behind a SIP proxy, which a by-design feature of SylkServer.

Things to be clarified:

* What happens if the user has both voice and text messages waiting? Does OpenSIPS aggregate payloads? Do we care? SylkServer can keep publising until the user fetches the offline messages, but Asterisk won't.
* Audio voicemail can be stored like files, using MSRP file pull, the client may fetch them using file transfer sessions

h2. Approach 3: VoiceMail style (refined)

* Add failure route to OpenSIPS for chat sessions
* SylkServer answers the
session using CPIM headers. Blink in behalf of the called user
* SylkServer sends an automatic answer with 'I am offline but you can type a message'
* When the user comes back online she
will save these subscribe to MWI and learn that she has offline text messages waiting. She can get them by starting a chat session to the URI in the local history and render separate tabs from each recipient.
Message-Account field of the MWI payload.
* The SIP client will send this second MWI subscription to himself but with a Sylk-App: offline-messages header to the proxy, which will route that SUBSCRIBE to SylkServer, acting as an endpoint.
* SylkServer sends a MWI (RFC 3842) NOTIFY which payload contains Text-Messages instead of Voice-Messages (RFC 3458, sec 6.2).
*
When the user fetches all messages SylkServer will terminate the session and send one last PUBLISH a NOTIFY indicating that there are no new offline messages messages.
* SylkServer will provide a single URI for all users to fetch messages, the From header URI will be used to select the appropriate user. This assumes SylkServer is deployed behind a SIP proxy, which is a by-design feature of SylkServer.

TODO: Visual voicemail functionality using MSRP pull