Re: SetPresence from PbxApi, usage of "params"
Hi Andreas,
here are the examples of complete JSON messages:
here are the examples of complete JSON messages:
---
This is the message send to change the presence:
{
"api": "PbxApi",
"mt": "SetPresence",
"src": "788f2cc0d2b44a3480cd8b30cc166779",
"sip": "user2",
"activity": "away",
"note": "Lunch break #away #len:13:13 #until:1677602836553"
}
This is what user receives (PresenceUpdated):
{
"mt": "ApiResult",
"api": "com.innovaphone.client",
"provider": "@client",
"consumer": "presencefavourites",
"msg": {
"mt": "PresenceUpdated",
"sip": "user2",
"up": true,
"ep": {
"sip": "user2",
"dn": "User2",
"num": "302",
"email": "user2@someemail.com"
},
"presence": [
{
"contact": "tel:",
"activity": "away",
"note": "Lunch break #away #len:13:13 #until:1677602836553",
"status": "closed",
"displayNote": "Lunch break until 05:47 PM",
"params": {
"away": "",
"len": 13,
"until": 1677602836553
}
},
{
"contact": "im:",
"activity": "",
"status": "open",
"displayNote": "",
"params": {}
}
]
}
}
This is what the backend receives (PresenceUpdate without d at the end):
{
"api": "PbxApi",
"src": "788f2cc0d2b44a3480cd8b30cc166779",
"mt": "PresenceUpdate",
"presence": [
{
"contact": "tel:",
"status": "closed",
"activity": "away",
"note": "Lunch break #away #len:13:13 #until:1677602836553"
},
{
"contact": "im:",
"status": "open"
}
]
}
Best regards
Mladen Topic