would it be a big job to add support in xcap server for auid oma_status-icon?
now when i start jitsi, i get to syslog error message
Oct 4 10:58:58 sip /usr/sbin/pres-serv[3493]: ERROR: xcap_server [xcap_misc.c:202]: unsupported auid in [/xcap-root/oma_status-icon/users/sip:jh@test.fi/sip_communicator]
i think it is a bug in jitsi that i doesn't check xcap-caps of the server, before sending oma_status_icon put, but that is another story.
-- juha
There is already support in there for preseContent and I have had it working with Jitsi.
The problem is that Jitsi seems to use a differently formatted path for the icon than OMA clients do. In fact, several of the paths appeared to be different.
I worked around this by using a reg-ex to identify and fix the incorrect path in the xhttp event route. Something like:
# Jitsi... if ($hu=~"^/xcap-root/resource-lists/users/.*/index$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/resource-lists/users /.*/).*$/\1generallist.xml/}); else if ($hu=~"^/xcap-root/pres-rules/users/.*/presrules$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/)pres-rules(/users/.* /)presrules/\1org.openmobilealliance.pres-rules\2pres-rules/}); else if ($hu=~"^/xcap-root/oma_status-icon/users/.*/.*$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root /)oma_status-icon(/users/.*/).* $/\1org.openmobilealliance.pres-content\2oma_status-icon/preseImage/});
Regards,
Peter
On Tue, 2011-10-04 at 11:05 +0300, Juha Heinanen wrote:
would it be a big job to add support in xcap server for auid oma_status-icon?
now when i start jitsi, i get to syslog error message
Oct 4 10:58:58 sip /usr/sbin/pres-serv[3493]: ERROR: xcap_server [xcap_misc.c:202]: unsupported auid in [/xcap-root/oma_status-icon/users/sip:jh@test.fi/sip_communicator]
i think it is a bug in jitsi that i doesn't check xcap-caps of the server, before sending oma_status_icon put, but that is another story.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Peter Dunkley writes:
I worked around this by using a reg-ex to identify and fix the incorrect path in the xhttp event route. Something like:
peter,
as daniel suggested, i added support in auid parser for oma_status-icon. then i tested it not using jitsi, but xcap-icon cli tool. the test failed because of the tcp errors that i reported.
thanks for the pointer, i'll try increasing sql_buffer_size and then see what happens. by the way, i didn't find any documentation about sql_buffer_size in the wikis.
-- juha
I tried to create a wiki account some time ago. It didn't work and I reported it to this list, but I didn't get a reply.
I then forgot about it as other things took over.
I'll try and update the wiki, but I don't know when I'll have time at the moment.
Peter
On Tue, 2011-10-04 at 15:54 +0300, Juha Heinanen wrote:
Peter Dunkley writes:
I worked around this by using a reg-ex to identify and fix the incorrect path in the xhttp event route. Something like:
peter,
as daniel suggested, i added support in auid parser for oma_status-icon. then i tested it not using jitsi, but xcap-icon cli tool. the test failed because of the tcp errors that i reported.
thanks for the pointer, i'll try increasing sql_buffer_size and then see what happens. by the way, i didn't find any documentation about sql_buffer_size in the wikis.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Tuesday 04 October 2011, Juha Heinanen wrote:
Peter Dunkley writes:
I tried to create a wiki account some time ago. It didn't work and I reported it to this list, but I didn't get a reply.
i think you can edit wiki without any userid. at least the sr one.
Hi Juha,
also the K one don't need an user ID, you just need to answer a captcha to protect against spammers.
Best regards,
Henning
I didn't think that oma_status-icon was actually a valid auid. I thought, from looking at the OMA specs, that the correct one was org.openmobilealliance.pres-content - which is what I added to XCAP server a few months back.
On Tue, 2011-10-04 at 15:54 +0300, Juha Heinanen wrote:
Peter Dunkley writes:
I worked around this by using a reg-ex to identify and fix the incorrect path in the xhttp event route. Something like:
peter,
as daniel suggested, i added support in auid parser for oma_status-icon. then i tested it not using jitsi, but xcap-icon cli tool. the test failed because of the tcp errors that i reported.
thanks for the pointer, i'll try increasing sql_buffer_size and then see what happens. by the way, i didn't find any documentation about sql_buffer_size in the wikis.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Peter Dunkley writes:
I didn't think that oma_status-icon was actually a valid auid. I thought, from looking at the OMA specs, that the correct one was org.openmobilealliance.pres-content - which is what I added to XCAP server a few months back.
ok. i'll try to check it too. i wonder where xcap-icon cli tool and jitsi got oma_status-icon, since it does not conform to the usual oma naming style.
-- juha
Juha Heinanen writes:
ok. i'll try to check it too. i wonder where xcap-icon cli tool and jitsi got oma_status-icon, since it does not conform to the usual oma naming style.
after googling around, i got to conclusion that status icon url looks like this:
/<xcap-root>/org.openmobilealliance.pres-content/users/sip:<user>@<domain>/oma_status-icon/rcs_status_icon
in peter's config, preseImage was used instead of rcs_status_icon:
$var(doc_uri) = $(hu{re.subst,/(^/xcap-root/)oma_status-icon(/users/.*/).*$/\1org.openmobilealliance.pres-content\2oma_status-icon/preseImage/});
peter, why the difference?
-- juha
Actually, the example from section C.1.1 of OMA-TS-Presence-SIMPLE_Content_XDM-V1_0-20081223-C is: /org.openmobilealliance.pres-content/users/sip:hermione.blosom@example.com/oma_status-icon/icon_document
The client I have been testing with just happens to use the file name "preseImage" instead of "icon_document". I think the important part in the specification is the path "/org.openmobilealliance.pres-content/users/sip:hermione.blosom@example.com/oma_status-icon/" and the file name of the document is somewhat optional.
Peter
On Tue, 2011-10-04 at 17:52 +0300, Juha Heinanen wrote:
Juha Heinanen writes:
ok. i'll try to check it too. i wonder where xcap-icon cli tool and jitsi got oma_status-icon, since it does not conform to the usual oma naming style.
after googling around, i got to conclusion that status icon url looks like this:
/<xcap-root>/org.openmobilealliance.pres-content/users/sip:<user>@<domain>/oma_status-icon/rcs_status_icon
in peter's config, preseImage was used instead of rcs_status_icon:
$var(doc_uri) = $(hu{re.subst,/(^/xcap-root/)oma_status-icon(/users/.*/).*$/\1org.openmobilealliance.pres-content\2oma_status-icon/preseImage/});
peter, why the difference?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
peter,
after setting
sql_buffer_size=131071 tcp_rd_buf_size=131071
tcp errors are gone. next i got this when tried to put icon to xcap server:
# Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: INFO: XCAP service PUT <oma_status-icon> for sip:jh@test.fi Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: <core> [pvapi.c:1250]: no more space for spec value Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: <core> [pvapi.c:1259]: buffer overflow -- increase the buffer size... Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: xcap_server [xcap_server.c:480]: unable to get body
i then went and increased PV_DEFAULT_PRINT_BUFFER_SIZE in pvapi.c:
#define PV_DEFAULT_PRINT_BUFFER_SIZE 131071
but that didn't help. any other ideas?
-- juha
Juha,
Try the buf_size modparam for xcap_server.
Peter
On Tue, 2011-10-04 at 18:50 +0300, Juha Heinanen wrote:
peter,
after setting
sql_buffer_size=131071 tcp_rd_buf_size=131071
tcp errors are gone. next i got this when tried to put icon to xcap server:
# Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: INFO: XCAP service PUT <oma_status-icon> for sip:jh@test.fi Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: <core> [pvapi.c:1250]: no more space for spec value Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: <core> [pvapi.c:1259]: buffer overflow -- increase the buffer size... Oct 4 18:36:07 sip /usr/sbin/pres-serv[18110]: ERROR: xcap_server [xcap_server.c:480]: unable to get body
i then went and increased PV_DEFAULT_PRINT_BUFFER_SIZE in pvapi.c:
#define PV_DEFAULT_PRINT_BUFFER_SIZE 131071
but that didn't help. any other ideas?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Peter Dunkley writes:
Try the buf_size modparam for xcap_server.
thanks again. with these kind of params, i was able to put a 64 KB icon to xcap server:
sql_buffer_size=262144 # (131071 was not enough) tcp_rd_buf_size=131071 modparam("xcap_server", "buf_size", 131071)
perhaps defaults should be adjusted so that this kind of thing would work out of the box?
-- juha
I think the defaults were left as-is because after making these changes (and the one in RLS to do with splitting large NOTIFY requests) because we found that if you set all of these values so that a lot of this more "advanced" stuff works there isn't enough shared memory by default. By leaving the defaults as they were before they were configurable we weren't going to break anyone when they upgraded.
On Tue, 2011-10-04 at 21:35 +0300, Juha Heinanen wrote:
Peter Dunkley writes:
Try the buf_size modparam for xcap_server.
thanks again. with these kind of params, i was able to put a 64 KB icon to xcap server:
sql_buffer_size=262144 # (131071 was not enough) tcp_rd_buf_size=131071 modparam("xcap_server", "buf_size", 131071)
perhaps defaults should be adjusted so that this kind of thing would work out of the box?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On Tuesday 04 October 2011, Peter Dunkley wrote:
I think the defaults were left as-is because after making these changes (and the one in RLS to do with splitting large NOTIFY requests) because we found that if you set all of these values so that a lot of this more "advanced" stuff works there isn't enough shared memory by default. By leaving the defaults as they were before they were configurable we weren't going to break anyone when they upgraded.
Hi Peter,
the default shared memory size of 32 MB is for today standards rather small. So it should be IMHO ok to just increase it to 64 MB, for example, and use module defaults that works a bit more "out of the box".
Best regards,
Henning
Hello,
are the operations related to this only about storing/updating/fetching and removing some xml file/parts per user? If yes, then just the XCAP URL parser should be extended to support the auid, so it should not be complex at all.
Cheers, Daniel
On 10/4/11 10:05 AM, Juha Heinanen wrote:
would it be a big job to add support in xcap server for auid oma_status-icon?
now when i start jitsi, i get to syslog error message
Oct 4 10:58:58 sip /usr/sbin/pres-serv[3493]: ERROR: xcap_server [xcap_misc.c:202]: unsupported auid in [/xcap-root/oma_status-icon/users/sip:jh@test.fi/sip_communicator]
i think it is a bug in jitsi that i doesn't check xcap-caps of the server, before sending oma_status_icon put, but that is another story.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla writes:
are the operations related to this only about storing/updating/fetching and removing some xml file/parts per user? If yes, then just the XCAP URL parser should be extended to support the auid, so it should not be complex at all.
i started to work on it. when i try to put an icon to xcap server, i get errors
Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
size of the icon is 61572 bytes and content length containing base64 encoded icon is 83285 bytes. is that too much for sip router or what could the problem be?
during put operation, wireshark shows lots of red, which means tcp.flags.reset eq 1.
-- juha
There is a limit of 64kb on documents in the DB.
Andy Miller recently added a new configuration file option (sql_buffer_size) that lets you change that.
Increasing the SQL buffer size and using the reg-ex's that I put in my last email should enable you to have avatars/icons with Jitsi.
Regards,
Peter
On Tue, 2011-10-04 at 14:54 +0300, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
are the operations related to this only about storing/updating/fetching and removing some xml file/parts per user? If yes, then just the XCAP URL parser should be extended to support the auid, so it should not be complex at all.
i started to work on it. when i try to put an icon to xcap server, i get errors
Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
size of the icon is 61572 bytes and content length containing base64 encoded icon is 83285 bytes. is that too much for sip router or what could the problem be?
during put operation, wireshark shows lots of red, which means tcp.flags.reset eq 1.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Peter Dunkley writes:
Andy Miller recently added a new configuration file option (sql_buffer_size) that lets you change that.
Increasing the SQL buffer size and using the reg-ex's that I put in my last email should enable you to have avatars/icons with Jitsi.
peter,
i set sql_buffer_size to 131071 and still get the tcp errors:
Oct 4 15:57:02 sip /usr/sbin/pres-serv[17388]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 15:57:02 sip /usr/sbin/pres-serv[17388]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
have you also increased some of the core tcp parameters values?
-- juha
Try setting tcp_rd_buf_size
On Tue, 2011-10-04 at 16:02 +0300, Juha Heinanen wrote:
Peter Dunkley writes:
Andy Miller recently added a new configuration file option (sql_buffer_size) that lets you change that.
Increasing the SQL buffer size and using the reg-ex's that I put in my last email should enable you to have avatars/icons with Jitsi.
peter,
i set sql_buffer_size to 131071 and still get the tcp errors:
Oct 4 15:57:02 sip /usr/sbin/pres-serv[17388]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 15:57:02 sip /usr/sbin/pres-serv[17388]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
have you also increased some of the core tcp parameters values?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Peter Dunkley writes:
Try setting tcp_rd_buf_size
that helped with tcp errors and now i got
Oct 4 16:23:57 sip /usr/sbin/pres-serv[18109]: ERROR: <core> [pvapi.c:1250]: no more space for spec value Oct 4 16:23:57 sip /usr/sbin/pres-serv[18109]: ERROR: <core> [pvapi.c:1259]: buffer overflow -- increase the buffer size...
i'll look next how to increase buffer size in pvapi.
-- juha
For what it is worth, here is my xhttp event_route (works with Bria, Jitsi, and some OMA clients):
event_route[xhttp:request] { xlog("L_INFO", "$rm: event_route[xhttp:request]\n"); xdbg("===== xhttp: request [$rv] $rm => $hu\n");
if($hu=~"^/xcap-root/") { set_reply_close(); set_reply_no_connect();
# Jitsi... if ($hu=~"^/xcap-root/resource-lists/users/.*/index$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/resource-lists/users /.*/).*$/\1generallist.xml/}); else if ($hu=~"^/xcap-root/pres-rules/users/.*/presrules$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/)pres-rules(/users/.* /)presrules/\1org.openmobilealliance.pres-rules\2pres-rules/}); else if ($hu=~"^/xcap-root/oma_status-icon/users/.*/.*$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root /)oma_status-icon(/users/.*/).* $/\1org.openmobilealliance.pres-content\2oma_status-icon/preseImage/}); # Bria... else if ($hu=~"^/xcap-root/resource-lists/users/.*/contacts-resource-list.xml$") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/resource-lists/users /.*/).*$/\1generallist.xml/}); else if ($hu=~"^/xcap-root/resource-lists/users/.*/resource-list.xml $") $var(doc_uri) = $(hu{re.subst,/(^/xcap-root/resource-lists/users /.*/).*$/\1generallist.xml/}); # No modification required... else $var(doc_uri) = $hu;
# xcap ops $xcapuri(u=>data) = $var(doc_uri); if($xcapuri(u=>xuid)=~"^sip:.+@.+") $var(uri) = $xcapuri(u=>xuid); else if($xcapuri(u=>xuid)=~".+@.+") $var(uri) = "sip:" + $xcapuri(u=>xuid); else $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri;
xlog("L_INFO", " $var(doc_uri) requested by $var(uri)\n");
if($xcapuri(u=>auid)=="xcap-caps") { $var(xbody) = "<?xml version='1.0' encoding='UTF-8'?> <xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'> <auids> <auid>rls-services</auid> <auid>pidf-manipulation</auid> <auid>xcap-caps</auid> <auid>resource-lists</auid> <auid>pres-rules</auid> <auid>org.openmobilealliance.pres-rules</auid> <auid>org.openmobilealliance.user-profile</auid> <auid>org.openmobilealliance.pres-content</auid> </auids> <extensions> </extensions> <namespaces> <namespace>urn:ietf:params:xml:ns:rls-services</namespace> <namespace>urn:ietf:params:xml:ns:pidf</namespace> <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace> <namespace>urn:ietf:params:xml:ns:resource-lists</namespace> <namespace>urn:ietf:params:xml:ns:pres-rules</namespace> <namespace>urn:oma:xml:xdm:user-profile</namespace> <namespace>urn:oma:xml:prs:pres-content</namespace> </namespaces> </xcap-caps>"; xhttp_reply("200", "OK", "application/xcap-caps+xml", "$var(xbody)"); exit; }
#!ifdef WITH_XHTTPAUTH if (!www_authenticate("$(xcapuri(u=>xuid){uri.host})", "subscriber")) { www_challenge("$(xcapuri(u=>xuid){uri.host})", "0"); exit; } if ($retcode == 2) { xhttp_reply("403", "Forbidden", "", ""); exit; } #!endif
switch($rm) { case "PUT": #!ifdef WITH_XHTTPAUTH # be sure only auth user updates its documents if ($au!=$(var(uri){uri.user})) { xhttp_reply("403", "Forbidden", "", ""); exit; } #!endif xcaps_put("$var(uri)", "$var(doc_uri)", "$rb"); if($xcapuri(u=>auid)=~"pres-rules") { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } else if ($xcapuri(u=>auid)=~"resource-lists") { rls_update_subs("$var(uri)", "presence"); } exit; break; case "GET": #!ifdef WITH_XHTTPAUTH $var(furi) = "sip:" + $au + "@" + $ar; if ($au!=$(var(uri){uri.user})) { # be sure only auth user gets its non-profile documents if (!($xcapuri(u=>auid)=~"user-profile" || $xcapuri(u=>auid)=~"pres-content")) { xhttp_reply("403", "Forbidden", "", ""); exit; } else { # be sure only permitted user gets others profile documents pres_auth_status("$var(furi)", "$var(uri)"); #!ifdef WITH_PROFILEAUTHONLY if ($retcode != 1) { #!else if ($retcode == 3) { #!endif xhttp_reply("403", "Forbidden", "", ""); exit; } } } #!endif xcaps_get("$var(uri)", "$var(doc_uri)"); exit; break; case "DELETE": #!ifdef WITH_XHTTPAUTH # be sure only auth user deletes its documents if ($au!=$(var(uri){uri.user})) { xhttp_reply("403", "Forbidden", "", ""); exit; } #!endif xcaps_del("$var(uri)", "$var(doc_uri)"); if($xcapuri(u=>auid)=~"pres-rules") { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } else if ($xcapuri(u=>auid)=~"resource-lists") { rls_update_subs("$var(uri)", "presence"); } exit; break; } }
# http ops xhttp_reply("404", "Not Found", "", ""); exit; }
On Tue, 2011-10-04 at 14:58 +0100, Peter Dunkley wrote:
There is a limit of 64kb on documents in the DB.
Andy Miller recently added a new configuration file option (sql_buffer_size) that lets you change that.
Increasing the SQL buffer size and using the reg-ex's that I put in my last email should enable you to have avatars/icons with Jitsi.
Regards,
Peter
On Tue, 2011-10-04 at 14:54 +0300, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
are the operations related to this only about storing/updating/fetching and removing some xml file/parts per user? If yes, then just the XCAP URL parser should be extended to support the auid, so it should not be complex at all.
i started to work on it. when i try to put an icon to xcap server, i get errors
Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15261]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:321]: ERROR: tcp_read: buffer overrun, dropping Oct 4 14:45:07 sip /usr/sbin/pres-serv[15262]: ERROR: <core> [tcp_read.c:882]: ERROR: tcp_read_req: error reading
size of the icon is 61572 bytes and content length containing base64 encoded icon is 83285 bytes. is that too much for sip router or what could the problem be?
during put operation, wireshark shows lots of red, which means tcp.flags.reset eq 1.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev