Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding publish in registration functionality, sending "closed" NOTIFY when presense has expired #177

Closed
wants to merge 1 commit into from

Conversation

barabasp
Copy link

The commit contains pua_usrloc modifications, which simplifies the publish and regisration processes: in every REGISTER an implicit publish is built in. In this way, a device e.g. do not need to send two individual request towards kamailio (REGISTER, PUBLISH), it can be achieved in a single but extended REGISTER request.
Another small fix is that if the publication is expired (due to broken TCP e.g.), a "closed" NOTIFY should be sent to the contacts.

@miconda
Copy link
Member

miconda commented Jun 1, 2015

What do you mean by "a single but extended REGISTER request"? Can you give an example of such REGISTER request?

@barabasp
Copy link
Author

barabasp commented Jun 1, 2015

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//pull/177#issuecomment-107355252.

@miconda
Copy link
Member

miconda commented Jun 1, 2015

So this is a custom extension of you, not a standard, right?

If yes, I suggest that you change the patch to export a new function with a new name where the relevant values are given as parameter, without taking anything from the SIP request inside the function, so it becomes generic of what the custom header name is and the format of the header body.

Now you practically disable the rfc version with defines, so it is not going to work anymore for that. The RFC requirements implementation must be always there.

@miconda
Copy link
Member

miconda commented Jun 25, 2015

Is there any interest in following up with this pull request? There was no message for a while answering to my questions and suggestions.

@barabasp
Copy link
Author

I'll check the source soon in next days and will make the proposed changes in it.

@miconda
Copy link
Member

miconda commented Nov 20, 2015

Long time and no follow up. I am closing the pull request for now, because it replaces the standard IETF RFC requirements with some custom approach. The item can be reopen if a patch with suggestions made in comments above is provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants