impathuri / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

Bad presence document (rfc4479) #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Start IMSDroid and activate presence
2.Sign in

What is the expected output? What do you see instead?
The presence document does not include the deviceID element as child od the 
device element as specified in RFC4479

What version of the product are you using? On what operating system?
imsdroid-1.0.285

Original issue reported on code.google.com by cedric.d...@gmail.com on 17 Sep 2010 at 1:18

GoogleCodeExporter commented 8 years ago
The client adds the device id as attribute of the device element (<pdm:device 
id=\"MyDeviceId\">...).
Could you please send the PUBLISH request.
Thanks.

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 5:24

GoogleCodeExporter commented 8 years ago
Hi,

First thanks for this great client.

Here is the published document attached as pcap

As you can see, this document contains the device element :

<pdm:device id="d1983">
    <status>
     <basic>open</basic>
    </status>
    <caps:devcaps>
        <caps:mobility>
            <caps:supported><caps:mobile /></caps:supported>
        </caps:mobility>
    </caps:devcaps>
    <op:network-availability>
        <op:network id="IMS"><op:active /></op:network>
    </op:network-availability>
</pdm:device>

But according to RFC 4479 :

"
Each <device> element has a mandatory "id"
   attribute, which contains the occurrence identifier for the device.
   Like <person>, <device> contains any number of elements that indicate
   status and characteristic information.  This is followed by
   <deviceID>, which contains the URN for the device ID for this device.
"
And here the <deviceID> is missing.

Considering that on android the urn could be :

"tel:"+(TelephonyManager) 
context.getSystemService(Context.TELEPHONY_SERVICE)..getDeviceId()

The device element should be :

<pdm:device id="d1983">
    <status>
     <basic>open</basic>
    </status>
    <caps:devcaps>
        <caps:mobility>
            <caps:supported><caps:mobile /></caps:supported>
        </caps:mobility>
    </caps:devcaps>
    <op:network-availability>
        <op:network id="IMS"><op:active /></op:network>
    </op:network-availability>

    <pdm:deviceID>tel:XXXXXXXXXXX</pdm:deviceID>

</pdm:device>

Regards

Original comment by cedric.d...@gmail.com on 21 Sep 2010 at 7:56

Attachments:

GoogleCodeExporter commented 8 years ago
As it's an URN it should be "urn:tel:XXXXXXXXXXX". Is it right?

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 8:27

GoogleCodeExporter commented 8 years ago
Hi again

Yes, you're right, according to RFC2141, it must be something like :

urn:foo:XXXX

Regards

Original comment by cedric.d...@gmail.com on 21 Sep 2010 at 8:34

GoogleCodeExporter commented 8 years ago
getDeviceId() returns the IMEI/MEID while getLine1Number() returns the MSISDN 
but only work on OS version 2.0 and later.
Do you know how to get the phone number starting OS version 1.5?
In the coming version the deviceID value will be "urn:tel:+33XXXXXXX" if the 
MSISDN is not null and "urn:imei:XXXXXX" otherwise.

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 9:24

GoogleCodeExporter commented 8 years ago
SVN revision 288 solve the issue.

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 10:32

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by cedric.d...@gmail.com on 21 Sep 2010 at 2:49

GoogleCodeExporter commented 8 years ago
Fixed in 1.0.292.

Original comment by boss...@yahoo.fr on 28 Sep 2010 at 9:29