I am trying to set up XCAP support for SIP SIMPLE, and using jitsi as the sample client. The kamailio database was previously configured using ODBC and kamailio-4.1.3 and was apparently working correctly. I was following the guide at http://nil.uniza.sk/instant-messaging/simple/configuring-xcap-support-im-and... as well as the standard documentation at http://kamailio.org/docs/modules/4.1.x/modules/xcap_server.html . However, the rls support is currently disabled. When I use jitsi to connect, and add one contact to the empty contact list, I see the database being populated (mysql backend):
mysql> select * from xcap; +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+ | id | username | domain | doc | doc_type | etag | source | doc_uri | port | +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+ | 3 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists> | 4 | sr-1401316328-31413-1 | 0 | /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index | 0 | | 4 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><ruleset xmlns="urn:ietf:params:xml:ns:common-policy"><rule id="presence_allow"><conditions><identity><one id="sip:bmacias@pbx.elastix.com"/></identity></conditions><actions><sub-handling xmlns="urn:ietf:params:xml:ns:pres-rules">allow</sub-handling></actions><transformations><provide-devices xmlns="urn:ietf:params:xml:ns:pres-rules"><all-devices/></provide-devices><provide-persons xmlns="urn:ietf:params:xml:ns:pres-rules"><all-persons/></provide-persons><provide-services xmlns="urn:ietf:params:xml:ns:pres-rules"><all-services/></provide-services></transformations></rule></ruleset> | 2 | sr-1401316328-31416-1 | 0 | /xcap-root/pres-rules/users/sip:avillacisIM@pbx.elastix.com/presrules | 0 | +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+ 2 rows in set (0.00 sec)
As far as I can see, both XML documents are well formed.
However, if I shutdown and then restart jitsi, I see (with wireshark) that the server returned a 500 Server Error when trying to fetch resource-lists . At the same time, the following appears on the log:
May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
What can I do to solve this issue. This is preventing contacts from being retrieved or added once the first contact is stored.
My event-route looks like this (WITH_XCAPSRV is defined elsewhere in the configuration):
#!ifdef WITH_XHTTP event_route[xhttp:request] { #!ifdef WITH_XHTTP_RPC $var(xhttp_rpc_root) = $(hu{s.substr,0,9}); if ($var(xhttp_rpc_root) == "/http_rpc") { dispatch_xhttp_rpc(); } #!endif #!ifdef WITH_XHTTP_PI $var(xhttp_rpc_root) = $(hu{s.substr,0,8}); if ($var(xhttp_rpc_root) == "/http_pi") { dispatch_xhttp_pi(); } #!endif #!ifdef WITH_XCAPSRV if ($hu =~ "^/xcap-root/") { route(XCAPSRV); } #!endif
set_reply_close(); set_reply_no_connect();
# if ($Rp != 80 ##!ifdef WITH_TLS # && $Rp != 443 ##!endif # ) { # # xlog("L_WARN", "HTTP request received on $Rp\n"); # xhttp_reply("403", "Forbidden", "text/html", "Forbidden"); # exit; # }
xlog("L_DBG", "HTTP Request Received\n");
if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") {
# Validate Host - make sure the client is using the correct # alias for WebSockets if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) { xlog("L_WARN", "Bad host $hdr(Host)\n"); xhttp_reply("403", "Forbidden", "", ""); exit; }
# Optional... validate Origin - make sure the client is from an # authorised website. For example, # # if ($hdr(Origin) != "http://communicator.MY_DOMAIN" # && $hdr(Origin) != "https://communicator.MY_DOMAIN") { # xlog("L_WARN", "Unauthorised client $hdr(Origin)\n"); # xhttp_reply("403", "Forbidden", "", ""); # exit; # }
# Optional... perform HTTP authentication
# ws_handle_handshake() exits (no further configuration file # processing of the request) when complete. if (ws_handle_handshake()) { # Optional... cache some information about the # successful connection exit; } }
xhttp_reply("200", "OK", "text/html", "<html><body>Wrong URL $hu</body></html>"); } #!endif
#!ifdef WITH_XCAPSRV route[XCAPSRV] { xlog("L_ALERT", "===== xhttp: request [$rv] $rm => $hu\n");
# Remove port specification from Host header and use as authentication domain $var(http_domain) = $(hdr(Host){s.select,0,:}); if (!www_authorize("$var(http_domain)", "subscriber")) { www_challenge("$var(http_domain)", "0"); exit; }
set_reply_close(); set_reply_no_connect();
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/}); 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_ALERT", "===== xhttp: $xcapuri(u=>auid) : $xcapuri(u=>xuid)\n");
if ($xcapuri(u=>auid) == "xcap-caps") { if ($rm == "GET") { $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> <auid>org.openmobilealliance.search</auid> <auid>org.openmobilealliance.xcap-directory</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> <namespace>urn:oma:xml:xdm:search</namespace> <namespace>urn:oma:xml:xdm:xcap-directory</namespace> </namespaces> </xcap-caps>"; xhttp_reply("200", "OK", "application/xcap-caps+xml", "$var(xbody)"); } else { append_to_reply("Allow: GET\r\n"); xhttp_reply("405", "Method Not Allowed", "", ""); } exit; }
# be sure auth user access only its documents if ($au != $(var(uri){uri.user})) { xhttp_reply("403", "Forbidden", "text/html", "<html><body>$si:$sp</body></html>"); exit; }
switch($rm) { case "PUT": 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) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") { # rls_update_subs("$var(uri)", "presence"); } else if ($xcapuri(u=>auid) =~ "pidf-manipulation") { pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); } exit; break; case "GET": xcaps_get("$var(uri)", "$var(doc_uri)"); exit; break; case "DELETE": 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) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") { # rls_update_subs("$var(uri)", "presence"); } else if ($xcapuri(u=>auid) =~ "pidf-manipulation") { pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); } exit; break; case "POST": if ($xcapuri(u=>auid) =~ "search") { xhttp_reply("501", "Not Implemented", "", ""); } else { if ($xcapuri(u=>auid) =~ "xcap-directory") { append_to_reply("Allow: GET\r\n"); } else { append_to_reply("Allow: DELETE, GET, PUT\r\n"); } xhttp_reply("405", "Method Not Allowed", "", ""); } exit; break; }
# other http requests xhttp_reply("404", "Not Found", "", ""); exit; } #!endif
Hello,
the error message is printed in case of an invalid xml document.
Can you edit modules/xcap_server/xcap_misc.c and add inside function:
int xcaps_check_doc_validity(str *doc)
the log:
LM_ERR("xmld document is: [[%.*s]]\n", doc->len, doc->s);
before the line with:
docxml = xmlParseMemory(doc->s, doc->len);
Re-compile and re-install. Then run a test and send here the output of this line.
Cheers, Daniel
On 29/05/14 01:30, Alex Villacís Lasso wrote:
I am trying to set up XCAP support for SIP SIMPLE, and using jitsi as the sample client. The kamailio database was previously configured using ODBC and kamailio-4.1.3 and was apparently working correctly. I was following the guide at http://nil.uniza.sk/instant-messaging/simple/configuring-xcap-support-im-and... as well as the standard documentation at http://kamailio.org/docs/modules/4.1.x/modules/xcap_server.html . However, the rls support is currently disabled. When I use jitsi to connect, and add one contact to the empty contact list, I see the database being populated (mysql backend):
mysql> select * from xcap; +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
| id | username | domain | doc | doc_type | etag | source | doc_uri | port | +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
| 3 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists> | 4 | sr-1401316328-31413-1 | 0 | /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index | 0 | | 4 | avillacisIM | pbx.elastix.com | <?xml version="1.0" encoding="UTF-8" standalone="no"?><ruleset xmlns="urn:ietf:params:xml:ns:common-policy"><rule id="presence_allow"><conditions><identity><one id="sip:bmacias@pbx.elastix.com"/></identity></conditions><actions><sub-handling xmlns="urn:ietf:params:xml:ns:pres-rules">allow</sub-handling></actions><transformations><provide-devices xmlns="urn:ietf:params:xml:ns:pres-rules"><all-devices/></provide-devices><provide-persons xmlns="urn:ietf:params:xml:ns:pres-rules"><all-persons/></provide-persons><provide-services xmlns="urn:ietf:params:xml:ns:pres-rules"><all-services/></provide-services></transformations></rule></ruleset> | 2 | sr-1401316328-31416-1 | 0 | /xcap-root/pres-rules/users/sip:avillacisIM@pbx.elastix.com/presrules | 0 | +----+-------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+-----------------------+--------+-----------------------------------------------------------------------+------+
2 rows in set (0.00 sec)
As far as I can see, both XML documents are well formed.
However, if I shutdown and then restart jitsi, I see (with wireshark) that the server returned a 500 Server Error when trying to fetch resource-lists . At the same time, the following appears on the log:
May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 28 17:39:12 elx /usr/sbin/kamailio[31421]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 28 17:39:12 elx /usr/sbin/kamailio[31413]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
What can I do to solve this issue. This is preventing contacts from being retrieved or added once the first contact is stored.
My event-route looks like this (WITH_XCAPSRV is defined elsewhere in the configuration):
#!ifdef WITH_XHTTP event_route[xhttp:request] { #!ifdef WITH_XHTTP_RPC $var(xhttp_rpc_root) = $(hu{s.substr,0,9}); if ($var(xhttp_rpc_root) == "/http_rpc") { dispatch_xhttp_rpc(); } #!endif #!ifdef WITH_XHTTP_PI $var(xhttp_rpc_root) = $(hu{s.substr,0,8}); if ($var(xhttp_rpc_root) == "/http_pi") { dispatch_xhttp_pi(); } #!endif #!ifdef WITH_XCAPSRV if ($hu =~ "^/xcap-root/") { route(XCAPSRV); } #!endif
set_reply_close(); set_reply_no_connect();
# if ($Rp != 80 ##!ifdef WITH_TLS # && $Rp != 443 ##!endif # ) { # # xlog("L_WARN", "HTTP request received on $Rp\n"); # xhttp_reply("403", "Forbidden", "text/html", "Forbidden"); # exit; # }
xlog("L_DBG", "HTTP Request Received\n"); if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") { # Validate Host - make sure the client is using the
correct # alias for WebSockets if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) { xlog("L_WARN", "Bad host $hdr(Host)\n"); xhttp_reply("403", "Forbidden", "", ""); exit; }
# Optional... validate Origin - make sure the client
is from an # authorised website. For example, # # if ($hdr(Origin) != "http://communicator.MY_DOMAIN" # && $hdr(Origin) != "https://communicator.MY_DOMAIN") { # xlog("L_WARN", "Unauthorised client $hdr(Origin)\n"); # xhttp_reply("403", "Forbidden", "", ""); # exit; # }
# Optional... perform HTTP authentication # ws_handle_handshake() exits (no further
configuration file # processing of the request) when complete. if (ws_handle_handshake()) { # Optional... cache some information about the # successful connection exit; } }
xhttp_reply("200", "OK", "text/html", "<html><body>Wrong URL $hu</body></html>");
} #!endif
#!ifdef WITH_XCAPSRV route[XCAPSRV] { xlog("L_ALERT", "===== xhttp: request [$rv] $rm => $hu\n");
# Remove port specification from Host header and use as
authentication domain $var(http_domain) = $(hdr(Host){s.select,0,:}); if (!www_authorize("$var(http_domain)", "subscriber")) { www_challenge("$var(http_domain)", "0"); exit; }
set_reply_close(); set_reply_no_connect(); 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/}); 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_ALERT", "===== xhttp: $xcapuri(u=>auid) :
$xcapuri(u=>xuid)\n");
if ($xcapuri(u=>auid) == "xcap-caps") { if ($rm == "GET") { $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> <auid>org.openmobilealliance.search</auid> <auid>org.openmobilealliance.xcap-directory</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> <namespace>urn:oma:xml:xdm:search</namespace> <namespace>urn:oma:xml:xdm:xcap-directory</namespace> </namespaces> </xcap-caps>"; xhttp_reply("200", "OK", "application/xcap-caps+xml", "$var(xbody)"); } else { append_to_reply("Allow: GET\r\n"); xhttp_reply("405", "Method Not Allowed", "", ""); } exit; }
# be sure auth user access only its documents if ($au != $(var(uri){uri.user})) { xhttp_reply("403", "Forbidden", "text/html",
"<html><body>$si:$sp</body></html>"); exit; }
switch($rm) { case "PUT": 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) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") { # rls_update_subs("$var(uri)", "presence"); } else if ($xcapuri(u=>auid) =~ "pidf-manipulation") { pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); } exit; break; case "GET": xcaps_get("$var(uri)", "$var(doc_uri)"); exit; break; case "DELETE": 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) =~ "rls-services" || $xcapuri(u=>auid) =~ "resource-lists") { # rls_update_subs("$var(uri)", "presence"); } else if ($xcapuri(u=>auid) =~ "pidf-manipulation") { pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); } exit; break; case "POST": if ($xcapuri(u=>auid) =~ "search") { xhttp_reply("501", "Not Implemented", "", ""); } else { if ($xcapuri(u=>auid) =~ "xcap-directory") { append_to_reply("Allow: GET\r\n"); } else { append_to_reply("Allow: DELETE, GET, PUT\r\n"); } xhttp_reply("405", "Method Not Allowed", "", ""); } exit; break; }
# other http requests xhttp_reply("404", "Not Found", "", ""); exit;
} #!endif
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
El 29/05/14 07:51, Daniel-Constantin Mierla escribió:
Hello,
the error message is printed in case of an invalid xml document.
Can you edit modules/xcap_server/xcap_misc.c and add inside function:
int xcaps_check_doc_validity(str *doc)
the log:
LM_ERR("xmld document is: [[%.*s]]\n", doc->len, doc->s);
before the line with:
docxml = xmlParseMemory(doc->s, doc->len);
Re-compile and re-install. Then run a test and send here the output of this line.
May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_misc.c:690]: xcaps_check_doc_validity(): xmld document is: [[3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E3C7265736F757263652D6C6973747320786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A7265736F757263652D6C69737473223E3C6C697374206E616D653D22526F6F7447726F7570223E3C656E747279207572693D227369703A626D6163696173407062782E656C61737469782E636F6D223E3C646973706C61792D6E616D653E626D61636961733C2F646973706C61792D6E616D653E3C2F656E7472793E3C2F6C6973743E3C2F7265736F757263652D6C697374733E]] May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
Huh....?
The hex string happens to be an hex dump of the following:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists>
El 29/05/14 12:15, Alex Villacís Lasso escribió:
El 29/05/14 07:51, Daniel-Constantin Mierla escribió:
Hello,
the error message is printed in case of an invalid xml document.
Can you edit modules/xcap_server/xcap_misc.c and add inside function:
int xcaps_check_doc_validity(str *doc)
the log:
LM_ERR("xmld document is: [[%.*s]]\n", doc->len, doc->s);
before the line with:
docxml = xmlParseMemory(doc->s, doc->len);
Re-compile and re-install. Then run a test and send here the output of this line.
May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_misc.c:690]: xcaps_check_doc_validity(): xmld document is: [[3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E3C7265736F757263652D6C6973747320786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A7265736F757263652D6C69737473223E3C6C697374206E616D653D22526F6F7447726F7570223E3C656E747279207572693D227369703A626D6163696173407062782E656C61737469782E636F6D223E3C646973706C61792D6E616D653E626D61636961733C2F646973706C61792D6E616D653E3C2F656E7472793E3C2F6C6973743E3C2F7265736F757263652D6C697374733E]] May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
Huh....?
The hex string happens to be an hex dump of the following:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists>
Looks like a SQL_C_BINARY is required somewhere. Right now I am trying to figure out where.
El 30/05/14 11:02, Alex Villacís Lasso escribió:
El 29/05/14 12:15, Alex Villacís Lasso escribió:
El 29/05/14 07:51, Daniel-Constantin Mierla escribió:
Hello,
the error message is printed in case of an invalid xml document.
Can you edit modules/xcap_server/xcap_misc.c and add inside function:
int xcaps_check_doc_validity(str *doc)
the log:
LM_ERR("xmld document is: [[%.*s]]\n", doc->len, doc->s);
before the line with:
docxml = xmlParseMemory(doc->s, doc->len);
Re-compile and re-install. Then run a test and send here the output of this line.
May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_misc.c:690]: xcaps_check_doc_validity(): xmld document is: [[3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E3C7265736F757263652D6C6973747320786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A7265736F757263652D6C69737473223E3C6C697374206E616D653D22526F6F7447726F7570223E3C656E747279207572693D227369703A626D6163696173407062782E656C61737469782E636F6D223E3C646973706C61792D6E616D653E626D61636961733C2F646973706C61792D6E616D653E3C2F656E7472793E3C2F6C6973743E3C2F7265736F757263652D6C697374733E]] May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
Huh....?
The hex string happens to be an hex dump of the following:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists>
Looks like a SQL_C_BINARY is required somewhere. Right now I am trying to figure out where.
I worked this around by changing the column type to MEDIUMTEXT from the original MEDIUMBLOB:
ALTER TABLE xcap CHANGE COLUMN doc doc mediumtext not null;
Is this an acceptable solution? Could this cause issues with truly binary data stored there?
Now the table looks like this:
CREATE TABLE `xcap` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) NOT NULL, `domain` varchar(64) NOT NULL, `doc` mediumtext NOT NULL, `doc_type` int(11) NOT NULL, `etag` varchar(64) NOT NULL, `source` int(11) NOT NULL, `doc_uri` varchar(255) NOT NULL, `port` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `doc_uri_idx` (`doc_uri`), KEY `account_doc_type_idx` (`username`,`domain`,`doc_type`), KEY `account_doc_type_uri_idx` (`username`,`domain`,`doc_type`,`doc_uri`), KEY `account_doc_uri_idx` (`username`,`domain`,`doc_uri`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
El 30/05/14 12:42, Alex Villacís Lasso escribió:
El 30/05/14 11:02, Alex Villacís Lasso escribió:
El 29/05/14 12:15, Alex Villacís Lasso escribió:
El 29/05/14 07:51, Daniel-Constantin Mierla escribió:
Hello,
the error message is printed in case of an invalid xml document.
Can you edit modules/xcap_server/xcap_misc.c and add inside function:
int xcaps_check_doc_validity(str *doc)
the log:
LM_ERR("xmld document is: [[%.*s]]\n", doc->len, doc->s);
before the line with:
docxml = xmlParseMemory(doc->s, doc->len);
Re-compile and re-install. Then run a test and send here the output of this line.
May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/xcap-caps/global/index May 29 12:10:41 elx /usr/sbin/kamailio[17556]: ALERT: <script>: ===== xhttp: xcap-caps : <null> May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_misc.c:690]: xcaps_check_doc_validity(): xmld document is: [[3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E3C7265736F757263652D6C6973747320786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A7265736F757263652D6C69737473223E3C6C697374206E616D653D22526F6F7447726F7570223E3C656E747279207572693D227369703A626D6163696173407062782E656C61737469782E636F6D223E3C646973706C61792D6E616D653E626D61636961733C2F646973706C61792D6E616D653E3C2F656E7472793E3C2F6C6973743E3C2F7265736F757263652D6C697374733E]] May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 29 12:10:41 elx /usr/sbin/kamailio[17560]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
Huh....?
The hex string happens to be an hex dump of the following:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="RootGroup"><entry uri="sip:bmacias@pbx.elastix.com"><display-name>bmacias</display-name></entry></list></resource-lists>
Looks like a SQL_C_BINARY is required somewhere. Right now I am trying to figure out where.
I worked this around by changing the column type to MEDIUMTEXT from the original MEDIUMBLOB:
ALTER TABLE xcap CHANGE COLUMN doc doc mediumtext not null;
Is this an acceptable solution? Could this cause issues with truly binary data stored there?
Now the table looks like this:
CREATE TABLE `xcap` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(64) NOT NULL, `domain` varchar(64) NOT NULL, `doc` mediumtext NOT NULL, `doc_type` int(11) NOT NULL, `etag` varchar(64) NOT NULL, `source` int(11) NOT NULL, `doc_uri` varchar(255) NOT NULL, `port` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `doc_uri_idx` (`doc_uri`), KEY `account_doc_type_idx` (`username`,`domain`,`doc_type`), KEY `account_doc_type_uri_idx` (`username`,`domain`,`doc_type`,`doc_uri`), KEY `account_doc_uri_idx` (`username`,`domain`,`doc_uri`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1
The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ALERT: <script>: ===== xhttp: request [HTTP/1.1] GET => /xcap-root/resource-lists/users/sip:avillacisIM@pbx.elastix.com/index May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ALERT: <script>: ===== xhttp: resource-lists : sip:avillacisIM@pbx.elastix.com May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ERROR: xcap_server [xcap_misc.c:690]: xcaps_check_doc_validity(): xmld document is: [[<?xml version="1.0" encoding="UTF-8" standalone="no"?><resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists"><list name="Trabajo"><entry uri="sip:bmaciasIM@pbx.elastix.com"><display-name>Bruno Macias (IM)</display-name></entry><entry uri="sip:admin@pbx.elastix.com"><display-name>ADMIN (telefono)</display-name></entry><entry uri="sip:elandivar@pbx.elastix.com"><display-name>elandivar</display-name></entry><entry uri="sip:bmacias@pbx.elastix.com"><display-name>Bruno Macias (telefono)</display-name></entry><entry uri="sip:jgutierrez@pbx.elastix.com"><display-name>Jorge Gutierrez (telefono)</display-name></entry></list><list name="Palosanto Quito"><entry uri="sip:2711@pbx.elastix.com"><display-name>Jorge Fonseca</display-name></entry><entry uri="sip:2712@pbx.elastix.com"><display-name>Jose Almeida</display-name></entry></list><list name="RootGroup"><entry uri="sip:0015148805346@pbx.elastix.com"><display-name>Elvita Crespo en Canada</display-name></entry><entry uri="sip:00593992764890@pbx.elastix.com"><dis]] May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ERROR: xcap_server [xcap_server.c:758]: xcaps_get_db_doc(): invalid xml doc retrieved from database May 30 14:54:52 elx /usr/sbin/kamailio[18984]: ERROR: xcap_server [xcap_server.c:1171]: w_xcaps_get(): could not fetch xcap document
On 30/05/14 22:02, Alex Villacís Lasso wrote:
[...] The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
Adjust the value of parameter:
http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
Cheers, Daniel
El 31/05/14 01:30, Daniel-Constantin Mierla escribió:
On 30/05/14 22:02, Alex Villacís Lasso wrote:
[...] The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
Adjust the value of parameter:
http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
Cheers, Daniel
Did not work. Same symptoms as before.
I see that the file modules/db_unixodbc/connection.h defines a strn structure with a hardcoded limit of STRN_LEN=1024 bytes per field.
El 02/06/14 12:31, Alex Villacís Lasso escribió:
El 31/05/14 01:30, Daniel-Constantin Mierla escribió:
On 30/05/14 22:02, Alex Villacís Lasso wrote:
[...] The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
Adjust the value of parameter:
http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
Cheers, Daniel
Did not work. Same symptoms as before.
I see that the file modules/db_unixodbc/connection.h defines a strn structure with a hardcoded limit of STRN_LEN=1024 bytes per field.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I have solved this issue. In order to make it work with unixodbc, I need to apply the attached patch. This patch removes the hardcoded 1024-byte limit for field data that exists in current kamailio-4.1.3. What the patch does is replace the embedded array in the 'struct strn' with a pointer and a field for allocated size. The patch also introduces three functions for manipulation of the modified 'struct strn'. When the SQLGetData function returns SQL_SUCCESS_WITH_INFO, the SQLSTATE is queried for the "data truncated" method. Then the rest of the data is fetched in a loop.
Please review this patch for inclusion. The actual detection of the truncation could need some work.
Also, the ODBC implementation could trip on true binary data (containing embedded binary zeroes) because it is not binary-safe. Are there scenarios in which the rest of Kamailio might need to retrieve or store data with a binary-safe implementation?
El 03/06/14 14:09, Alex Villacís Lasso escribió:
El 02/06/14 12:31, Alex Villacís Lasso escribió:
El 31/05/14 01:30, Daniel-Constantin Mierla escribió:
On 30/05/14 22:02, Alex Villacís Lasso wrote:
[...] The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
Adjust the value of parameter:
http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
Cheers, Daniel
Did not work. Same symptoms as before.
I see that the file modules/db_unixodbc/connection.h defines a strn structure with a hardcoded limit of STRN_LEN=1024 bytes per field.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I have solved this issue. In order to make it work with unixodbc, I need to apply the attached patch. This patch removes the hardcoded 1024-byte limit for field data that exists in current kamailio-4.1.3. What the patch does is replace the embedded array in the 'struct strn' with a pointer and a field for allocated size. The patch also introduces three functions for manipulation of the modified 'struct strn'. When the SQLGetData function returns SQL_SUCCESS_WITH_INFO, the SQLSTATE is queried for the "data truncated" method. Then the rest of the data is fetched in a loop.
Please review this patch for inclusion. The actual detection of the truncation could need some work.
Also, the ODBC implementation could trip on true binary data (containing embedded binary zeroes) because it is not binary-safe. Are there scenarios in which the rest of Kamailio might need to retrieve or store data with a binary-safe implementation?
How should I proceed to submit this patch for inclusion to the git repository?
Hello,
can you put the patch on the tracker to review it -- in this way should not be forgotten.
- http://sip-router.org/tracker/
I looked a bit, but has some new functions and touches quite a lot the existing parts, so I need more time to check it.
Thanks, Daniel
On 10/06/14 17:28, Alex Villacís Lasso wrote:
El 03/06/14 14:09, Alex Villacís Lasso escribió:
El 02/06/14 12:31, Alex Villacís Lasso escribió:
El 31/05/14 01:30, Daniel-Constantin Mierla escribió:
On 30/05/14 22:02, Alex Villacís Lasso wrote:
[...] The xml document retrieval is failing again. Now it is because retrieval is truncating the MEDIUMTEXT field at 1024 characters:
Adjust the value of parameter:
http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
Cheers, Daniel
Did not work. Same symptoms as before.
I see that the file modules/db_unixodbc/connection.h defines a strn structure with a hardcoded limit of STRN_LEN=1024 bytes per field.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I have solved this issue. In order to make it work with unixodbc, I need to apply the attached patch. This patch removes the hardcoded 1024-byte limit for field data that exists in current kamailio-4.1.3. What the patch does is replace the embedded array in the 'struct strn' with a pointer and a field for allocated size. The patch also introduces three functions for manipulation of the modified 'struct strn'. When the SQLGetData function returns SQL_SUCCESS_WITH_INFO, the SQLSTATE is queried for the "data truncated" method. Then the rest of the data is fetched in a loop.
Please review this patch for inclusion. The actual detection of the truncation could need some work.
Also, the ODBC implementation could trip on true binary data (containing embedded binary zeroes) because it is not binary-safe. Are there scenarios in which the rest of Kamailio might need to retrieve or store data with a binary-safe implementation?
How should I proceed to submit this patch for inclusion to the git repository?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
El 11/06/14 08:47, Daniel-Constantin Mierla escribió:
Hello,
can you put the patch on the tracker to review it -- in this way should not be forgotten.
I looked a bit, but has some new functions and touches quite a lot the existing parts, so I need more time to check it.
Added as task #443.
http://sip-router.org/tracker/index.php?do=details&task_id=443