[AsteriskBrasil] Web

Tiago Ribeiro shasty em gmail.com
Quarta Março 3 11:47:36 BRT 2010


Kim, valeu pela dica, vou alterar meu cgi, obrigado.

Em 3 de março de 2010 08:13, Kim Delevati <kim.delevati em gmail.com> escreveu:

> Tiago, como o voip-info avisa, e também já tive problemas, não recomendo
> criar o arquivo .call diretamente dentro da pasta outgoing, pois o Asterisk
> poderá ler ele antes de ele estar com todos os dados, ocasionando erros. O
> melhor é criar ele em uma pasta temp da vida, e depois mover ele, com o
> comando "mv", pra dentro do outgoing.
>
>
> Em 2 de março de 2010 19:23, Tiago Ribeiro <shasty em gmail.com> escreveu:
>
> fiz um cgi bem simples desta fora:
>>
>> #### inicio ####
>>
>> #!/bin/sh
>>
>> echo "content-type: text/html"
>> echo
>> echo
>> echo "
>> <html> <head> <title> CallBack </title> </head>
>> <body>
>> "
>>         echo "<img align ="left" src="/icons/asterisk.gif">
>> <h1>CallBack</h1><br>"
>>
>> callback=`echo $QUERY_STRING | cut -f2 -d"="`
>>
>>         echo "
>>         <form method=\"GET\" action=\"callback.cgi\">
>>         Entre com o telefone a ser discado (ex.: 0ZZXXXXXXXX):
>>         <input size=11 name=callback value=\"\">
>>         <input type=submit value=Discar>
>>         </form>"
>>
>> echo "
>> Channel: SIP/XXXX/$callback
>> CallerID: $callback
>> MaxRetries: 3
>> RetryTime: 300
>> WaitTime: 60
>> Context: fila_callcenter_web
>> Priority: 1
>> Extension: s" >/var/spool/asterisk/outgoing/$callback.call
>>         echo $callback
>>
>>
>> echo "<BR>"
>> echo "Voce esta acessando pelo endereco: $REMOTE_ADDR"
>> echo "<BR>"
>> echo "<a href="/cgi-bin/webcallback.cgi">Voltar</a>"
>>
>> echo "<body></html>"
>>
>> #### fim ####
>>
>>
>>
>>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20100303/363620f0/attachment.htm 


Mais detalhes sobre a lista de discussão AsteriskBrasil