<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Ashlin,<br>
    <br>
    you should implement it in this way:<br>
    <br>
    1.  set for all Polycom devices IP of your homer capture server as
    collector IP.<br>
    2. check if method is PUBLISH and it has Event == vq-rtcpxr and/or
    Content-type: application/vq-rtcpxr<br>
    3. extract CallID: from SDP body. (don't use Call-ID from PUBLISH)<br>
    4. make custom SQL insert to the log_capture or to the sip_capture
    table with original CallID value from SDP body<br>
    5. send reply 200 OK<br>
    <br>
    something like this:<br>
    <br>
     if (method == "PUBLISH" && hash_body("application/sdp"))<br>
     {<br>
                    if(sdp_get_line_startswith("$avp(callid)",
    "CalllID:)) {<br>
                            #cut off CalliD:  and insert it to DB as
    correlation_id <br>
                           sql_query("cb", "INSERT INTO
    logs_capture(...,correlaton_id,....) VALUES (....,
    $avp(callid),...);";<span style="color: rgb(223, 80, 0);
      font-family: Consolas, 'Liberation Mono', Menlo, Courier,
      monospace; font-size: 12px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      16.7999992370605px; orphans: auto; text-align: start; text-indent:
      0px; text-transform: none; white-space: pre; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
      !important; float: none; background-color: rgb(255, 255, 255);"></span><br>
                                                    <br>
                    }<br>
                    t_reply("200","PUBLISH RECORDED");<br>
                    exit(0);<br>
    <div>}</div>
    <br>
    Wbr,<br>
    Alexandr<br>
    <br>
    <div class="moz-cite-prefix">On 11/21/2014 2:30 AM, A Acosta wrote:<br>
    </div>
    <blockquote
cite="mid:CACjbU3WYkMm7pVeqv5RNk_gFVoFLs5g2xUkoHL1L7uHgvokzGQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div>
          <div>    #ALL MESSAGES</div>
          <div>    if($sht(a=>method::all) > 0) {</div>
          <div>        sql_query("cb", "INSERT INTO stats_method
            (from_date, to_date, method, total) VALUES($var(f_date),
            $var(t_date), 'ALL', $sht(a=>method::all))");</div>
          <div>        $sht(a=>method::all) = 0;</div>
          <div>    }</div>
          <div><br>
          </div>
          <div>}</div>
          <div><br>
          </div>
          <div>I managed to get this working with Opensips with the help
            of the following link:<a moz-do-not-send="true"
href="http://wiki.sipfoundry.org/display/sipXecs/Setting+up+an+RTCP-XR+collector+for+Polycom+Productivity+Suite">http://wiki.sipfoundry.org/display/sipXecs/Setting+up+an+RTCP-XR+collector+for+Polycom+Productivity+Suite</a></div>
          <div><br>
          </div>
          <div>However, Kamailio's routing logic syntax is different and
            I'm having a hard time parsing through it. This is what the
            RTCP-XR collection logic looks like in the Opensips routing
            logic: </div>
          <div><br>
          </div>
          <div>
            <div># main request routing logic</div>
            <div><br>
            </div>
            <div>route{</div>
            <div>        #For example, you can capture only needed
              methods...</div>
            <div>        if (method =~
              "^(INVITE|ACK|CANCEL|BYE|REFER|PRACK|UPDATE)") {</div>
            <div>                sip_capture();</div>
            <div>        }</div>
            <div><br>
            </div>
            <div>        else if (method =~ "^PUBLISH" && !$ct
              =~ "x-sipX-nonat" && $rd = "<a
                moz-do-not-send="true" href="http://domain.com">domain.com</a>"
              ) {</div>
            <div>               
              #xlog("$rd=================================");</div>
            <div>                perl_exec("messagedump");</div>
            <div>                t_reply("200","PUBLISH RECORDED");</div>
            <div>        }</div>
            <div><br>
            </div>
            <div>        exit;</div>
            <div>}</div>
            <div><br>
            </div>
            <div>onreply_route {</div>
            <div><br>
            </div>
            <div>        #And only needed reply or needed requests
              method</div>
            <div>        if(status =~
              "^(1[0-9][0-9]|[3[0-9][0-9]|4[0-9]|[56][0-9][0-9])") {</div>
            <div>        if($rm =~
              "^(INVITE|ACK|CANCEL|BYE|REFER|PRACK|UPDATE)") {</div>
            <div>                sip_capture();</div>
            <div>        }</div>
            <div>        exit;</div>
            <div>}</div>
            <div>}</div>
          </div>
          <div><br>
          </div>
          <div>Any help would be appreciated. </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div style="color:rgb(136,136,136)"><font
                  face="verdana,sans-serif"><b>Ashlin Jones-Acosta</b></font></div>
              <div style="color:rgb(136,136,136)"><font
                  face="verdana,sans-serif">Telephony Systems Engineer</font></div>
              <div style="color:rgb(136,136,136)"><font
                  face="verdana,sans-serif">Infrastructure Technology<br>
                </font></div>
              <div style="color:rgb(136,136,136)"><font
                  face="verdana,sans-serif">Direct: (805) 222-0934<br>
                </font></div>
              <div style="color:rgb(136,136,136)"><font
                  face="verdana,sans-serif"><b>PennyMac</b></font></div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>