opentelecoms-org / lumicall

SIP and ENUM dialer for Android with ZRTP/SRTP encryption, SIP over TLS, ICE/TURN for NAT, G.729 and many other features
http://www.lumicall.org
Other
144 stars 88 forks source link

Merge PUBLISH with REGISTER #44

Closed pranavjain closed 8 years ago

pranavjain commented 8 years ago

@saghul @dpocock Please follow this.

dpocock commented 8 years ago

@saghul I tested it, it still sends 2 PUBLISH requests but I think that is because of a problem with the REGISTER logic, that is not something @pranavjain needs to worry about. Before it was sending the PUBLISH 5 times, that was too much.

Here is an example of the PIDF:

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:7001@example.org">
  <tuple id="5e9d17e41f784ae361ada1d0817186f6">
    <status>
        <basic>open</basic>
        <note></note>
    </status>
  </tuple>
</presence>

Note the tuple id doesn't always start with 2 letters, is it valid? Should Pranav hardcode aa into the beginning of that string?

Should he add <dm:person> and <contact> too? Here is an example that we discussed with Mateus earlier:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
entity="sip:daniel1@ws.sip5060.net">
  <dm:person id="p6853">
    <rpid:activities/>
  </dm:person>
  <tuple id="t7300">
    <status><basic>open</basic></status>
    <contact>sip:daniel1@ws.sip5060.net</contact>
    <note>Online</note>
  </tuple>
</presence>
dpocock commented 8 years ago

@saghul we have been chatting in #lumicall on Freenode today

pranavjain commented 8 years ago

@saghul @dpocock Done all the changes like variable names, XML etc.

saghul commented 8 years ago

I don't think adding person and contact is necessary. The id can be formed by concatenating "ID-" + the md5.

dpocock commented 8 years ago

@saghul Pranav has already added person and contact, we can leave them in there now or is there a good reason to remove them?

saghul commented 8 years ago

@dpocock see the comment on duplicated IDs. We can leave them if we fix that.

saghul commented 8 years ago

LGTM

saghul commented 8 years ago

Great work @pranavjain :tada: