Utilizo em um sistema internet. Onde:<div><br></div><div><blockquote type="cite">$strChannel = &quot;SIP/&quot;.$_REQUEST[&#39;ramal&#39;]; //RAMAL DE QUEM LIGA pega o ramal do usuário/ip. Toca primeiramente no ramal (softfone ou ata) do usuário e ao atendê-lo liga para o Suporte/ Telefone destino.<br>

<br>Explique melhor qual é o seu cenário, quem sabe posso ajudar mais.<br><br><br></blockquote>------------------------------------------------<br>Renato Amorim<br><a href="mailto:renatoamorim@renatoamorim.com" target="_blank">renatoamorim@renatoamorim.com</a><br>

<div>Fone: 3064-5413 // 7685-1468<br></div><br>
<br><br><div class="gmail_quote">Em 2 de agosto de 2011 13:14, Asterisk <span dir="ltr">&lt;<a href="mailto:asterisk@teknisa.com">asterisk@teknisa.com</a>&gt;</span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000">
    Renato, alterei os campos que vc indicou e estou recebendo essas
    mensagens de erro.<br>
    <br>
    Agora uma duvida, como fica o audio do cliente, ele pega
    automaticamente os dispositivos padrão?<br>
    <br>
    Obrigado.<br>
    <br>
    Em 02/08/2011 12:54, Renato Amorim escreveu:
    <blockquote type="cite">Uso esta função:<br>
      <br>
      <br>
      <br>
      &lt;?php<br>
      // Copyright 2006 Baldwin Technology Solutions, Inc.<br>
      // Requires Asterisk, Apache, and PHP.  Place this file<br>
      // onto your apache server and call the URL like so<br>
      // <a href="http://yourapacheserver/c2c.php?number=15185551234" target="_blank">http://yourapacheserver/c2c.php?number=15185551234</a><br>
      // A page will display that it is calling your extension and<br>
      // what number it is calling.<br>
      // On the callerid on the phone it will show Web Call 15185551234<br>
      #ip address that asterisk is on.<br>
      $strHost = &quot;aqui entra o ip do pabx&quot;;<br>
      <br>
      #specify the username you want to login with (these users are
      defined in /etc/asterisk/manager.conf)<br>
      #this user is the default AAH AMP user; you shouldn&#39;t need to
      change, if you&#39;re using AAH.<br>
      $strUser = &quot;Usuario com permissao no PABX&quot;;<br>
      #specify the password for the above user<br>
      $strSecret = &quot;SENHA DO USUARIO&quot;;<br>
      <br>
      #specify the channel (extension) you want to receive the call
      requests with<br>
      #e.g. SIP/XXX, IAX2/XXXX, ZAP/XXXX, etc<br>
      $strChannel = &quot;SIP/&quot;.$_REQUEST[&#39;ramal&#39;]; //RAMAL DE QUEM LIGA<br>
      <br>
      #specify the context to make the outgoing call from.  By default,
      AAH uses from-internal<br>
      #Using from-internal will make your outgoing dialing rules apply<br>
      $strContext = &quot;from-internal&quot;;<br>
      <br>
      #specify the amount of time you want to try calling the specified
      channel before hangin up<br>
      $strWaitTime = &quot;30&quot;;<br>
      <br>
      #specify the priority you wish to place on making this call<br>
      $strPriority = &quot;1&quot;;<br>
      <br>
      #specify the maximum amount of retries<br>
      $strMaxRetry = &quot;2&quot;;<br>
      <br>
      $number=strtolower($_REQUEST[&#39;number&#39;]); //Se for um número de
      suporte apenas coloca aqui<br>
      $pos=strpos ($number,&quot;local&quot;);<br>
      if ($number == null) :<br>
       exit() ;<br>
      endif ;<br>
      if ($pos===false) :<br>
      $errno=0 ;<br>
      $errstr=0 ;<br>
      $strCallerId = &quot;Clique aqui &lt;$strChannel&gt;&quot;;<br>
      $oSocket = fsockopen (&quot;$strHost&quot;, 5038, &amp;$errno, &amp;$errstr,
      20);<br>
       if (!$oSocket) {<br>
        echo &quot;$errstr ($errno)&lt;br&gt;\n&quot;;<br>
      } else {<br>
      fputs($oSocket, &quot;Action: login\r\n&quot;);<br>
      fputs($oSocket, &quot;Events: off\r\n&quot;);<br>
      fputs($oSocket, &quot;Username: $strUser\r\n&quot;);<br>
      fputs($oSocket, &quot;Secret: $strSecret\r\n\r\n&quot;);<br>
      fputs($oSocket, &quot;Action: originate\r\n&quot;);<br>
      fputs($oSocket, &quot;Channel: $strChannel\r\n&quot;);<br>
      fputs($oSocket, &quot;WaitTime: $strWaitTime\r\n&quot;);<br>
      fputs($oSocket, &quot;CallerId: $strCallerId\r\n&quot;);<br>
      fputs($oSocket, &quot;Exten: $number\r\n&quot;);<br>
      fputs($oSocket, &quot;Context: $strContext\r\n&quot;);<br>
      fputs($oSocket, &quot;Priority: $strPriority\r\n\r\n&quot;);<br>
      fputs($oSocket, &quot;Action: Logoff\r\n\r\n&quot;);<br>
      fclose($oSocket);<br>
       }<br>
      echo &quot;Extension $strChannel should be calling $number.&quot; ;<br>
      echo &quot;&lt;script&gt;window.close()&lt;/script&gt;&quot; ;<br>
      else :<br>
       exit() ;<br>
      endif ;<br>
      ?&gt;<br>
      <br>
      <br clear="all">
      ------------------------------------------------<br>
      Renato Amorim<br>
      <a href="mailto:renatoamorim@renatoamorim.com" target="_blank">renatoamorim@renatoamorim.com</a><br>
      <div>Fone: 3064-5413 // 7685-1468<br>
      </div>
      <br>
      <br>
      <br>
      <div class="gmail_quote">Em 2 de agosto de 2011 12:44, Asterisk <span dir="ltr">&lt;<a href="mailto:asterisk@teknisa.com" target="_blank">asterisk@teknisa.com</a>&gt;</span>
        escreveu:<br>
        <blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">  Boa tarde amigos<br>
          <br>
          Alguem conhece alguma aplicação click-to-call em PHP ou ASP,
          mas que não<br>
          seja para disparar uma ligação para o cliente.<br>
          <br>
          EX:<br>
          <br>
          click-to-call &gt;&gt; liga_suporte.<br>
          <br>
          Desde ja agradeço a atenção.<br>
          <br>
          Obrigado.<br>
          <br>
          <br>
          _______________________________________________<br>
          KHOMP: qualidade em placas de E1, GSM, FXS e FXO para
          Asterisk.<br>
          - Hardware com alta disponibilidade de recursos e qualidade
          KHOMP<br>
          - Suporte técnico local qualificado e gratuito<br>
          Conheça a linha completa de produtos KHOMP em <a href="http://www.khomp.com.br" target="_blank">www.khomp.com.br</a><br>
          _______________________________________________<br>
          DIGIVOICE: Lider no mercado de placas para Asterisk<br>
          Único fabricante com Centro de Treinamento especializado.<br>
          LANÇAMENTO: Channel Bank TDMoE, até 64 canais FXS / FXO.<br>
          <a href="http://www.digivoice.com.br" target="_blank">www.digivoice.com.br</a> ou (11)3016-5200.<br>
          ________<br>
          LANÇAMENTO SHOPVOIP! Gateway Xibelis Lyric VoIP com 2,4 e 6
          canais GSM.<br>
          Arquitetura Escalável, Balanceamento de Carga, Portabilidade
          Numérica.<br>
          Confira em <a href="http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org" target="_blank">http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org</a><br>
          Mais informações: <a href="http://www.shopvoip.com.br" target="_blank">www.shopvoip.com.br</a>
          ou 0800-6021244<br>
          ______________________________________________<br>
          Para remover seu email desta lista, basta enviar um email em
          branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
        </blockquote>
      </div>
      <br>
      <pre><fieldset></fieldset>
_______________________________________________
KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk. 
- Hardware com alta disponibilidade de recursos e qualidade KHOMP
- Suporte técnico local qualificado e gratuito 
Conheça a linha completa de produtos KHOMP em <a href="http://www.khomp.com.br" target="_blank">www.khomp.com.br</a>
_______________________________________________
DIGIVOICE: Lider no mercado de placas para Asterisk
Único fabricante com Centro de Treinamento especializado.
LANÇAMENTO: Channel Bank TDMoE, até 64 canais FXS / FXO. 
<a href="http://www.digivoice.com.br" target="_blank">www.digivoice.com.br</a> ou (11)3016-5200.
________
LANÇAMENTO SHOPVOIP! Gateway Xibelis Lyric VoIP com 2,4 e 6 canais GSM.
Arquitetura Escalável, Balanceamento de Carga, Portabilidade Numérica.
Confira em <a href="http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org" target="_blank">http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org</a>
Mais informações: <a href="http://www.shopvoip.com.br" target="_blank">www.shopvoip.com.br</a> ou 0800-6021244
______________________________________________
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org" target="_blank">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a></pre>


    </blockquote>
  </div>

<br>_______________________________________________<br>
KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk.<br>
- Hardware com alta disponibilidade de recursos e qualidade KHOMP<br>
- Suporte técnico local qualificado e gratuito<br>
Conheça a linha completa de produtos KHOMP em <a href="http://www.khomp.com.br" target="_blank">www.khomp.com.br</a><br>
_______________________________________________<br>
DIGIVOICE: Lider no mercado de placas para Asterisk<br>
Único fabricante com Centro de Treinamento especializado.<br>
LANÇAMENTO: Channel Bank TDMoE, até 64 canais FXS / FXO.<br>
<a href="http://www.digivoice.com.br" target="_blank">www.digivoice.com.br</a> ou (11)3016-5200.<br>
________<br>
LANÇAMENTO SHOPVOIP! Gateway Xibelis Lyric VoIP com 2,4 e 6 canais GSM.<br>
Arquitetura Escalável, Balanceamento de Carga, Portabilidade Numérica.<br>
Confira em <a href="http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org" target="_blank">http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org</a><br>
Mais informações: <a href="http://www.shopvoip.com.br" target="_blank">www.shopvoip.com.br</a> ou 0800-6021244<br>
______________________________________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br></blockquote></div>

<br></div>