[jitsi-dev] XCAP stored contact


#1

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#2

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

···

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#3

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:
impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChanged().380
Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

···

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#4

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset".
It seems there is some problem with xml that is sent to server, here a
tcpdump will be most helpful.

Regards
damencho

···

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:
impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChanged().380
Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#5

Hi,

ngrep (readable tcpdump) is available here: http://pastebin.com/ugZqzGYu

Regards,
Chris

···

On 14 June 2011 17:42, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset".
It seems there is some problem with xml that is sent to server, here a
tcpdump will be most helpful.

Regards
damencho

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:
impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChanged().380
Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#6

Shall I open a bug report?

···

On 14 June 2011 18:09, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Damian, Chris

By looking at the error message, the dump and "if(!contentType.equals(response.getContentType()))" (XCapClientImpl.java, Line 631) then I think it's the too strict comparison of the content type.

The contentType variable holds "application/xcap-caps+xml" so it's clear that the check fails when the server sends (a perfectly valid) "application/xcap-caps+xml; charset=utf-8" instead.

Regards,
Ingo

-----Original Message-----
From: Chris Maciejewski [mailto:chris@wima.co.uk]
Sent: Dienstag, 14. Juni 2011 18:46
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: XCAP stored contact
Hi,

ngrep (readable tcpdump) is available here: http://pastebin.com/ugZqzGYu

Regards,
Chris

On 14 June 2011 17:42, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset".
It seems there is some problem with xml that is sent to server, here a
tcpdump will be most helpful.

Regards
damencho

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> >> wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:

impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChan
ged().380

Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-
lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#7

Damian, Chris

By looking at the error message, the dump and "if(!contentType.equals(response.getContentType()))" (XCapClientImpl.java, Line 631) then I think it's the too strict comparison of the content type.

The contentType variable holds "application/xcap-caps+xml" so it's clear that the check fails when the server sends (a perfectly valid) "application/xcap-caps+xml; charset=utf-8" instead.

Regards,
Ingo

···

-----Original Message-----
From: Chris Maciejewski [mailto:chris@wima.co.uk]
Sent: Dienstag, 14. Juni 2011 18:46
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: XCAP stored contact
Hi,

ngrep (readable tcpdump) is available here: http://pastebin.com/ugZqzGYu

Regards,
Chris

On 14 June 2011 17:42, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset".
It seems there is some problem with xml that is sent to server, here a
tcpdump will be most helpful.

Regards
damencho

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> > wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:

impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChan
ged().380

Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-
lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#8

Hey Ingo,

thanks for pointing the problem. I've just committed a fix, I saw that
on some plases this check is made with startsWith check, so I fixed it
like that for now.

Hey Chris can you try with next build I think it must be: build.3534.

Thanks
damencho

···

On Tue, Jun 14, 2011 at 8:24 PM, Chris Maciejewski <chris@wima.co.uk> wrote:

Shall I open a bug report?

On 14 June 2011 18:09, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Damian, Chris

By looking at the error message, the dump and "if(!contentType.equals(response.getContentType()))" (XCapClientImpl.java, Line 631) then I think it's the too strict comparison of the content type.

The contentType variable holds "application/xcap-caps+xml" so it's clear that the check fails when the server sends (a perfectly valid) "application/xcap-caps+xml; charset=utf-8" instead.

Regards,
Ingo

-----Original Message-----
From: Chris Maciejewski [mailto:chris@wima.co.uk]
Sent: Dienstag, 14. Juni 2011 18:46
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: XCAP stored contact
Hi,

ngrep (readable tcpdump) is available here: http://pastebin.com/ugZqzGYu

Regards,
Chris

On 14 June 2011 17:42, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset".
It seems there is some problem with xml that is sent to server, here a
tcpdump will be most helpful.

Regards
damencho

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> >>> wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:

impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationStateChan
ged().380

Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for XCAP
Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working fine
for me. I created new user into the xcap server, login with that user,
add new contact and all the time I see the http request going to the
server.
Can you send us the logfiles and eventually a tcpdump from such a
problem session.
http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap client
hasn't been successfully initialized inside our sip implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating, but
than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-
lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the XCAP
server.

Any suggestions very much appreciated.

Regards,
Chris


#9

Hey

Thanks for the fix!
Just for the record: We currently assume the server's response is always UTF-8. Once the server sends another encoding (like the widely used iso-8850-1) we might run into problems again (e.g. at XCapClientImpl.java, Line 639). But I think that can wait until it actually becomes an issue.

Regards,
Ingo

···

-----Original Message-----
From: damencho@damencho.com [mailto:damencho@damencho.com] On Behalf Of
Damian Minkov
Sent: Dienstag, 14. Juni 2011 23:04
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: XCAP stored contact
Hey Ingo,

thanks for pointing the problem. I've just committed a fix, I saw that
on some plases this check is made with startsWith check, so I fixed it
like that for now.

Hey Chris can you try with next build I think it must be: build.3534.

Thanks
damencho

On Tue, Jun 14, 2011 at 8:24 PM, Chris Maciejewski <chris@wima.co.uk> > wrote:

Shall I open a bug report?

On 14 June 2011 18:09, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Damian, Chris

By looking at the error message, the dump and

"if(!contentType.equals(response.getContentType()))" (XCapClientImpl.java,
Line 631) then I think it's the too strict comparison of the content type.

The contentType variable holds "application/xcap-caps+xml" so it's

clear that the check fails when the server sends (a perfectly valid)
"application/xcap-caps+xml; charset=utf-8" instead.

Regards,
Ingo

-----Original Message-----
From: Chris Maciejewski [mailto:chris@wima.co.uk]
Sent: Dienstag, 14. Juni 2011 18:46
To: dev@jitsi.java.net
Subject: [jitsi-dev] Re: XCAP stored contact
Hi,

ngrep (readable tcpdump) is available here:
http://pastebin.com/ugZqzGYu

Regards,
Chris

On 14 June 2011 17:42, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

well the problem is not the utf-8, the content type is written like
this "content type; charset". It seems there is some problem with
xml that is sent to server, here a tcpdump will be most helpful.

Regards
damencho

On Tue, Jun 14, 2011 at 7:34 PM, Chris Maciejewski <chris@wima.co.uk> >>>> wrote:

Hi Damian,

I just had a look into log file and it says:

17:24:20.386 SEVERE:

impl.protocol.sip.ProtocolProviderServiceSipImpl.fireRegistrationState
Chan ged().380

Error while connecting to XCAP server. Contact list won't be saved
net.java.sip.communicator.impl.protocol.sip.xcap.XCapException: XCAP
server returns invalid content type: application/xcap-caps+xml;
charset=utf-8

However 'application/xcap-caps+xml' is the correct MIME type for
XCAP Server Capabilities document - see 15.2.5
http://tools.ietf.org/html//rfc4825#page-64

Would maybe '; charset=utf-8' be a problem?

Regards,
Chris

On 14 June 2011 17:06, Damian Minkov <damencho@jitsi.org> wrote:

Hi,

I've just made some tests on my side and everything seems working
fine for me. I created new user into the xcap server, login with
that user, add new contact and all the time I see the http request
going to the server. Can you send us the logfiles and eventually a
tcpdump from such a problem session. http://jitsi.org/faq/logs

When there is no PUT after adding the contact, seems that xcap
client hasn't been successfully initialized inside our sip
implementation.

Regards
damencho

On Tue, Jun 14, 2011 at 4:37 PM, <chris@wima.co.uk> wrote:

Hi,

It seems to me XCAP stored contacts are not working at the moment.

What I do is:
1. SIP Account => Presence => "Enable XCAP store contact" selected
2. Server URI: http://xcap.local/xcap-root
3. Restart Jitsi

I can see Jitsi making a GET request to
/xcap-root/xcap-caps/global/index and correctly authenticating,
but than nothing happens.

See HTTP trace log here: http://pastebin.com/ugZqzGYu

What I would expect to happen next is Jitsi doing GET request to:

/xcap-root/resource-
lists/users/sip:_sip_username_@_sip_domain_/index/

to obtain Contacts lists, but this doesn't happen.

Also when I am adding a contact there is no PUT request to the
XCAP server.

Any suggestions very much appreciated.

Regards,
Chris


#10

Hi,

I just compiled Jitsi from SVN rev. 8698 and can confirm contact list
is fetched from the XCAP server OK.

However I have two new questions relating to XCAP contacts handling.

Please see PDF for details:
http://dl.dropbox.com/u/3182365/Jitsi-XCAP-Contacts.pdf

Regards,
Chris

···

On 14 June 2011 22:27, Bauersachs Ingo <ingo.bauersachs@fhnw.ch> wrote:

Hey

Thanks for the fix!
Just for the record: We currently assume the server's response is always UTF-8. Once the server sends another encoding (like the widely used iso-8850-1) we might run into problems again (e.g. at XCapClientImpl.java, Line 639). But I think that can wait until it actually becomes an issue.

Regards,
Ingo

Hey Ingo,

thanks for pointing the problem. I've just committed a fix, I saw that
on some plases this check is made with startsWith check, so I fixed it
like that for now.

Hey Chris can you try with next build I think it must be: build.3534.

Thanks
damencho