Messages flow examples (Location)

as1 (application server 1) -is the user name chosen in chapter 1

service1 - this can be freely defined

Server Application requests HS location using IPUI, DM responds using IPUI in the topic.

as1/service1/ipui/02ea651bab/req/position {"msgId":"as1_77","params":{"hs":"02ea651bab","mode":"dps"}
dm1/02ea651bab/as1/service1/res/position {"msgId":"as1_77","payload":{"location":"location_value"},"status":0}
 
optional notification can be sent after response:
 
dm1/02ea651bab/ipui/02ea651bab/noti/posModule/position {"payload":{"hs":"02ea651bab","location":"location_value"}}

Server Application requests HS location using SIP IDENTIFIER, DM responds using SIP IDENTIFIER in the topic

as1/service1/sip_id/3434/req/position {"msgId":"as1_77","params":{"sip_id":"3434","mode":"dps"}
dm1/3434/as1/service1/res/position {"msgId":"as1_77","payload":{"location":"location_value"},"status":0}
 
optional notification can be sent after response:
 
dm1/3434/sip_id/3434/noti/posModule/position {"payload":{"sip_id":"3434","location":"location_value"}}

Other possibilities. Application server sends request as above but responses are as follows:

as1/service1/ipui/02ea651bab/req/position {"msgId":"as1_77","params":{"hs":"02ea651bab","mode":"dps"}
dm1/posModule/as1/service1/res/position {"msgId":"as1_77","payload":{"hs":"02ea651bab","location":"location_value"},"status":0}
as1/service1/sip_id/3434/req/position {"msgId":"as1_77","params":{"sip_id":"3434","mode":"dps"}
dm1/posModule/as1/service1/res/position {"msgId":"as1_77","payload":{"sip_id":"3434","location":"location_value"},"status":0}
as1/service1/ipui/02ea651bab/req/position {"msgId":"as1_77","params":{"hs":"02ea651bab","mode":"dps"}
hs/02ea651bab/as1/service1/res/position {"msgId":"as1_77","payload":{"location":"location_value"},"status":0}
as1/service1/sip_id/3434/req/position {"msgId":"as1_77","params":{"sip_id":"3434","mode":"dps"}
sip_id/3434/as1/service1/res/position {"msgId":"as1_77","payload":{"location":"location_value"},"status":0}

Location details - subscription, publishing, notifications

SUBSCRIPTIONS: External server (here application server as1) subscribes to the broker for chosen topics, few examples below:


listen to all messages sent to the application server from anyone 

+/+/as1/#

listen to all responses from particular module/service, here "posModule" from any device:

+/posModule/as1/#

listen to all responses from "posModule" from chosen DM:

dm1/posModule/as1/#

listen to all responses from "posModule" from any DM but only regarding HS location

+/posModule/as1/service1/res/position

example response:

dm1/posModule/as1/service1/res/position {"msgId":"posMod_2","payload":{"hs":"02ea651bab","location":"location_value"},"status":0}

listen to all responses from any HS (based on IPUI) regarding location, omitting the module (alternative to previous one)

hs/+/as1/service1/res/position

example response, IPUI can be taken from the topic:

hs/02ea651bab/as1/service1/res/position {"msgId":"posMod_2","payload":{"location":"location_value"},"status":0}

listen to all responses from any HS (based on sip user name) regarding location, omitting the module (alternative to previous one)

sip_id/+/as1/service1/res/position

example response, sip user identifier can be taken from the topic:

sip_id/3434/as1/service1/res/position {"msgId":"posMod_2","payload":{"location":"location_value"},"status":0}


PUBLISHING: Server requests location for particular HS:

publishes message using HS ipui:

topic: "as1/service1/ipui/02ea651bab/req/position"
message: {"msgId":"dps_2","params":{"mode":"dps"}
or
message: {"msgId":"dps_2","params":{"hs":"02ea651bab","mode":"dps"}

publishes message using sip user name:

topic: "as1/service1/sip_id/3434/req/position"
message: {"msgId":"posMod_2","params":{"mode":"dps"}
or
message: {"msgId":"posMod_2","params":{"sip_id":"3434","mode":"dps"}


NOTIFICATIONS: Our system can send additionally notification after the response - in case other devices/modules interested. Topic examples:

Name of the DM and IPUI  is a part of topic

dm1/02ea651bab/ipui/02ea651bab/noti/posModule/position

Name of the DM and sip user identifier is a part of topic

dm1/3434/hs/3434/noti/posModule/position