Closed pranavjain closed 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>
@saghul we have been chatting in #lumicall
on Freenode today
@saghul @dpocock Done all the changes like variable names, XML etc.
I don't think adding person and contact is necessary. The id can be formed by concatenating "ID-" + the md5.
@saghul Pranav has already added person and contact, we can leave them in there now or is there a good reason to remove them?
@dpocock see the comment on duplicated IDs. We can leave them if we fix that.
LGTM
Great work @pranavjain :tada:
@saghul @dpocock Please follow this.