<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>A small correction: there is no WITH_DISPATCHER in the default
      switch, but the module readme has a rather complete example:</p>
    <p>  -
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config">https://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 17.11.18 01:02, David Villasmil
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFGRPVq11xXdPZXkvbbtrTosXiD3L1hOOLoPspzoOavn+S-H1Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">Your best bet is to use the default config, and
          enable:
          <div><br>
          </div>
          <div>
            <div>#!define WITH_MYSQL</div>
            <div>#!define WITH_AUTH</div>
            <div>#!define WITH_DISPATCHER</div>
            <div><br>
            </div>
            <div>add your users to the db, and the gateways to the
              dispatcher table with setid 1, you'll be good to go</div>
          </div>
          <div><br clear="all">
            <div>
              <div dir="ltr" class="gmail_signature">
                <div dir="ltr">
                  <div>Regards,</div>
                  <div><br>
                  </div>
                  David Villasmil
                  <div>email: <a
                      href="mailto:david.villasmil.work@gmail.com"
                      target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a></div>
                  <div>phone: +34669448337</div>
                </div>
              </div>
            </div>
            <br>
          </div>
        </div>
      </div>
      <div hspace="streak-pt-mark" style="max-height:1px"><img alt=""
          style="width:0px;max-height:0px;overflow:hidden"
src="https://mailfoogae.appspot.com/t?sender=aZGF2aWQudmlsbGFzbWlsLndvcmtAZ21haWwuY29t&type=zerocontent&guid=2484666c-bdc2-4734-8e3d-b66b042a9966"
          moz-do-not-send="true"><font size="1" color="#ffffff">ᐧ</font></div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Wed, Nov 14, 2018 at 11:43 AM Valter Nogueira
          <<a href="mailto:valter@fastway.com.br"
            moz-do-not-send="true">valter@fastway.com.br</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">I am going to replace the asterisk.
            <div><br>
            </div>
            <div>Currenty, asterisk proxies all call incoming into a
              public ip address to a third party gateway in a non-public
              ip address.</div>
            <div><br>
            </div>
            <div>Asterisk server has 2 NICs.</div>
            <div><br>
            </div>
            <div>Asterisk authenticates incoming call and autheticates
              itself in sip gateway.</div>
            <div><br>
            </div>
            <div>I just need to forward the call and proxy RTP</div>
            <div><br>
            </div>
            <div>I guess that is a matter of rewriting $ru (rewriteuri,
              rewriteuser, rewriteuserpass?)</div>
            <div><br>
            </div>
            <div>Thank you,</div>
            <div class="gmail_extra"><br clear="all">
              <div>
                <div class="m_2959260649802887851gmail_signature"
                  data-smartmail="gmail_signature">
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div>
                              <div dir="ltr">
                                <div><br>
                                  <br>
                                </div>
                                <div>Atenciosamente,<br>
                                  <br>
                                  <img
src="http://fastway.com.br/assinaturas/jpg/assinatura_branca_valter-min.jpg"
                                    moz-do-not-send="true"><br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <div class="gmail_quote">2018-11-14 7:43 GMT-02:00 David
                Villasmil <span dir="ltr"><<a
                    href="mailto:david.villasmil.work@gmail.com"
                    target="_blank" moz-do-not-send="true">david.villasmil.work@gmail.com</a>></span>:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">You
                  would be authenticating the calls TWICE, is this what
                  you want?<br>
                  I found the easiest would be to just configure in your
                  asterisk the Kamailio gateway as the proxy.<br>
                  <br>
                  I haven’t worked with asterisk in a while, but in
                  freeswitch al that’s needed is adding a parameter
                  called “proxy” and set the Kamailio’s up address. All
                  this with Kamailio’s default configuration.<br>
                  <br>
                  This would only work if both asterisk and Kamailio
                  have public addresses. No RTP proxying, they’d go
                  straight to the provider.<br>
                  <br>
                  Regards,<br>
                  <br>
                  David<br>
                  <div class="gmail_quote">
                    <div dir="ltr">On Wed, 14 Nov 2018 at 02:07, Valter
                      Nogueira <<a
                        href="mailto:valter@fastway.com.br"
                        target="_blank" moz-do-not-send="true">valter@fastway.com.br</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">Hi Henning,
                        <div><br>
                        </div>
                        <div>thanks for your tip.</div>
                        <div><br>
                        </div>
                        <div>I just checked it and I am sure it will be
                          valuable.</div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                      <div class="gmail_extra"><br clear="all">
                        <div>
                          <div data-smartmail="gmail_signature">
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div>
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr">
                                          <div><br>
                                            <br>
                                          </div>
                                          <div>Atenciosamente,<br>
                                            <br>
                                            <img
src="http://fastway.com.br/assinaturas/jpg/assinatura_branca_valter-min.jpg"
                                              moz-do-not-send="true"><br>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="gmail_extra">
                        <br>
                        <div class="gmail_quote">2018-11-13 19:04
                          GMT-02:00 Henning Westerholt <span dir="ltr"><<a
                              href="mailto:hw@kamailio.org"
                              target="_blank" moz-do-not-send="true">hw@kamailio.org</a>></span>:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0 0 0 .8ex;border-left:1px
                            #ccc solid;padding-left:1ex">Am Freitag, 9.
                            November 2018, 21:25:15 CET schrieb Valter
                            Nogueira:<br>
                            > Today, I use Asterisk as a SIP/RTP
                            PROXY<br>
                            > <br>
                            > I proxy from customers Asterisks to a
                            VOIP provider, in a multi-homed<br>
                            > server.<br>
                            > <br>
                            > Now, I want to move to Kamailio without
                            any rupture in customer's<br>
                            > configuration.<br>
                            > <br>
                            > As anyone can imagine I am kind of
                            lost.<br>
                            > <br>
                            > USER ACCOUNTS<br>
                            > <br>
                            > In Asterisk, I create a dynamic host
                            account named ACCOUNT1 and I receive<br>
                            > in *FROM HEADER
                            <a class="moz-txt-link-freetext" href="sip:ACCOUNT1@customer_ip_address*">sip:ACCOUNT1@customer_ip_address*</a><br>
                            > <br>
                            > In Kamailio, I have to define the
                            account's domain like *kamctl add<br>
                            > <a href="mailto:ACCOUNT1@mydomain.com"
                              target="_blank" moz-do-not-send="true">ACCOUNT1@mydomain.com</a>
                            <<a href="mailto:ACCOUNT1@mydomain.com"
                              target="_blank" moz-do-not-send="true">ACCOUNT1@mydomain.com</a>>
                            password. *Kamailio just<br>
                            > accepts a REGISTER/INVITE from *<a
                              href="mailto:ACCOUNT1@mydomain.com"
                              target="_blank" moz-do-not-send="true">ACCOUNT1@mydomain.com</a><br>
                            > <<a
                              href="mailto:ACCOUNT1@mydomain.com"
                              target="_blank" moz-do-not-send="true">ACCOUNT1@mydomain.com</a>>*<br>
                            > <br>
                            > <br>
                            > SIP/RTP PROXY<br>
                            > <br>
                            > In Asterisk, I just dialout to the VOIP
                            PROVIDER like *dial<br>
                            > (SIP/VOIP_ACCOUNT/${EXTENSION})*<br>
                            > <br>
                            > Asterisk does all the magic (it is a
                            B2BUA). It bridges the new call and<br>
                            > media to the original call. Moreover,
                            user don't know anything about how<br>
                            > call are completed, nor how credentials
                            are setup and soon.<br>
                            > <br>
                            > In Kamailio, I guess that I have to use
                            nat, tm and rtpproxy modules and<br>
                            > maybe uac. I am not sure how to setup
                            it.<br>
                            > <br>
                            > Can someone send me a clue?<br>
                            <br>
                            Hello Valter,<br>
                            <br>
                            did you already looked into this tutorials?
                            They are for a bit older version <br>
                            of Kamailio and asterisk, but should give
                            you ideas about the direction.<br>
                            <br>
                            <a
                              href="https://kb.asipto.com/asterisk:index"
                              rel="noreferrer" target="_blank"
                              moz-do-not-send="true">https://kb.asipto.com/asterisk:index</a><br>
                            <br>
                            Best regards,<br>
                            <br>
                            Henning<span
                              class="m_2959260649802887851HOEnZb"><font
                                color="#888888"><br>
                                <span><font color="#888888"><br>
                                    -- <br>
                                    Henning Westerholt - <a
                                      href="https://skalatan.de/blog/"
                                      rel="noreferrer" target="_blank"
                                      moz-do-not-send="true">https://skalatan.de/blog/</a><br>
                                    Kamailio services - <a
                                      href="https://skalatan.de/services"
                                      rel="noreferrer" target="_blank"
                                      moz-do-not-send="true">https://skalatan.de/services</a><br>
                                    Kamailio security assessment - <a
                                      href="https://skalatan.de/de/assessment"
                                      rel="noreferrer" target="_blank"
                                      moz-do-not-send="true">https://skalatan.de/de/assessment</a><br>
                                  </font></span></font></span></blockquote>
                        </div>
                        <span class="m_2959260649802887851HOEnZb"><font
                            color="#888888"><br>
                          </font></span></div>
                      <span class="m_2959260649802887851HOEnZb"><font
                          color="#888888">
_______________________________________________<br>
                          Kamailio (SER) - Users Mailing List<br>
                          <a href="mailto:sr-users@lists.kamailio.org"
                            target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
                          <a
                            href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                        </font></span></blockquote>
                  </div>
                  <br>
                  _______________________________________________<br>
                  Kamailio (SER) - Users Mailing List<br>
                  <a href="mailto:sr-users@lists.kamailio.org"
                    target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
                  <a
                    href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
                    rel="noreferrer" target="_blank"
                    moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                  <br>
                </blockquote>
              </div>
              <br>
            </div>
          </div>
          _______________________________________________<br>
          Kamailio (SER) - Users Mailing List<br>
          <a href="mailto:sr-users@lists.kamailio.org" target="_blank"
            moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
          <a
            href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
  </body>
</html>