Normally, the REGISTER and PUBLISH are sent separately. In our solution, it is not needed, we should send only a „single” REGISTER with some „publish info”. A custom SIP header (PresenceInReg) is defined in REGISTER which contains the presence information. Here is an example:
REGISTER sips:example.com:443 SIP/2.0 Via: SIP/2.0/TLS 192.168.1.100;branch=z9hG4bK-524287-1---ec449f7fc5b0af2a;rport Max-Forwards: 70 PresenceInReg: device;open;<status><state>online</state><message>normal</message></status> Contact: sip:1111111111@192.168.1.100;transport=tls;+sip.instance="785722228" To: "Andrea Máté"sips:11111111@sip01.crypttalk.com:443 From: "Andrea Máté"sips:11111111@sip01.crypttalk.com:443;tag=f4a82829 Call-ID: fWmDgP_8wJvQAKTM_b4ajw.. CSeq: 27 REGISTER Expires: 800 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, INFO, MESSAGE, REFER, NOTIFY, SUBSCRIBE, REGISTER Supported: norefersub, replaces, eventlist User-Agent: Example_UA Authorization: Digest username="1975539839",realm="example.com",nonce="VWwOB1VsDNsw7TW7jHJhrpX40TfhJA7t",uri="sips:example.com:443",response="78ab5f7a36c8ddae6f69c5262e240d8b",algorithm=MD5 X-CT-PushInfo: I;iNRvcCqBGqLeprCFaA7P+jrNwg2q+VYZ20FPw3Rv5hU=;hu;Ringing-Ringtone_long.wav,im.wav,ct_autoreject.wav Content-Length: 0
Peter From: Daniel-Constantin Mierla [mailto:notifications@github.com] Sent: Monday, June 1, 2015 10:13 AM To: kamailio/kamailio Cc: Péter Barabás Subject: Re: [kamailio] Adding publish in registration functionality, sending "closed" NOTIFY when presense has expired (#177)
What do you mean by "a single but extended REGISTER request"? Can you give an example of such REGISTER request?
— Reply to this email directly or view it on GitHubhttps://github.com/kamailio/kamailio/pull/177#issuecomment-107355252.
--- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/177#issuecomment-107360743