I thought that we had discussed this item before and the code has been
fixed, but I'm seeing this problem in rev. 14330.  I've checked in a fix
in rev. 14331 to fix it immediately (it's not difficult to fix), as it
seems to be part of XECS-2044.  If there's a better fix around, rev.
14331 may need to be backed out.

Problem seen:  The value of the uri attribute of the pub-gruu element of
reg events generated by sipXregistry is a name-addr, not the GRUU URI.
That is, it has <...> around it, which is not syntactically allowed.
This prevents sipXrls from using the reg event data, apparently causing
BLF to malfunction.

For example:

        <reginfo xmlns="urn:ietf:params:xml:ns:reginfo" 
xmlns:gr="urn:ietf:params:xml:ns:gruuinfo" version="3369" state="full">
          <registration aor="sip:[email protected]" 
id="sip:[email protected]" state="active">
            <contact 
id="sip:[email protected]@@&lt;sip:[email protected]:5060;x-sipX-nonat&gt;"
 state="active" event="registered" q="1" 
callid="[email protected]" cseq="20">
              <uri>sip:[email protected]:5060;x-sipX-nonat</uri>
              <unknown-param 
name="+sip.instance">&lt;urn:uuid:32303800-AABB-0000-0000-00405A17C553&gt;</unknown-param>
              <gr:pub-gruu 
uri="&lt;sip:[email protected];gr&gt;"/>
            </contact>
          </registration>
        </reginfo>

Fix:  Change RegisterEventServer.cpp to generate the value of the
attribute correctly, i.e., as just the GRUU URI:

Index: sipXregistry/src/RegisterEventServer.cpp
===================================================================
--- sipXregistry/src/RegisterEventServer.cpp    (revision 14330)
+++ sipXregistry/src/RegisterEventServer.cpp    (working copy)
@@ -421,10 +421,12 @@
          0 != gruu->compareTo(SPECIAL_IMDB_NULL_VALUE))
       {
          content.append("      <gr:pub-gruu uri=\"");
-         Url tmp(*gruu);
-         tmp.setScheme(Url::SipUrlScheme);
-         tmp.setGRUU( UtlString("") );
-         XmlEscape(content, tmp.toString());    <------- toString generates 
name-addr format
+         // It is a bit clunky to just prepend "sip:" onto the GRUU identity.
+         // But if we were handling things properly as URIs, the gruu column
+         // of the registration DB would contain the full GRUU URI already.
+         UtlString tmp("sip:");
+         tmp.append(*gruu);
+         XmlEscape(content, tmp);
          content.append("\"/>\r\n");
       }
 
Dale


_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to