====== setSIPPresence() ====== wrtc.setSIPPresence() is used to publish your current presence status to SIP presence server. ===== Arguments ===== wrtc.setSIPPresence(available, activity, note, timo, raw) * available - boolean, true: telephone available for calls, false: telephone unavailable for calls * activity - string containing activity description according to [[https://tools.ietf.org/html/rfc4480#section-3.2|RFC4480 section 3.2]] * note - string containing free text description * timo - (optional) seconds before status needs to be refreshed * raw - (optional) string containing SIP message header and body (overrules all above arguments) According to [[https://tools.ietf.org/html/rfc4480|RFC4480]] //available// describes if the phone is online or not, not the person's availability. Thus even if status is "away" available is still true as the phone is still online and working. ===== Returns ===== Nothing. ===== Events ===== None. ===== Example ===== wrtc.setSIPPresence(true, "unknown", "") reports you are available for calls. (Yes, [[https://tools.ietf.org/html/rfc4480|RFC4480]] states activity "unknown" is to describe you are available.) wrtc.setSIPPresence(true, "away", "out for lunch, back 13:00") reports you are away from your phone. (Yes, [[https://tools.ietf.org/html/rfc4480|RFC4480]] states it should still be reported as available=true.) wrtc.setSIPPresence(false, "", "") reports you are offline, not available. More complex presence reports can be sent in raw format:\\ wrtc.setSIPPresence(true, “”, “”, 0, “Expires: 3600\r\nContent-Type: application/pidf+xml\r\nEvent: presence\r\nContent-Length: 535\r\n\r\n open On the phone”);