[AsteriskBrasil] Res: torpedo de voz

Fernando - WebApps & Asterisk Developer asterisk em tecway.com.br
Quinta Fevereiro 24 12:33:03 BRT 2011


$QUERY = "SELECT * FROM callback_callcenter WHERE status= 'pendente'";
$telefone = "2188002233";

$tmp = time().$telefone;
$origem = "/tmp/$tmp";
$destino = "/var/spool/asterisk/outgoing/$origem";

$callerid = "Callback <99990000>";

$fp = fopen($origem, "w+");
        
if($fp){
        fwrite($fp, "CallerID: $callerid\r\n");
        fwrite($fp, "Set: CALLERID(num)=$callerid\r\n");
        fwrite($fp, "Channel: SIP/VONO/$telefone/n\r\n");
        // CASO QUEIRA RODAR UM APP, UTILIZE ESSA PARTE
        fwrite($fp, "Application: Playback\r\n");
        fwrite($fp, "Data: som-do-callback\r\n");
        //=================================
        //CASO QUEIRA ENVIAR PARA ALGUM CONTEXTO
        fwrite($fp, "Context: default\r\n");
        fwrite($fp, "Extension: s\r\n");
        fwrite($fp, "Priority: 1\r\n");
        //=================================
        fwrite($fp, "MaxRetries: 2\r\n");
        fwrite($fp, "RetryTime: 30\r\n");
        fwrite($fp, "WaitTime: 30\r\n");
        fclose($fp);

        exec("/bin/mv $origem $destino"); 
}else{
    die("Erro ao criar arquivo .call");
}
 
 
Sem mais,
 
Fernando da Silva Santos
WebApps & Asterisk* Developer

fernandojdk em gmail.com.br
fernando em nextbilling.com.br
http://www.nextbilling.com.br
-------Mensagem original-------
 
De: monica em addphone.net
Data: 24/02/2011 11:48:44
Para: asteriskbrasil em listas.asteriskbrasil.org
Assunto: [AsteriskBrasil] torpedo de voz
 
ola a todos estou precisando fazer torpedo de voz para meu asterisk, estou
tentando usar o arquivo.call enviando para a pasta outgoing do asteirsk.

eu ja tenho os dados gravado no banco de dados com dados da ligaçao, e fiz
un cron para pegar os dados no banco e gerar o arquivo .cal

$QUERY = "SELECT * FROM callback_callcenter WHERE status= 'pendente'";

esta busca ja me retorna o Channel formato SIP/VONO/01140040435 entre outras
variaveis como o ramal

o que preciso é ligar para este channels e quando ele atende rodar outro
contexto para rodar o torpedo de voz

[torpedo]
exten => _X.,1,Background(audio1)
exten => _X.,n,Hangup


como tem que ficar o arquivo .call ?


obrigada


 
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110224/da05dd83/attachment-0001.htm 
-------------- Próxima Parte ----------
Um anexo não texto foi limpo...
Nome  : não disponível
Tipo  : image/gif
Tam   : 219 bytes
Descr.: não disponível
Url   : http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110224/da05dd83/attachment-0003.gif 
-------------- Próxima Parte ----------
Um anexo não texto foi limpo...
Nome  : não disponível
Tipo  : image/gif
Tam   : 402 bytes
Descr.: não disponível
Url   : http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110224/da05dd83/attachment-0004.gif 
-------------- Próxima Parte ----------
Um anexo não texto foi limpo...
Nome  : não disponível
Tipo  : image/gif
Tam   : 390 bytes
Descr.: não disponível
Url   : http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110224/da05dd83/attachment-0005.gif 
-------------- Próxima Parte ----------
Um anexo não texto foi limpo...
Nome  : não disponível
Tipo  : image/jpeg
Tam   : 10517 bytes
Descr.: não disponível
Url   : http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20110224/da05dd83/attachment-0001.jpeg 


Mais detalhes sobre a lista de discussão AsteriskBrasil