<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi, Jeff!<br>
      <br>
      Unfortunately I don't think this will work.<br>
      The idea is that during a message processing, the same SDP buffer
      is seen by all functions. Changes do not immediately alter the
      buffer, but they are registered as lumps (changes that are later
      applied), when the message processing is done. So even in the
      branch route you will see the initial SDP, because it is part of
      the same processing context (branch route is triggered by the
      t_relay() function).<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 04/18/2017 09:44 PM, Jeff Pyle
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPhW+0+VMxkNpmgnTtGbP0iKrNUoOTNnkKrC7ULevSHE2C-sag@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dragomir, 
        <div><br>
        </div>
        <div>If Zoiper speaks only G.729, and SIP.js speaks only G.711,
          rtpengine isn't going to help.  It doesn't transcode.  From
          its <a moz-do-not-send="true"
            href="https://github.com/sipwise/rtpengine">github page</a>:</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div>
            <div><i>Rtpengine</i> does not (yet) support:</div>
          </div>
        </blockquote>
        <div>
          <div>
            <ul>
              <ul>
                <li>Repacketization or transcoding</li>
              </ul>
            </ul>
          </div>
        </div>
        <div><br>
        </div>
        <div>Is iLBC an option for you in SIP.js and Zoiper?  It's
          license free and sounds a little bitter.  If not, Asterisk or
          FreeSWITCH could perform this task with the appropriate G.729
          licenses.  </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Răzvan,</div>
        <div><br>
        </div>
        <div>Is there any effect of using either the codec manipulation
          or rtpengine in a branch route?  I ask this admittedly not
          understanding the buffers in use.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>- Jeff</div>
        <div> </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Tue, Apr 18, 2017 at 12:39 PM,
              Dragomir Haralambiev <span dir="ltr"><<a
                  moz-do-not-send="true"
                  href="mailto:goup2010@gmail.com" target="_blank">goup2010@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">Hi Razvan,
                  <div><br>
                  </div>
                  <div>How to make follow connection using rtpengine?</div>
                  <div><br>
                  </div>
                  <div>Zoiper(g729) <-----> Opensips(rtpengine)
                    <--------> browser (SIP.JS with g711) </div>
                </div>
                <div class="gmail-HOEnZb">
                  <div class="gmail-h5">
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2017-04-18 19:10
                        GMT+03:00 Răzvan Crainea <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:razvan@opensips.org"
                            target="_blank">razvan@opensips.org</a>></span>:<br>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
                          0.8ex;border-left:1px solid
                          rgb(204,204,204);padding-left:1ex">
                          <div bgcolor="#FFFFFF"> <tt>Hi, Jeff!<br>
                              <br>
                              Unfortunately you can't use both rtpengine
                              and codec_delete_*, that's because each
                              change different buffers. The
                              codec_delete_* function runs on the
                              initial SDP received, then rtpengine
                              completely overwrites the SDP with
                              whatever rtpengine replied.<br>
                              The only way you can do something like
                              this (although it may be very ugly) is to
                              store the rtpengine reply in a pvar using
                              the 3rd[1] parameter of the rtpengine_*
                              functions and perform some text
                              replaces[2] on it, then replace the body
                              "manually".<br>
                              <br>
                              [1]
                              <a moz-do-not-send="true"
class="gmail-m_-1514856936150048012m_-8428955468467181929moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/2.3.x/rtpengine.html#rtpengine.f.rtpengine_offer"
                                target="_blank">http://www.opensips.org/html/d<wbr>ocs/modules/2.3.x/rtpengine.ht<wbr>ml#rtpengine.f.rtpengine_offer</a><br>
                              [2] <a moz-do-not-send="true"
class="gmail-m_-1514856936150048012m_-8428955468467181929moz-txt-link-freetext"
href="http://www.opensips.org/html/docs/modules/2.3.x/textops#idp5907728"
                                target="_blank">http://www.opensips.org/html/d<wbr>ocs/modules/2.3.x/textops#idp5<wbr>907728</a><br>
                              <br>
                              Best regards,<br>
                            </tt>
                            <pre class="gmail-m_-1514856936150048012m_-8428955468467181929moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a moz-do-not-send="true" class="gmail-m_-1514856936150048012m_-8428955468467181929moz-txt-link-abbreviated" href="http://www.opensips-solutions.com" target="_blank">www.opensips-solutions.com</a></pre>
                            <div
class="gmail-m_-1514856936150048012m_-8428955468467181929moz-cite-prefix">On
                              04/18/2017 06:49 PM, Jeff Pyle wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">Hello,
                                <div><br>
                                </div>
                                <div>This is on OpenSIPS 2.3, downloaded
                                  from git and compiled today.</div>
                                <div><br>
                                </div>
                                <div>An INVITE arrives over TLS with the
                                  following SDP:</div>
                                <div><br>
                                </div>
                                <div>
                                  <div>v=0</div>
                                  <div>o=- 1492528621 1492528621 IN IP4
                                    172.22.202.191</div>
                                  <div>s=Polycom IP Phone</div>
                                  <div>c=IN IP4 172.22.202.191</div>
                                  <div>t=0 0</div>
                                  <div>m=audio 16852 RTP/SAVP 115 9 0 8
                                    110 18 127</div>
                                  <div>a=rtpmap:115 G7221/32000</div>
                                  <div>a=fmtp:115 bitrate=48000</div>
                                  <div>a=rtpmap:9 G722/8000</div>
                                  <div>a=rtpmap:0 PCMU/8000</div>
                                  <div>a=rtpmap:8 PCMA/8000</div>
                                  <div>a=rtpmap:110 iLBC/8000</div>
                                  <div>a=fmtp:110 mode=20</div>
                                  <div>a=rtpmap:18 G729/8000</div>
                                  <div>a=fmtp:18 annexb=no</div>
                                  <div>a=rtpmap:127 telephone-event/8000</div>
                                  <div>a=rtcp:16853</div>
                                  <div>a=crypto:1
                                    AES_CM_128_HMAC_SHA1_80
                                    inline:[stripped]</div>
                                  <div>a=setup:actpass</div>
                                  <div>a=fingerprint:sha-1 [stripped]</div>
                                  <div>m=audio 16888 RTP/AVP 115 9 0 8
                                    110 18 127</div>
                                  <div>a=rtpmap:115 G7221/32000</div>
                                  <div>a=fmtp:115 bitrate=48000</div>
                                  <div>a=rtpmap:9 G722/8000</div>
                                  <div>a=rtpmap:0 PCMU/8000</div>
                                  <div>a=rtpmap:8 PCMA/8000</div>
                                  <div>a=rtpmap:110 iLBC/8000</div>
                                  <div>a=fmtp:110 mode=20</div>
                                  <div>a=rtpmap:18 G729/8000</div>
                                  <div>a=fmtp:18 annexb=no</div>
                                  <div>a=rtpmap:127 telephone-event/8000</div>
                                  <div>a=rtcp:16889</div>
                                </div>
                                <div><br>
                                </div>
                                <div>I run </div>
                                <div>  codec_delete_expect_re(PCMU|PC<wbr>MA|telephone-event)</div>
                                <div>but it doesn't have any effect. 
                                  The INVITE leaving after t_relay()
                                  over UDP to localhost on a different
                                  port is the same as when it came in
                                  (with the exception of the c= line
                                  because of rtpengine).</div>
                                <div><br>
                                </div>
                                <div>At log_level=6 the only log entry I
                                  see is</div>
                                <div>  DBG:sipmsgops:create_codec_lum<wbr>ps:
                                  creating 0 streams</div>
                                <div><br>
                                </div>
                                <div>I'm not sure where to go from here.</div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                                <div>- Jeff</div>
                                <div><br>
                                </div>
                              </div>
                              <br>
                              <fieldset
class="gmail-m_-1514856936150048012m_-8428955468467181929mimeAttachmentHeader"></fieldset>
                              <br>
                              <pre>______________________________<wbr>_________________
Users mailing list
<a moz-do-not-send="true" class="gmail-m_-1514856936150048012m_-8428955468467181929moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" class="gmail-m_-1514856936150048012m_-8428955468467181929moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    

  </div>

</blockquote></div></div></div></div></blockquote></div>
</div></div></div>


<fieldset class="mimeAttachmentHeader"></fieldset>
<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>
</body></html>