[AsteriskBrasil] CLICK TO CALL

Asterisk asterisk em teknisa.com
Terça Agosto 2 13:14:21 BRT 2011


  Renato, alterei os campos que vc indicou e estou recebendo essas 
mensagens de erro.

Agora uma duvida, como fica o audio do cliente, ele pega automaticamente 
os dispositivos padrão?

Obrigado.

Em 02/08/2011 12:54, Renato Amorim escreveu:
> Uso esta função:
>
>
>
> <?php
> // Copyright 2006 Baldwin Technology Solutions, Inc.
> // Requires Asterisk, Apache, and PHP.  Place this file
> // onto your apache server and call the URL like so
> // http://yourapacheserver/c2c.php?number=15185551234
> // A page will display that it is calling your extension and
> // what number it is calling.
> // On the callerid on the phone it will show Web Call 15185551234
> #ip address that asterisk is on.
> $strHost = "aqui entra o ip do pabx";
>
> #specify the username you want to login with (these users are defined 
> in /etc/asterisk/manager.conf)
> #this user is the default AAH AMP user; you shouldn't need to change, 
> if you're using AAH.
> $strUser = "Usuario com permissao no PABX";
> #specify the password for the above user
> $strSecret = "SENHA DO USUARIO";
>
> #specify the channel (extension) you want to receive the call requests 
> with
> #e.g. SIP/XXX, IAX2/XXXX, ZAP/XXXX, etc
> $strChannel = "SIP/".$_REQUEST['ramal']; //RAMAL DE QUEM LIGA
>
> #specify the context to make the outgoing call from.  By default, AAH 
> uses from-internal
> #Using from-internal will make your outgoing dialing rules apply
> $strContext = "from-internal";
>
> #specify the amount of time you want to try calling the specified 
> channel before hangin up
> $strWaitTime = "30";
>
> #specify the priority you wish to place on making this call
> $strPriority = "1";
>
> #specify the maximum amount of retries
> $strMaxRetry = "2";
>
> $number=strtolower($_REQUEST['number']); //Se for um número de suporte 
> apenas coloca aqui
> $pos=strpos ($number,"local");
> if ($number == null) :
>  exit() ;
> endif ;
> if ($pos===false) :
> $errno=0 ;
> $errstr=0 ;
> $strCallerId = "Clique aqui <$strChannel>";
> $oSocket = fsockopen ("$strHost", 5038, &$errno, &$errstr, 20);
>  if (!$oSocket) {
>   echo "$errstr ($errno)<br>\n";
> } else {
> fputs($oSocket, "Action: login\r\n");
> fputs($oSocket, "Events: off\r\n");
> fputs($oSocket, "Username: $strUser\r\n");
> fputs($oSocket, "Secret: $strSecret\r\n\r\n");
> fputs($oSocket, "Action: originate\r\n");
> fputs($oSocket, "Channel: $strChannel\r\n");
> fputs($oSocket, "WaitTime: $strWaitTime\r\n");
> fputs($oSocket, "CallerId: $strCallerId\r\n");
> fputs($oSocket, "Exten: $number\r\n");
> fputs($oSocket, "Context: $strContext\r\n");
> fputs($oSocket, "Priority: $strPriority\r\n\r\n");
> fputs($oSocket, "Action: Logoff\r\n\r\n");
> fclose($oSocket);
>  }
> echo "Extension $strChannel should be calling $number." ;
> echo "<script>window.close()</script>" ;
> else :
>  exit() ;
> endif ;
> ?>
>
>
> ------------------------------------------------
> Renato Amorim
> renatoamorim em renatoamorim.com <mailto:renatoamorim em renatoamorim.com>
> Fone: 3064-5413 // 7685-1468
>
>
>
> Em 2 de agosto de 2011 12:44, Asterisk <asterisk em teknisa.com 
> <mailto:asterisk em teknisa.com>> escreveu:
>
>      Boa tarde amigos
>
>     Alguem conhece alguma aplicação click-to-call em PHP ou ASP, mas
>     que não
>     seja para disparar uma ligação para o cliente.
>
>     EX:
>
>     click-to-call >> liga_suporte.
>
>     Desde ja agradeço a atenção.
>
>     Obrigado.
>
>
>     _______________________________________________
>     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 www.khomp.com.br
>     <http://www.khomp.com.br>
>     _______________________________________________
>     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.
>     www.digivoice.com.br <http://www.digivoice.com.br> 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 http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org
>     Mais informações: www.shopvoip.com.br <http://www.shopvoip.com.br>
>     ou 0800-6021244
>     ______________________________________________
>     Para remover seu email desta lista, basta enviar um email em
>     branco para asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
>     <mailto:asteriskbrasil-unsubscribe em listas.asteriskbrasil.org>
>
>
>
> _______________________________________________
> 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 www.khomp.com.br
> _______________________________________________
> 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.
> www.digivoice.com.br 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 http://www.yx.cl/landing/brasil/lyric_voip_asterisk.org
> Mais informações: www.shopvoip.com.br ou 0800-6021244
> ______________________________________________
> Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110802/3dba5a41/attachment-0001.htm 


Mais detalhes sobre a lista de discussão AsteriskBrasil