<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>If you want to do topology hiding for Presence, then there is no
      other way to do it, rather than storing the actual topology info
      in the contact header :(.<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 09/28/2017 11:18 AM, Royee Tichauer
      via Users wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFrVV=xm5GrpPUmoTuCVXKvTo0bqEBsGmPQ70GagCoc4riZWUA@mail.gmail.com">
      <div dir="ltr">I want topology hiding for SUBSCRIBEs. The 200 OK
        that is returned by our servers for the initial SUBSCRIBE
        reveals the full topology of our system. We are not using the
        opensips presence module. 
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Royee</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Thu, Sep 28, 2017 at 11:08 AM Răzvan Crainea
          <<a href="mailto:razvan@opensips.org"
            moz-do-not-send="true">razvan@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi, Royee!<br>
              <br>
              Do you need topology hiding for Presence? If not, simply
              avoid calling topology_hiding() for anything else but
              INVITEs.<br>
              <br>
              Best regards,<br>
            </tt></div>
          <div text="#000000" bgcolor="#FFFFFF">
            <pre class="m_8304071641965990399moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_8304071641965990399moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">www.opensips-solutions.com</a></pre>
          </div>
          <div text="#000000" bgcolor="#FFFFFF">
            <div class="m_8304071641965990399moz-cite-prefix">On
              09/28/2017 10:57 AM, Royee Tichauer via Users wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Thats that solves that then. 
                <div><br>
                </div>
                <div>Is there a way I can do topology hiding to only of
                  the legs to work around this issue?</div>
                <div><br>
                </div>
                <div>Thanks,</div>
                <div>Royee</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr">On Thu, Sep 28, 2017 at 9:36 AM Liviu
                  Chircu <<a href="mailto:liviu@opensips.org"
                    target="_blank" moz-do-not-send="true">liviu@opensips.org</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div bgcolor="#FFFFFF" text="#000000"> <tt>Quoted
                      params in Contact header parameters are accepted,
                      according to RFC 3261 </tt><tt>§ 25.1</tt><tt>:<br>
                    </tt>
                    <p><tt>contact-params     =  c-p-q / c-p-expires</tt><tt><br>
                      </tt><tt>                      / contact-extension</tt><tt><br>
                      </tt><tt>contact-extension  =  generic-param</tt><tt><br>
                        generic-param  =  token [ EQUAL gen-value ]</tt><tt><br>
                      </tt><tt>gen-value      =  token / host /
                        quoted-string<br>
                        quoted-string  =  SWS DQUOTE *(qdtext /
                        quoted-pair ) DQUOTE</tt><br>
                    </p>
                    <pre class="m_8304071641965990399m_3027351069693690281moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_8304071641965990399m_3027351069693690281moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a></pre>
                  </div>
                  <div bgcolor="#FFFFFF" text="#000000">
                    <div
                      class="m_8304071641965990399m_3027351069693690281moz-cite-prefix">On
                      28.09.2017 08:58, Royee Tichauer via Users wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div
                          class="m_8304071641965990399m_3027351069693690281inbox-inbox-uyb8Gf"
                          style="color:rgb(33,33,33);font-size:13px">
                          <div>
                            <div
                              class="m_8304071641965990399m_3027351069693690281inbox-inbox-F3hlO">
                              <div dir="ltr">Understood, thanks Razvaan.
                                <div><br>
                                </div>
                                <div>Another issue I'm having here with
                                  SUBSCRIBE handling is with topology
                                  hiding. When I use the topology hiding
                                  module an extra header parameter named
                                  'thinfo' is added to the contact field
                                  as explained in the docs. The field
                                  parameter value contains parenthesis
                                  surrounding it. For example the
                                  contact header I got was:</div>
                                <div><br>
                                </div>
                                <div>Contact:
                                  <sip:52.70.236.51:51842;transport=tcp;thinfo=<b>"</b>dm1KMyPQIyIU9fUQFpcQ0AVUdEXFwdbHNjClRbTF9TAGlwdkwWCBgeFFwoM3BMCBphbfKX18CEpfRENWAGhpfApUU0ddVANo<b>"</b>></div>
                                <div><br>
                                </div>
                                <div>The SUBSCRIBE request is being
                                  routed to another server which uses
                                  Java's Jane library. This library
                                  attempts to parse the headers of the
                                  SIP message and throws an exception of
                                  this contact header. When I remove the
                                  parenthesis it does work. My question
                                  is whether parenthesis are allowed in
                                  contact field headers or not. It seems
                                  that either opensips should not add
                                  these or that Jane has a bug in  I
                                  tried to look in the <a
                                    href="https://tools.ietf.org/html/rfc3261#section-20.10"
                                    target="_blank"
                                    moz-do-not-send="true">RFC-3261
                                    section 20.10</a> but didn't get a
                                  concrete answer.</div>
                                <div><br>
                                </div>
                                <div>Here are the Java Jain
                                  implementation of trying to parse the
                                  header and receiving an exception, I
                                  also have a <a
                                    href="https://drive.google.com/open?id=0B1qvsk1sLQdPb2MzZkNVQXFncGM"
                                    target="_blank"
                                    moz-do-not-send="true">sample</a> of
                                  this project in case it helps:</div>
                                <div><br>
                                </div>
                                <div>
                                  <pre style="font-family:Menlo;font-size:9pt">String sWithParenthesis = <span style="color:rgb(0,128,0);font-weight:bold">"Contact: <sip:52.70.236.51:51842;transport=tcp;thinfo=</span><span style="color:rgb(0,0,128);font-weight:bold">\"</span><span style="color:rgb(0,128,0);font-weight:bold">dm1KMyPQIyIU9fUQFpcQ0AVUdEXFwdbHNjClRbTF9TAGlwdkwWCBgeFFwoM3BMCBphbfKX18CEpfRENWAGhpfApUU0ddVANo</span><span style="color:rgb(0,0,128);font-weight:bold">\"</span><span style="color:rgb(0,128,0);font-weight:bold">>" </span>+ <span style="color:rgb(0,128,0);font-weight:bold">"</span><span style="color:rgb(0,0,128);font-weight:bold">\n</span><span style="color:rgb(0,128,0);font-weight:bold">"</span>;</pre>
                                </div>
                                <div> <span
                                    style="font-family:Menlo;font-size:9pt">HeaderParser
                                    h = ParserFactory.</span><span
                                    style="font-family:Menlo;font-size:9pt;font-style:italic">createParser</span><span
style="font-family:Menlo;font-size:9pt">(sWithParenthesis);</span></div>
                                <pre style="font-family:Menlo;font-size:9pt">SIPHeader header = h.parse();
System.<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">out</span>.println(header.getName());
System.<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">out</span>.println(header.getHeaderValue());</pre>
                                <div><br>
                                </div>
                                <div>And this is the exception I am
                                  getting:</div>
                                <div><br>
                                </div>
                                <div>
                                  <div><font color="#cc0000">Exception
                                      in thread "main"
                                      java.text.ParseException:
                                      [C@6477463f</font></div>
                                  <div><font color="#cc0000">Expecting
                                       >>>><<< got
                                      >>>"<<<</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
gov.nist.core.LexerCore.match(LexerCore.java:284)</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
gov.nist.javax.sip.parser.AddressParser.nameAddr(AddressParser.java:63)</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
gov.nist.javax.sip.parser.AddressParser.address(AddressParser.java:112)</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
gov.nist.javax.sip.parser.AddressParametersParser.parse(AddressParametersParser.java:55)</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
gov.nist.javax.sip.parser.ContactParser.parse(ContactParser.java:69)</font></div>
                                  <div><font color="#cc0000"><span style="white-space:pre-wrap">  </span>at
                                      com.vonage.Main.main(Main.java:14)</font></div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div
                          class="m_8304071641965990399m_3027351069693690281inbox-inbox-uyb8Gf"
                          style="color:rgb(33,33,33);font-size:13px">
                          <div>
                            <div title="Show quoted text"
                              class="m_8304071641965990399m_3027351069693690281inbox-inbox-mg"
style="border-radius:2px;color:rgb(117,117,117);display:inline-block;padding:0px
                              2px">…</div>
                          </div>
                        </div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr">On Tue, Sep 26, 2017 at 7:31 PM
                            Răzvan Crainea <<a
                              href="mailto:razvan@opensips.org"
                              target="_blank" moz-do-not-send="true">razvan@opensips.org</a>>
                            wrote:<br>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">
                            <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi,
                                Royee!<br>
                                <br>
                                There's no need for an actual dialog
                                (from OpenSIPS pov) - you can simply
                                route the NOTIFY messages as sequentials
                                - route them according to the
                                Record-Route headers.<br>
                                <br>
                                Best regards,<br>
                              </tt>
                              <pre class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190moz-signature" cols="72">Răzvan Crainea
OpenSIPS Developer
<a class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">www.opensips-solutions.com</a></pre>
                            </div>
                            <div text="#000000" bgcolor="#FFFFFF">
                              <div
class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190moz-cite-prefix">On
                                09/25/2017 07:06 PM, Royee Tichauer via
                                Users wrote:<br>
                              </div>
                            </div>
                            <div text="#000000" bgcolor="#FFFFFF">
                              <blockquote type="cite">
                                <div dir="ltr">Hi,
                                  <div><br>
                                  </div>
                                  <div>I am using opensips 2.1 as a SIP
                                    proxy and I am trying to figure out
                                    how to best handle SUBSCRIBE
                                    messages which need to be routed
                                    through to another SIP component. As
                                    I read in the <a
                                      href="https://tools.ietf.org/html/rfc3265#ref-1"
                                      target="_blank"
                                      moz-do-not-send="true">rfc3265</a> an
                                    initial (out of call) SUBSCRIBE
                                    creates a dialog which NOTIFYs and
                                    following SUBSCRIBE messages are
                                    part of and are routed within the
                                    same dialog. </div>
                                  <div><br>
                                  </div>
                                  <div>From looking at the opensips code
                                    I see that when "create_dialog" is
                                    called then the request is only
                                    handled if it is an INVITE request.
                                    So I'm trying to understand what is
                                    the proper way of handling the
                                    SUBSCRIBEs that come from the
                                    devices and the NOTIFYs that come
                                    from the PBX after the SUBSCRIBE is
                                    accepted.</div>
                                  <div><br>
                                  </div>
                                  <div>If there are examples for
                                    handling such SUBSCRIBEs that would
                                    be great.</div>
                                  <div><br>
                                  </div>
                                  <div>Thanks,</div>
                                  <div>Royee</div>
                                  <div><br>
                                  </div>
                                  <div><br>
                                  </div>
                                </div>
                                <br>
                                <fieldset
class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190mimeAttachmentHeader"></fieldset>
                                <br>
                              </blockquote>
                            </div>
                            <div text="#000000" bgcolor="#FFFFFF">
                              <blockquote type="cite">
                                <pre>_______________________________________________
Users mailing list
<a class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_8304071641965990399m_3027351069693690281m_-1088615402279222190moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                              </blockquote>
                              <br>
                            </div>
_______________________________________________<br>
                            Users mailing list<br>
                            <a href="mailto:Users@lists.opensips.org"
                              target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
                            <a
                              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                              rel="noreferrer" target="_blank"
                              moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                          </blockquote>
                        </div>
                      </div>
                      <br>
                      <fieldset
                        class="m_8304071641965990399m_3027351069693690281mimeAttachmentHeader"></fieldset>
                      <br>
                      <pre>_______________________________________________
Users mailing list
<a class="m_8304071641965990399m_3027351069693690281moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_8304071641965990399m_3027351069693690281moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                    </blockquote>
                    <br>
                  </div>
                  _______________________________________________<br>
                  Users mailing list<br>
                  <a href="mailto:Users@lists.opensips.org"
                    target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a><br>
                  <a
                    href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                </blockquote>
              </div>
              <br>
              <fieldset
                class="m_8304071641965990399mimeAttachmentHeader"></fieldset>
              <br>
              <pre>_______________________________________________
Users mailing list
<a class="m_8304071641965990399moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_8304071641965990399moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
          </div>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank"
            moz-do-not-send="true">Users@lists.opensips.org</a><br>
          <a
            href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>