====== presence_publish ====== **{type:'presence_publish', basic:..., activity:..., note:..., expires:..., sipmsg:...}** Publish your own SIP presence status. arguments: * basic - online status: * "open" - client is online * "closed" - client is offline * activity - activity description according to [[https://tools.ietf.org/html/rfc4480#section-3.2|RFC4480 section 3.2]] * note - free text description According to [[https://tools.ietf.org/html/rfc4480|RFC4480]] //basic// describes if the phone is online or not, not the person's availability. Thus even if activity is "away" basic is still true as the phone is still online and working and may eg receive text messages for later display when user has returned. optional arguments: * expires - seconds before status needs to be refreshed * sipmsg - raw SIP message header and body (overrules all other arguments) ====== error ====== **S → C {type:'presence_publish', from:..., error:'404', msg:'Not found'}** If you attempted to publish your presence but are not registered to a SIP account error 404 is returned. ====== example ====== ===== raw message ===== {type:"presence_publish", basic:"open", activity:"", note:"", expires:0, sipmsg:"Expires: 3600\r\n Content-Type: application/pidf+xml\r\nEvent:presence\r\nContent-Length: 535\r\n\r\n open On the phone"}