<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    it is still one IP from point of view of signaling (SIP). Do you
    want to provide single IP also for media (RTP)? If you have lot of
    calls, then it can result in a bottleneck for bandwidth as all
    voice/video streams end up on the same server.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 3/26/13 2:16 PM, Felipe Ramos wrote:<br>
    </div>
    <blockquote
cite="mid:CAHjGmH=cfsACPCsfVhBqDQTZY0+oWXmFSNyiBoEHT-HLZaSMbg@mail.gmail.com"
      type="cite">Daniel Thanks a lot for your response, in my case i
      don't want to provide so many ips to carriers acl because aws
      elastic ip are not consistent, that is the reason i wanted to
      proxy everything trough kamailio, here it is my setup&nbsp;
      <div>
        i wont be doing any registration because of my setup does not
        required it, on hardware i had kamailio forwarding to freeswitch
        then distributed to asterisk and finish to a sbcswitch which i
        will be virtualizing on aws.</div>
      <div><br>
      </div>
      <div>again thanks a lot for your advice you're the best.</div>
      <div>
        <div><br>
        </div>
        <div>originador &gt;&gt;&gt;kamailioA &gt;&gt;&gt;&gt;asterisk
          &gt;&gt; KamilioB&gt;&gt;&gt; Termination</div>
        <div><br>
        </div>
        <div>debug=4&nbsp;</div>
        <div>log_stderror=yes&nbsp;</div>
        <div>#!else&nbsp;</div>
        <div>debug=2&nbsp;</div>
        <div>log_stderror=yes&nbsp;</div>
        <div>#!endif&nbsp;</div>
        <div><br>
        </div>
        <div>memdbg=5&nbsp;</div>
        <div>memlog=5&nbsp;</div>
        <div><br>
        </div>
        <div>log_facility=LOG_LOCAL0&nbsp;</div>
        <div><br>
        </div>
        <div>fork=yes&nbsp;</div>
        <div>children=4&nbsp;</div>
        <div><br>
        </div>
        <div>auto_aliases=no&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>listen=<a class="moz-txt-link-freetext" href="udp:internal">udp:internal</a> ip:5060 advertise external ip:5060&nbsp;</div>
        <div>mhomed=0&nbsp;</div>
        <div>alias="<a moz-do-not-send="true" href="http://mysip.com">mysip.com</a>"&nbsp;</div>
        <div>alias="Internal IP:5060"&nbsp;</div>
        <div>alias=Internal IP:5060&nbsp;</div>
        <div>alias=Elastic IP&nbsp;</div>
        <div>alias=Elastic IP:5060&nbsp;</div>
        <div><br>
        </div>
        <div>port=5060&nbsp;</div>
        <div><br>
        </div>
        <div>enable_tls=no&nbsp;</div>
        <div>
          <br>
        </div>
        <div>#tcp_connection_lifetime=3605&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>#!ifdef WITH_SRCPATH&nbsp;</div>
        <div>mpath="modules_k:modules"&nbsp;</div>
        <div>#!else&nbsp;</div>
        <div>mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/"&nbsp;</div>
        <div>mpath="/usr/lib64/kamailio/modules_k/:/usr/lib64/kamailio/modules/"&nbsp;</div>
        <div>#!endif&nbsp;</div>
        <div>loadmodule "tm.so"&nbsp;</div>
        <div>loadmodule "sl.so"&nbsp;</div>
        <div>loadmodule "rr.so"&nbsp;</div>
        <div>loadmodule "maxfwd.so"&nbsp;</div>
        <div>loadmodule "textops.so"&nbsp;</div>
        <div>loadmodule "pv.so"&nbsp;</div>
        <div>loadmodule "dispatcher.so"&nbsp;</div>
        <div>loadmodule "usrloc.so"&nbsp;</div>
        <div>loadmodule "registrar.so"&nbsp;</div>
        <div>loadmodule "siputils.so"&nbsp;</div>
        <div>loadmodule "sanity.so"&nbsp;</div>
        <div>loadmodule "ctl.so"&nbsp;</div>
        <div>loadmodule "mi_rpc.so"&nbsp;</div>
        <div>loadmodule "acc.so"&nbsp;</div>
        <div>loadmodule "avpops.so"&nbsp;</div>
        <div>#!ifdef WITH_NAT&nbsp;</div>
        <div>loadmodule "nathelper.so"&nbsp;</div>
        <div>loadmodule "rtpproxy.so"&nbsp;</div>
        <div>#!endif&nbsp;</div>
        <div>loadmodule "xlog.so"&nbsp;</div>
        <div><br>
        </div>
        <div>modparam("tm", "failure_reply_mode", 3)&nbsp;</div>
        <div>modparam("tm", "fr_timer", 30000)&nbsp;</div>
        <div>modparam("tm", "fr_inv_timer", 120000)&nbsp;</div>
        <div><br>
        </div>
        <div>modparam("dispatcher", "list_file",
          "/etc/kamailio/dispatcher.lst")&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>#!ifdef WITH_NAT&nbsp;</div>
        <div># ----- rtpproxy params -----&nbsp;</div>
        <div>modparam("rtpproxy", "rtpproxy_sock", "udp:<a
            moz-do-not-send="true" href="http://127.0.0.1:7722">127.0.0.1:7722</a>")&nbsp;</div>
        <div><br>
        </div>
        <div># ----- nathelper params -----&nbsp;</div>
        <div>modparam("nathelper", "natping_interval", 30)&nbsp;</div>
        <div>modparam("nathelper", "ping_nated_only", 1)&nbsp;</div>
        <div>modparam("nathelper", "sipping_bflag", FLB_NATSIPPING)&nbsp;</div>
        <div>modparam("nathelper", "sipping_from", "<a
            moz-do-not-send="true"
            href="mailto:sip%3Apinger@kamailio.org">sip:pinger@kamailio.org</a>")&nbsp;</div>
        <div><br>
        </div>
        <div># params needed for NAT traversal in other modules&nbsp;</div>
        <div>modparam("nathelper|registrar", "received_avp",
          "$avp(RECEIVED)")&nbsp;</div>
        <div>modparam("usrloc", "nat_bflag", FLB_NATB)&nbsp;</div>
        <div>#!endif&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp;
          &nbsp;#subst_uri('/^<a class="moz-txt-link-freetext" href="sip:1(">sip:1(</a>[23456789][0-9]+)@(.*)$/<a class="moz-txt-link-freetext" href="sip:\1@\2/i">sip:\1@\2/i</a>');&nbsp;</div>
        <div><br>
        </div>
        <div>request_route {&nbsp;</div>
        <div>#checking for loops</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (!mf_process_maxfwd_header("10")) {&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_send_reply("483","Too Many Hops");&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (loose_route()) {&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!t_relay()) {&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_reply_error();&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;</div>
        <div><br>
        </div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if (is_method("INVITE")) {&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; record_route();&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; append_hf("X-Src-IP: $src_ip\r\n");&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>#i a planning to send it to distpatcher module once i get
          calls flowing.</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; if(!t_relay_to_udp("ip internal", "5060")) {&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sl_reply_error();&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; exit;&nbsp;</div>
        <div>}&nbsp;</div>
        <br>
        <div class="gmail_quote">On Tue, Mar 26, 2013 at 5:13 AM,
          Daniel-Constantin Mierla <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank">miconda@gmail.com</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"> Hello,
              <div class="im"><br>
                <br>
                <div>On 3/26/13 2:38 AM, Felipe Ramos wrote:<br>
                </div>
                <blockquote type="cite">Can anyone please point me on a
                  configuration example for kamailio when it is behind
                  NAT, i need to change the contact ip from internal to
                  external on sdp </blockquote>
                <br>
              </div>
              you should not need that. Kamailio should do record
              routing, advertising the public IP, so the signaling from
              the other side is sent to Route headers, not to Contact
              address.<br>
              <br>
              Use:<br>
              <br>
              <div>listen=<a moz-do-not-send="true">udp:_internal_ip_:5060</a>
                advertise _external_ip_:5060 <br>
                <br>
              </div>
              <div class="im"> <br>
                <blockquote type="cite">and proxy all media from outside
                  to internal asterisk farm.</blockquote>
              </div>
              Asterisk has support for external IP, so it can advertise
              that IP in SDP and the media will go directly to the
              asterisk. Makes no sense to make a user space forwarding
              with rtpproxy.<br>
              <br>
              Cheers,<br>
              Daniel<br>
              <br>
              <blockquote type="cite">
                <div class="im">
                  <div><br>
                  </div>
                  <div>Please any help will be&nbsp;appreciated.</div>
                  <div>most of documentation available is when client is
                    behind Nat but not when Server behind Nat like is
                    the case with Amazon aws vpc instances.</div>
                  <div><br>
                  </div>
                  <div> Again thank you before hand.</div>
                  <div><br>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <br>
                </div>
                <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a moz-do-not-send="true" href="http://conference.kamailio.com" target="_blank">http://conference.kamailio.com</a> -</pre>
                </font></span></div>
            <br>
            _______________________________________________<br>
            SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
            mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
              target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
  </body>
</html>