<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi,<br>
        <br>
        Somehow is hard to believe that a single call to
        rtpproxy_offer() will insert 2 ips. So :<br>
            - what are the params you pass to this function ?<br>
            - place an xlog("*** Before rtpproxy_offer() \n"); before
        the function call and check how many times you get it for a single
        reply processing.<br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 09.06.2014 08:43, kaushik parmar wrote:<br>
    </div>
    <blockquote
cite="mid:CAGzPE1-996cwHPz5JFx7T23pxZrT1rZGfdydr8mCC7GHFBpkEQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I am using opensips 1.11.1-notls (x86_64/linux). If i dont
          write <span style="font-family:monospace;font-size:10px">rtpproxy_offer()
          </span>not modify SDP and send address of voip switch. If i
          write <span style="font-family:monospace;font-size:10px">rtpproxy_offer() </span>write
          in write onreply_route[] then it adds IP and Ports two times. </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Sun, Jun 8, 2014 at 8:17 PM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div><tt>Hi,<br>
                  <br>
                  Your script logic should take care of avoiding
                  multiple rtpproxy_offer() - if logic is too complex,
                  use a flag to remember if set or not.<br>
                  <br>
                  BTW, what opensips version are you using ?<br>
                  <br>
                  Regards,<br>
                </tt>
                <div class="">
                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                </div>
                <div>
                  <div class="h5"> On 07.06.2014 08:42, kaushik parmar
                    wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <blockquote type="cite">
                    <div dir="ltr">Hello,
                      <div><br>
                      </div>
                      <div>Thank you for reply. I have checked it. Is
                        there any way to check if ip address already set
                        to xx.xx.xx.xx or not in opensips? If set then
                        do nothing else apply rtpproxy_offer().</div>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote">On Fri, Jun 6, 2014 at
                        10:45 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:bogdan@opensips.org"
                            target="_blank">bogdan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <div><tt>Hello,<br>
                                <br>
                                Check your script, for sure you do the
                                rtpproxy_offer twice for that SIP
                                message.<br>
                                <br>
                                Regards,<br>
                              </tt>
                              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                              <div>
                                <div> On 06.06.2014 19:03, kaushik
                                  parmar wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">Hello,
                                    <div><br>
                                    </div>
                                    <div>rtpproxy_offer() set IP and
                                      Port numbers twice in SDP. My code
                                      and SDP output are as below.</div>
                                    <div><br>
                                    </div>
                                    <div><b>Opensips.cfg</b> </div>
                                    <div><br>
                                    </div>
                                    <div>onreply_route[handle_nat] {</div>
                                    <div>
                                      <div>
                                        <div>            if
                                          (is_method("INVITE")
                                          &amp;&amp;
                                          has_body("application/sdp"))</div>
                                        <div><span
                                            style="white-space:pre-wrap">
                                          </span>{</div>
                                      </div>
                                      <div>                   
                                         rtpproxy_offer();</div>
                                      <div>            }</div>
                                      <div>}</div>
                                      <div><br>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div><b>SDP Packet : </b></div>
                                      <div>
                                        <div><br>
                                        </div>
                                        <div><b>SDP Before
                                            rtpproxy_offer(); </b></div>
                                        <div><b><br>
                                          </b></div>
                                        <div>
                                          <div>v=0</div>
                                          <div> o=Sippy 44829008 1 IN
                                            IP4  yy.yy.yy.yy</div>
                                          <div>s=-</div>
                                          <div>t=0 0</div>
                                          <div>m=audio 46946 RTP/AVP 110
                                            0 8 3 101</div>
                                          <div>c=IN IP4 yy.yy.yy.yy</div>
                                          <div>a=rtpmap:110 speex/8000</div>
                                          <div>a=fmtp:110 mode=3;vbr=on</div>
                                          <div> a=rtpmap:0 PCMU/8000</div>
                                          <div>a=rtpmap:8 PCMA/8000</div>
                                          <div>a=rtpmap:3 gsm/8000</div>
                                          <div>a=rtpmap:101
                                            telephone-event/8000</div>
                                          <div>a=fmtp:101 0-15</div>
                                          <div>a=sendrecv</div>
                                          <div>a=silenceSupp:off - - - -</div>
                                          <div style="font-weight:bold">
                                            <br>
                                          </div>
                                        </div>
                                        <div><b>SDP After
                                            rtpproxy_offer(); </b><b><br>
                                          </b></div>
                                        <div><br>
                                        </div>
                                        <div>v=0</div>
                                        <div>o=Sippy 44829008 1 IN IP4
                                          xx.xx.xx.xx</div>
                                        <div>s=-</div>
                                        <div>t=0 0</div>
                                        <div>m=audio 40240 40240 RTP/AVP
                                          110 0 8 3 101</div>
                                        <div>c=IN IP4 xx.xx.xx.xx
                                          xx.xx.xx.xx</div>
                                        <div>a=rtpmap:110 speex/8000</div>
                                        <div>a=fmtp:110 mode=3;vbr=on</div>
                                        <div>a=rtpmap:0 PCMU/8000</div>
                                        <div>a=rtpmap:8 PCMA/8000</div>
                                        <div>a=rtpmap:3 gsm/8000</div>
                                        <div>a=rtpmap:101
                                          telephone-event/8000</div>
                                        <div>a=fmtp:101 0-15</div>
                                        <div>a=sendrecv</div>
                                        <div>a=silenceSupp:off - - - -</div>
                                        <div>a=oldmediaip:yy.yy.yy.yy</div>
                                        <div>a=oldmediaip:yy.yy.yy.yy</div>
                                        <div>a=nortpproxy:yes</div>
                                        <div>a=nortpproxy:yes</div>
                                      </div>
                                      <div><br>
                                      </div>
                                      <div>Please help to resolve issue
                                        for Double IP and Port in SDP.</div>
                                      <div><br>
                                      </div>
                                      <div><br>
                                      </div>
                                      -- <br>
                                      <div dir="ltr">
                                        <div>
                                          <div><font face="arial">Kind
                                              regards,</font></div>
                                          <div><font face="arial"><br>
                                            </font></div>
                                          <div><font face="arial">Kaushik
                                              Parmar</font></div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div dir="ltr">
                        <div>
                          <div><font face="arial">Kind regards,</font></div>
                          <div><font face="arial"><br>
                            </font></div>
                          <div><font face="arial">Kaushik Parmar</font></div>
                        </div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr">
          <div>
            <div><font face="arial">Kind regards,</font></div>
            <div><font face="arial"><br>
              </font></div>
            <div><font face="arial">Kaushik Parmar</font></div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>