<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><br>
      Onde voce cria na verdade &eacute; indiferente voce precisa dos
      certificados da forma correta, apenas isso, um lado &eacute; "servidor" o
      outro &eacute; cliente, ent&atilde;o o opensips neste caso &eacute; o servidor , no
      asterisk voc&ecirc; precisa.<br>
      <br>
      <br>
      Isso aqui seria o exemplo asterisk
      (<a class="moz-txt-link-freetext" href="https://wiki.asterisk.org/wiki/display/AST/SIP+TLS+Transport">https://wiki.asterisk.org/wiki/display/AST/SIP+TLS+Transport</a>)<br>
      <br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <div class="container" title="Hint: double-click to select code">
        <div class="line number1 index0 alt2"><code class="java plain">[general]</code></div>
        <div class="line number2 index1 alt1"><code class="java plain">tlsenable=yes</code></div>
        <div class="line number3 index2 alt2"><code class="java plain">tlscertfile=/etc/asterisk/asterisk.pem</code></div>
        <div class="line number4 index3 alt1"><code class="java plain">tlscafile=/etc/ssl/ca.pem&nbsp;
            ; This is the CA file used to generate both certificates</code></div>
        <div class="line number5 index4 alt2"><code class="java plain">register
            =&gt; tls:</code><code class="java comments">//100:test@192.168.0.100:5061</code></div>
        <div class="line number6 index5 alt1">&nbsp;</div>
        <div class="line number7 index6 alt2"><code class="java plain">[</code><code
            class="java value">101</code><code class="java plain">]</code></div>
        <div class="line number8 index7 alt1"><code class="java plain">type=friend</code></div>
        <div class="line number9 index8 alt2"><code class="java plain">context=internal</code></div>
        <div class="line number10 index9 alt1"><code class="java plain">host=</code><code
            class="java value">192.168</code><code class="java plain">.</code><code
            class="java value">0.100</code> <code class="java plain">;
            The host should be either IP or hostname and should </code></div>
        <div class="line number11 index10 alt2"><code class="java
            spaces">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</code><code class="java plain">;
            match the </code><code class="java string">'common name'</code>
          <code class="java plain">field in the servers certificate</code></div>
        <div class="line number12 index11 alt1"><code class="java plain">secret=test</code></div>
        <div class="line number13 index12 alt2"><code class="java plain">dtmfmode=rfc2833</code></div>
        <div class="line number14 index13 alt1"><code class="java plain">disallow=all</code></div>
        <div class="line number15 index14 alt2"><code class="java plain">allow=ulaw</code></div>
        <div class="line number16 index15 alt1"><code class="java plain">transport=tls
          </code></div>
        <div class="line number17 index16 alt2"><code class="java plain">port=</code><code
            class="java value">5061</code></div>
      </div>
      <br>
      Note a op&ccedil;&atilde;o transport=tls, esta &eacute; necessaria<br>
      <br>
      No opensips ele estando configurado de acordo ent&atilde;o &eacute; s&oacute; apontar o
      certificado e etc..<br>
      <br>
<a class="moz-txt-link-freetext" href="https://github.com/antonraharja/book-opensips-101/blob/master/content/3.2.%20SIP%20TLS%20Secure%20Calling.mediawiki">https://github.com/antonraharja/book-opensips-101/blob/master/content/3.2.%20SIP%20TLS%20Secure%20Calling.mediawiki</a><br>
      <br>
      <br>
      Claro, presumo aqui que seu opensips funciona perfeitamente via
      UDP<br>
      <br>
      <br>
      <br>
      <br>
      Em 04/11/13 13:58, Franque Cust&oacute;dio escreveu:<br>
    </div>
    <blockquote
cite="mid:CAEmoEndhnAhdCFxseXXYxCHVzwGLJYq5OCfgO4ECTX7MkepenA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Meus
          arquivos de configura&ccedil;&atilde;o (na parte do TLS) est&atilde;o assim:</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">
          <br>
        </div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">---------------------------------------------------------</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">
          OPENSIPS.CFG</div>
        <div class="gmail_default">
          <div class="gmail_default"><font face="verdana, sans-serif"><br>
            </font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">disable_tcp=no</font></div>
          <div class="gmail_default">
            <span style="font-family:verdana,sans-serif">disable_tls =
              no</span><br>
          </div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default"><font face="verdana, sans-serif">listen
              = tls:<a moz-do-not-send="true"
                href="http://10.128.0.18:5080">10.128.0.18:5080</a></font></div>
          <div class="gmail_default"><font face="verdana, sans-serif"><br>
            </font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_port_no
              = 5080</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_verify_server
              = 0</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_verify_client
              = 0</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_require_client_certificate
              = 0</font></div>
          <div class="gmail_default">
            <font face="verdana, sans-serif">tls_method = TLSv1</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_certificate
              = "/etc/opensips/tls/user/user-cert.pem"</font></div>
          <div class="gmail_default">
            <font face="verdana, sans-serif">tls_private_key =
              "/etc/opensips/tls/user/user-privkey.pem"</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif">tls_ca_list
              = "/etc/opensips/tls/user/user-calist.pem"</font></div>
          <div class="gmail_default"><font face="verdana, sans-serif"><br>
            </font></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif">---------------------------------------------------------</span><font
              face="verdana, sans-serif"><br>
            </font></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif">SIP.CONF</span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default">
            <div class="gmail_default"><font face="verdana, sans-serif"><br>
              </font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">;
                TLS</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">tlsenable=yes</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">tlsbindaddr=0.0.0.0</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">tlscertfile=/etc/asterisk/keys/user-cert.pem</font></div>
            <div class="gmail_default">
              <font face="verdana, sans-serif">tlscafile=/etc/asterisk/keys/ca.crt</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">tlscipher=ALL</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif">tlsclientmethod=tlsv1</font></div>
            <div class="gmail_default"><font face="verdana, sans-serif"><br>
              </font></div>
            <div class="gmail_default"><span
                style="font-family:verdana,sans-serif">register =&gt;
                tls://<a moz-do-not-send="true"
                  href="http://usuario:senha@10.128.0.18:5080/usuario">usuario:senha@10.128.0.18:5080/usuario</a></span><br>
            </div>
            <div class="gmail_default"
              style="font-family:verdana,sans-serif"><br>
            </div>
          </div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif">---------------------------------------------------------</span><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif">Uma quest&atilde;o (pode
              ser b&aacute;sica, ent&atilde;o me desculpem): eu criou as
              chaves/certificados no Opensips e copio pro Asterisk, ou o
              contr&aacute;rio?</span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
          <div class="gmail_default"><span
              style="font-family:verdana,sans-serif"><br>
            </span></div>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div><br>
          <br>
---------------------------------------------------------------<br>
          Franque Cust&oacute;dio<br>
          <a moz-do-not-send="true" href="mailto:franque@gmail.com">franque@gmail.com</a><br>
---------------------------------------------------------------</div>
        <br>
        <br>
        <div class="gmail_quote">2013/11/4 Mike Tesliuk <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:mike@tesliuk.com"
              target="_blank">mike@tesliuk.com</a>&gt;</span><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><br>
                <br>
                No opensips basta ter o suporte a TLS ativo, e voc&ecirc; vai
                criar o usuario normalmente (ou liberar o ip dependendo
                de como voce ta fazendo)<br>
                <br>
                ai no Asterisk voce conifgura ele como client<br>
                <br>
                <a moz-do-not-send="true"
                  href="https://wiki.asterisk.org/wiki/display/AST/SIP+TLS+Transport"
                  target="_blank">https://wiki.asterisk.org/wiki/display/AST/SIP+TLS+Transport</a><br>
                <br>
                Em 04/11/13 13:20, Franque Cust&oacute;dio escreveu:<br>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">Pessoal,</div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small"><br>
                      </div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">
                        Preciso integrar um Asterisk (onde est&aacute; o
                        dialplan e as configura&ccedil;&otilde;es dos ramais) a um
                        OpenSIPS (que funciona como um sip proxy) via
                        TLS. Preciso autenticar o Asterisk no OpenSIPS
                        usando TLS.</div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">
                        <br>
                      </div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">Algu&eacute;m

                        tem alguma dica? Um link de
                        documenta&ccedil;&atilde;o/exemplo? Tudo o que encontrei de
                        TLS, at&eacute; agora, &eacute; de Asterisk para Asterisk ou
                        de OpenSIPS para OpenSIPS.</div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small"><br>
                      </div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">Obrigado.</div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">
                        <br>
                      </div>
                      <div class="gmail_default"
                        style="font-family:verdana,sans-serif;font-size:small">Franque</div>
                      <div><br>
                        <br>
---------------------------------------------------------------<br>
                        Franque Cust&oacute;dio<br>
                        <a moz-do-not-send="true"
                          href="mailto:franque@gmail.com"
                          target="_blank">franque@gmail.com</a><br>
---------------------------------------------------------------</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a moz-do-not-send="true" href="http://www.Khomp.com" target="_blank">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a moz-do-not-send="true" href="http://www.aligera.com.br" target="_blank">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a moz-do-not-send="true" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;<br>
            Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;<br>
            Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a
            em <a moz-do-not-send="true" href="http://www.Khomp.com"
              target="_blank">www.Khomp.com</a>.<br>
            _______________________________________________<br>
            ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2,
            ISDN e SS7.<br>
            Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.<br>
            Channel Bank &#8211; Appliance Asterisk - Acesse <a
              moz-do-not-send="true" href="http://www.aligera.com.br"
              target="_blank">www.aligera.com.br</a>.<br>
            _______________________________________________<br>
            Para remover seu email desta lista, basta enviar um email em
            branco para <a moz-do-not-send="true"
              href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
Intercomunicadores para acesso remoto via rede IP. Conhe&ccedil;a em <a class="moz-txt-link-abbreviated" href="http://www.Khomp.com">www.Khomp.com</a>.
_______________________________________________
ALIGERA &#8211; Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
Channel Bank &#8211; Appliance Asterisk - Acesse <a class="moz-txt-link-abbreviated" href="http://www.aligera.com.br">www.aligera.com.br</a>.
_______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a class="moz-txt-link-abbreviated" href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>
    </blockquote>
    <br>
  </body>
</html>