MOM Messages and Topics
These are the topics and their messages used in OAProject for inter-application comunication. The main comunication pattern used is publish/subscribe.
SSO
Topic for user login and logout. The WEB-SSO module publishes login and logout messages to the SSO topic, the end-user applications are subscribed to that topic so they can insert the information in their own session database.
login
<login id="unique_user_id" sid="valid_user_session_id" gid="unique_group_id"/>
- Purpose
- To inform that a user has logged in the system.
- Intended
- Applications receiving a login message will add the valid_user_session_id in their own sessions mechanism, if present.
- Applications that don't use sessions will change the status of the unique_user_id to "logged" status.
- Parameters and attributes
- id: the unique identifier for the user throughout the platform.
- sid: the OAprojectID cookie's value sent to the user's web browser. The default name of this cookie is "OApSSO".
- Sample
<login id="john" sid="092jlq0qwle009JO9ipjoijPI3EF432" gid="47"/>
logout
<logout id="unique_user_id" sid=["*"|"valid_user_session_id"] gid="unique_group_id"/>
- Purpose
- To inform that a unique_user_id has logged out the system or a valid_user_session_id has expired.
- Intended
- Applications should delete the session record for the valid_user_session_id.
- Applications should delete all session records for a unique_user_id.
- Parameters and attributes
- unique_user_id: is the unique identifier for the user throughout the platform.
- valid_session_user_id: if sid logs out this session id and if "*" logs out from every session for that user.
- Samples
<logout id="john" sid="*" gid="47"/>
<logout id="john" sid="092jlq0qwle009JO9ipjoijPI3EF432" gid="47"/>
IMS
Topic that will hold the messages generated by the IMS. The Identity Management System will publish messages to that topic in order for the applications to start provisioning users and applications and their bindings.
adduser
<adduser id="unique_user_id" gid="unique_group_id">
<name>common name</name>
<surname>surname</surname>
<email>email</email>
<telephone>telephone</telephone>
<mobile>mobile</mobile>
<applications>
<app id="application_id">
<param name="parameter_name">parameter_value</param>
...
</app>
...
</applications>
</adduser>
- Purpose
- New user information to record in specified applications.
- Intended
- The application identified by the application_id receiving an adduser message will insert the user in its own user database with the settings defined as parameters. If multi-instance, the application will use the gid to fit the user in the proper group.
- If the user_id already exists, the message will be considered as an update message.
- If the gid does not match with any group instance of the application, the message will be discarded.
- If there is no application_id record in the adduser message that matches the own application id, the message will be discarded.
- Parameters and attributes
- unique_user_id: the users' unique identifier.
- gid: the group identifier for that user.
- application_id: the unique application identifier.
- parameter_name: name of the parameter to setup for the user.
- parameter_value: value for that parameter.
- Sample
<adduser id="john" gid="2100"> <name>User Demo</name> <surname>Demo</surname> <email>demo@oaproject.net</email> <telephone>999999999</telephone> <mobile>600000000</mobile> <applications> <app id="CRM"> <param name="language">English</param> <param name="role">User</param> </app> </applications> </adduser>
deluser
<deluser id="unique_user_id">
<gid>unique_group_id</gid>
<applications>
<app id="application_id"/>
...
</applications>
</deluser>
- Purpose
- To remove a user from the specified applications.
- Intended
- The application identified by the application_id receiving a deluser message will remove the user from its own user database.
- If the user_id does not exist, the message will be discarded.
- If there is no application_id record in the adduser message that matches the own application id, the message will be discarded.
- Parameters and attributes
- unique_user_id: the unique user identifier.
- application_id: the application id to delete the user from.
- Sample
<deluser id="john"> <gid>2100</gid> <applications> <app id="CRM"/> <app id="ASTERISK"/> </applications> </deluser>
install
<install id="unique_group_id">
<applications>
<app id="application_id">
<param name="parameter_name">parameter_value</param>
...
</app>
...
</applications>
</install>
- Purpose
- To install a new application instance. Each instance belongs to a unique group.
- The install message is issued by the group admin whenever engaging an actual application.
- Intended
- The application identified by the application_id receiving an install message will create a new instance of the application. The means by which the instantiation will be satisfied, either automatically or manually, depends on the application adapter.
- The installed application should publish an installresponse message that has to state the installation end status.
- If the user_id already exists, the message will be considered as an update message.
- If the application instance already exists, the message will be considered as an update message.
- Parameters and attributes
- unique_group_id: unique group id.
- application_id: the unique application identifier.
- parameter_name: name of the parameter to setup the instantiation.
- parameter_value: value for that parameter.
- Sample
<install id="49"> <applications> <app id="CRM"> <param name="logo">Demo_Company_Logo.gif</param> <param name="theme">default</param> <param name="language">English</param> </app> <app id="ASTERISK"> <param name="pbx">49</param> <param name="extension">491</param> </app> </applications> </install>
addgroup
<addgroup id="unique_group_id">
<groupname>group name</groupname>
<adminuser id="unique_user_id">
<name>common name</name>
<givenname>givenname</givenname>
<surname>surname</surname>
<email>email</email>
<telephone>telephone</telephone>
<mobile>mobile</mobile>
<password>password</password>
</adminuser>
</addgroup>
- Purpose
- Used to create a new group.
- Intended
- Create a new group. It includes group data and that group's administrator data.
- Parameters and attributes
- id: unique group identifier.
- groupname: the name of the group.
- adminuser: information related to the administrator user.
- Sample
<addgroup id="49"> <groupname>Company name</groupname> <adminuser id="john"> <name>John</name> <givenname>john</givenname> <surname>Smith</surname> <email>john@johnrules.com</email> <telephone>555491</telephone> <mobile></mobile> <password>secret</password> </adminuser> </addgroup>
delgroup
<delgroup id="unique_group_id"/>
- Purpose
- Used to delete a group.
- Intended
- Delete a group.
- Parameters and attributes
- id: unique group identifier.
- Sample
<delgroup id="49"/>
ASTERISK
incomingcall
<incomingcall cid="call_id" [uid="unique_user_id"|gid="unique_group_id"] hops="number_of_hops">
caller_id
</incomingcall>
- Purpose
- Information about an incoming call.
- Intended
- The application (i.e a CRM) should search the caller_id in the customers database and send a popup message to the Notifier in order to inform the end user about the incoming call.
- The application should record the incoming call in their actions database.
- Parameters and attributes
- cid: the call identification, a unique number that identifies the call.
- uid: unique user identifier, issued when the incoming call is directed to a person.
- gid: unique group identifier, when the pbx sends the incoming call to every user in the platform.
- hops: if the incomingcall times out, the pbx redirects the call to another extension, in that case there's another incoming call issued and hops is incremented by one.
- caller_id: the telephone number of the caller.
- Sample
<incomingcall cid="23982903892" uid="600129933190" hops="0">937739922</incomingcall>
redirectcall
<redirectcall cid="call_id" id="unique_user_id" fromid="unique_user_id">
caller_id
</redirectcall>
- Purpose
- When a call is forwarded between users, a redirectcall is issued, stating de original user id and the current one.
- Intended
- The application (i.e a CRM) should search the caller_id in the customers database and send a popup message to the Notifier in order to inform the end user about the forwarded call.
- The application (i.e the CRM) should record de forwarded call in its database.
- Parameters and attributes
- cid: the call identification, a unique number that identifies the call.
- uid: unique user identifier of the recipient of the forwarded call.
- fromid: unique user identifier of the forwarder.
- caller_id: the telephone number of the caller.
- Sample
<redirectcall cid="23982903892" uid="jim" fromid="john">555492</redirectcall>
answer
<answer cid="call_id" id="unique_user_id"/>
- Purpose
- Message issued when a call is answered.
- Intended
- When an answer message is received, the application (i.e the CRM) should log that entry in its database.
- Parameters and attributes
- cid: the call identification, a unique number that identifies the call.
- id: unique user identifier of the people that has answered the call.
- Sample
<answer cid="23982903892" id="john"/>
hangup
<hangup cid="call_id" id="unique_user_id"/>
- Purpose
- Message issued when a call is hang up.
- Intended
- When hangup message is received, the application (i.e the CRM) should log that entry in its database.
- Parameters and attributes
- cid: the call identification, a unique number that identifies the call.
- id: unique user identifier of the people that has answered the call.
- Sample
<hangup cid="23982903892" id="john"/>
voicemailbox
<voicemailbox id="unique_user_id">message_count</voicemailbox>
- Purpose
- Inform about pending voice mailbox messages.
- Intended
- The CRM should send a popup message to the Desktop notifier in order to inform the end user about the pending voice mailbox messages.
- Parameters and attributes
- id: unique user identifier.
- message_count: the number of messages pending.
- Sample
<voicemailbox id="john">3</voicemailbox>
ALL
These are messages than can be found in all applications topics, since every application may generate them.
dial
<dial id="unique_user_id">destination_telephone_number</dial>
- Purpose
- Message to ask a PBX to dial in the number provided.
- Intended
- The PBX should call the destination_telephone_number and connect it to the extension of the unique_user_id.
- Parameters and attributes
- unique_user_id: unique user identifier.
- destination_telephone_number: the destination number.
- Sample
<dial id="john">555492</dial>
popup
<popup id="unique_user_id">
<message url="url">text</message>
</popup>
- Purpose
- Notification of an event.
- Intended
- The OA notify service should display a message for the unique_user_id with the text "text" and the url specified.
- Parameters and attributes
- unique_user_id: unique user identifier.
- url: uniform resource locator.
- text: information message.
- Sample
<popup id="john"> <message url="http://www.oaproject.net/crm/id=3428342234"> New call from Digital Services Corp </message> </popup>
popupclear
<popupclear id="unique_user_id"/>
- Purpose
- Clear the popup window for a user.
- Intended
- The OA notify service should clean the displayed messages.
- Parameters and attributes
- unique_user_id: unique user identifier.
- Sample
<popupclear id="600129933190">
backup
<backup id="unique_group_id">
<applications>
<app id="unique_application_id"/>
</applications>
</backup>
- Purpose
- Used to make a backup copy of an application database and code.
- Intended
- The IMS or a periodic task should issue this message for safety reasons. The resulting copy should be placed somewhere save.
- Parameters and attributes
- unique_group_id: unique group identifier.
- unique_application_id: unique application identifier.
- Sample
<backup id="2100"> <applications> <app id="CRM"/> <app id="WEBMAIL"/> </applications> </backup>
uninstall
<uninstall id="unique_group_id">
<applications>
<app id="unique_application_id"/>
</applications>
</uninstall>
- Purpose
- Used to make delete an instance of an application for a group.
- Intended
- To completely remove the code and database of an application. The deleted copy should become unavailable to the its group.
- Parameters and attributes
- unique_group_id: unique group identifier. Identifies the application owners.
- unique_application_id: unique application identifier. Identifies applications to be deleted.
- Sample
<uninstall id="2100"> <applications> <app id="CRM"/> <app id="WEBMAIL"/> </applications> </uninstall>