You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Messages flow examples (Messaging)

Server Application sends a message using SIP IDENTIFIER in the topic

Server sends Message (sip user identifier)
{"msgId":"1","payload":{"amsgId":"24668","sip_id":"1004","msg":{"server_msg_status":"new","prio":"1","title":{"text":"Message prio 1","color":"02"},"status_icon":"0D","status_text":"accepted","ttl":"10","alert_info":"msg_melody_low","overrule_silencing":"no","vibration":"no","ringtone_volume":"50","presentation_time":"10","deletable":"yes","local_ignore":"yes","body_starter":"Body starter","msg_icon":{"value":"1f"},"body":[{"msg_icon":{"value":"5A","color":"04"}},{"paragraph":{"text":"The message paragraph content","blink":"yes","underline":"no","bold":"no","align":"left","color":"00"}},{"paragraph":{"text":"Paragraph 2 message text","blink":"no","underline":"no","bold":"yes","align":"left","color":"02"}}],"reply_options":[{"option_id":"1","reply":{"text":"Accept"}},{"option_id":"2","reply":{"text":"Decline"}}]}}}

example response:

Example response
{"msgId":"34","payload":{"amsgId":"82641","ipui":"035edb3a92","msg":{"terminal_msg_status":"fullview"},"sip_id":"1004"}}

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.

Server requests HS location (IPUI) and gets response, module omitted
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

Server requests HS location (sip user identifier) and gets the response, module omitted
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:

Server requests HS location (IPUI) and gets response from posModule from dm1
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}
Server requests HS location (sip user identifier) and gets response from particular dm
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}
Server requests HS location (IPUI) and gets response, module omitted
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}
Server requests HS location (sip user identifier) and gets the response, module omitted
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 

Subscription for all messages
+/+/as1/#

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

Subscription for all messages from posModule
+/posModule/as1/#

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

Subscription for all messages from particular module and DM
dm1/posModule/as1/#

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

Subscription for location only
+/posModule/as1/service1/res/position

example response:

Example location 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)

Subscription for location responses - IPUI
hs/+/as1/service1/res/position

example response, IPUI can be taken from the topic:

Example location response
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)

Subscription for location response - sip user name
sip_id/+/as1/service1/res/position

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

Example location response
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:

Request HS location 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:

Request HS location username
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

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

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

Location notification
dm1/3434/hs/3434/noti/posModule/position

Handset in/out of charger example


Server needs to activate the handset in/out of charger notification

Server request in/out of charger info
{"msgId": "hs_status_1004","params": {"sip_id":"1004","hs_status":{"power_status":"on"}}}

example response:

Example response
{"msgId":"hs_status_47102","payload":{"power_status":{"battery_level":"64","charger":"off"},"sip_id":"1004"}}



  • No labels