<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><STRONG><EM><FONT size=2 face=Calibri>Bom dia Fernando, 
</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>Sim, ela tem identificador, poram 
acho que a interface deve mandar DTMF, acho que preciso do conversor 
FSK.</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>Resolvi provisoriamente digitanto a 
exten 6 quando ligo, para demais usuarios do serviço, digitam outra exten. 
</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>segue os arquivos para 
analise;</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 
face=Calibri>extensions.conf</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>[global]</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 
face=Calibri>MARCO=99541111</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>------</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>exten = 6,1(callback),System(bash 
/etc/asterisk/callback.sh ${MARCO})<BR>exten = 
6,n(callback),Hangup()</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>[disa-callback]<BR>include =&gt; 
local<BR>exten =&gt; s,1,DISA(no-password|local-cel)<BR>;exten =&gt; 
s,n,Hangup()</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 
face=Calibri>------------------------------------------</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>calback.sh</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 
face=Calibri>#!/bin/sh<BR>DESTINO=$1</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>echo "<BR>Channel: 
ZAP/7/$DESTINO<BR>MaxRetries: 2<BR>RetryTime: 15<BR>WaitTime: 30<BR>Context: 
disa-callback<BR>Extension: s<BR>Priority: 1 " &gt; 
/etc/asterisk/"$DESTINO".call</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri># Altera a Data do arquivo para faze 
a ligaç depois de 10s.<BR>NOW=`date +%s`<BR>let 
"NOW=$NOW+10"<BR>TOUCH_TMSP=`date -d "1970-01-01 $NOW sec GMT" 
+%Y%m%d%H%M.%S`<BR>touch -t $TOUCH_TMSP 
/etc/asterisk/"$DESTINO".call</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>mv /etc/asterisk/"$DESTINO".call 
/var/spool/asterisk/outgoing/<BR>chmod 777 
/var/spool/asterisk/outgoing/"$DESTINO".call</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>#Fim do 
Script<BR>------------------</FONT></EM></STRONG></DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
<DIV><STRONG><EM><FONT size=2 face=Calibri>Obrigado pela 
força</FONT></EM></STRONG></DIV>
<DIV>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=383>
  <TBODY>
  <TR>
    <TD><STRONG><EM><FONT size=2 
  face=Calibri></FONT></EM></STRONG></TD></TR></TBODY></TABLE></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
  <A title=ftrilha@gmail.com href="mailto:ftrilha@gmail.com">Fernando Trilha</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=asteriskbrasil@listas.asteriskbrasil.org 
  href="mailto:asteriskbrasil@listas.asteriskbrasil.org">asteriskbrasil@listas.asteriskbrasil.org</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, September 28, 2009 8:57 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [AsteriskBrasil] RES: 
  CallBack</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr align=left><SPAN class=968445511-28092009><FONT color=#0000ff 
  size=2 face=Arial>Marco, coloca aqui pra nós, sue extensions.conf, não ele 
  todo, apenas a parte do callback e coloca também seu callback.sh para 
  analisarmos.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=968445511-28092009><FONT color=#0000ff 
  size=2 face=Arial>Outra pergunta, seu linha tem identificador de chamadas?Esta 
  habilitado este serviço nela?</FONT></SPAN></DIV><BR>
  <DIV dir=ltr lang=pt-br class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>De:</B> <A 
  href="mailto:asteriskbrasil-bounces@listas.asteriskbrasil.org">asteriskbrasil-bounces@listas.asteriskbrasil.org</A> 
  [mailto:asteriskbrasil-bounces@listas.asteriskbrasil.org] <B>Em nome de 
  </B>Marco Antonio (TRG - Tecnologia)<BR><B>Enviada em:</B> quinta-feira, 24 de 
  setembro de 2009 09:22<BR><B>Para:</B> 
  asteriskbrasil@listas.asteriskbrasil.org<BR><B>Assunto:</B> Re: 
  [AsteriskBrasil] CallBack<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>Rodrigo R.C., bom 
  dia.</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>Usei seu script, porem não sei 
  exatamente porque não consigo binar o nr de entrada. Talvez porque é uma 
  interface simples ligada a um canal ZAP do meu 
  Astribank.</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>Bem... resolvi de outra 
  forma.</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>O Asterisk me atende, derruba a 
  ligação, me liga já com o tom de linha, mas quando disco o numero 
  desejado&nbsp;e teclo # derruba a ligação.</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>segue o log da 
  CLI</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>&nbsp;&nbsp;&nbsp; -- Starting 
  simple switch on 'Zap/7-1'<BR>&nbsp;&nbsp;&nbsp; -- Zap/1-1 answered 
  SIP/221-083fbfb0<BR>[Sep 24 09:13:36] NOTICE[4629]: chan_zap.c:7092 ss_thread: 
  Got event 18 (Ring Begin)...<BR>&nbsp;&nbsp;&nbsp; -- Executing 
  [s@atende-celular:1] MixMonitor("Zap/7-1", 
  "/home/asterisk/24092009-0913---in.wav49,b|W(4)") in new 
  stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@atende-celular:2] NoOp("Zap/7-1", 
  "") in new stack<BR>&nbsp;&nbsp;&nbsp; -- Executing [s@atende-celular:3] 
  BackGround("Zap/7-1", "custom/trg-new") in new stack<BR>&nbsp; == Begin 
  MixMonitor Recording Zap/7-1<BR>[Sep 24 09:13:37] WARNING[4629]: 
  chan_zap.c:4746 zt_handle_event: Ring/Off-hook in strange state 6 on channel 
  7<BR>&nbsp;&nbsp;&nbsp; -- &lt;Zap/7-1&gt; Playing 'custom/trg-new.gsm' 
  (language 'pt_BR')<BR>&nbsp; == CDR updated on Zap/7-1<BR>&nbsp;&nbsp;&nbsp; 
  -- Executing [6@atende-celular:1] System("Zap/7-1", "bash 
  /etc/asterisk/callback.sh 99541111") in new stack<BR>&nbsp;&nbsp;&nbsp; -- 
  Executing [6@atende-celular:2] Hangup("Zap/7-1", "") in new stack<BR>&nbsp; == 
  Spawn extension (atende-celular, 6, 2) exited non-zero on 'Zap/7-1'<BR>&nbsp; 
  == End MixMonitor Recording Zap/7-1<BR>&nbsp;&nbsp;&nbsp; -- Hungup 
  'Zap/7-1'<BR>&nbsp;&nbsp;&nbsp; -- Attempting call on ZAP/7/99541111 for <A 
  href="mailto:5@atende-celular:1">5@atende-celular:1</A> (Retry 
  1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Channel Zap/7-1 was 
  answered.<BR>&nbsp;&nbsp;&nbsp; -- Executing [5@atende-celular:1] 
  DISA("Zap/7-1", "no-password,local") in new stack<BR>&nbsp; == Spawn extension 
  (atende-celular, 5, 1) exited non-zero on 'Zap/7-1'<BR>&nbsp;&nbsp;&nbsp; -- 
  Hungup 'Zap/7-1'<BR>Será que tem solução?</FONT></EM></STRONG></DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri></FONT></EM></STRONG>&nbsp;</DIV>
  <DIV><STRONG><EM><FONT size=2 face=Calibri>Obrigado</FONT></EM></STRONG></DIV>
  <DIV>
  <TABLE border=0 cellSpacing=0 cellPadding=0 width=383>
    <TBODY>
    <TR>
      <TD><STRONG><EM><FONT size=2 
    face=Calibri></FONT></EM></STRONG></TD></TR></TBODY></TABLE></DIV>
  <BLOCKQUOTE 
  style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> 
    <A title=rodrigo@voipsolucoes.com.br 
    href="mailto:rodrigo@voipsolucoes.com.br">Rodrigo Rockenbach Cahanovich</A> 
    </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A 
    title=asteriskbrasil@listas.asteriskbrasil.org 
    href="mailto:asteriskbrasil@listas.asteriskbrasil.org">asteriskbrasil@listas.asteriskbrasil.org</A> 
    </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, September 24, 2009 8:23 
    AM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [AsteriskBrasil] 
    CallBack</DIV>
    <DIV><BR></DIV>Bom dia Marco<BR>&nbsp;&nbsp; Efetue da seguinte 
    maneira:<BR><BR><BR>exten = s,1,NoOp(${CALLERID(NUM)})<BR>exten = 
    s,n,GotoIf($["${CALLERID(NUM)}" = 
    "0458888xxxx"]?callback:rejeita)<BR><BR>exten = s,n(callback),System(bash 
    /etc/asterisk/callback.sh ${CALLERID(NUM)})<BR>exten = 
    s,n(callback),Hangup()<BR><BR>exten = s,n(rejeita),Dial(SIP/100,,t)<BR>exten 
    = s,n,Hangup()<BR><BR>no meu caso eu criei um script em bash para fazer a 
    opção do callback.... segue 
    abaixo<BR><BR>#!/bin/sh<BR>DESTINO=$1<BR><BR>echo "<BR>Channel: 
    KHOMP/*B0/$DESTINO<BR>MaxRetries: 2<BR>RetryTime: 15<BR>WaitTime: 
    30<BR>Context: disa-callback<BR>Extension: s<BR>Priority: 1 " &gt; 
    /etc/asterisk/"$DESTINO".call<BR><BR># Altera a Data do arquivo para faze a 
    ligação depois de 10s.<BR>NOW=`date +%s`<BR>let 
    "NOW=$NOW+10"<BR>TOUCH_TMSP=`date -d "1970-01-01 $NOW sec GMT" 
    +%Y%m%d%H%M.%S`<BR>touch -t $TOUCH_TMSP 
    /etc/asterisk/"$DESTINO".call<BR><BR>mv /etc/asterisk/"$DESTINO".call 
    /var/spool/asterisk/outgoing/<BR>chmod 777 
    /var/spool/asterisk/outgoing/"$DESTINO".call<BR><BR>#Fim do 
    Script<BR><BR><BR><BR><BR><BR><BR>
    <DIV class=gmail_quote>2009/9/24 Marco Antonio (TRG - Tecnologia) <SPAN 
    dir=ltr>&lt;<A 
    href="mailto:marco@trg.com.br">marco@trg.com.br</A>&gt;</SPAN><BR>
    <BLOCKQUOTE 
    style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" 
    class=gmail_quote>
      <DIV bgcolor="#ffffff">
      <DIV><B><I><FONT size=2 face=Calibri>Bom dia,</FONT></I></B></DIV>
      <DIV><B><I><FONT size=2 face=Calibri></FONT></I></B>&nbsp;</DIV>
      <DIV><B><I><FONT size=2 face=Calibri>Preciso criar um Callback da seguinte 
      forma:</FONT></I></B></DIV>
      <DIV><B><I><FONT size=2 face=Calibri>Ligo do meu celular para empresa, o 
      Asterisk atende, derruba a ligação e me retorna abrindo o tom de linha 
      para que eu possa efetuar ligações.</FONT></I></B></DIV>
      <DIV><B><I><FONT size=2 face=Calibri>Alguém pode me passar os 
      procedimentos?</FONT></I></B></DIV>
      <DIV><B><I><FONT size=2 face=Calibri>Obrigado</FONT></I></B></DIV>
      <DIV>
      <TABLE border=0 cellSpacing=0 cellPadding=0 width=383>
        <TBODY>
        <TR>
          <TD><B><I><FONT size=2 
      face=Calibri></FONT></I></B></TD></TR></TBODY></TABLE></DIV><B><I><FONT 
      size=2 face=Calibri>Marco 
      Antonio</FONT></I></B></DIV><BR><BR>_______________________________________________<BR><A 
      href="http://www.voipmania.com.br" 
      target=_blank>http://www.voipmania.com.br</A><BR>Telefone IP sem fio 
      Gigaset A580IP por 6 x R$59,90.<BR>Promoção por tempo limitado!<BR>Acesse 
      agora <A href="http://promo.voipmania.com.br" 
      target=_blank>http://promo.voipmania.com.br</A><BR><BR>_______________________________________________<BR>Lista 
      de discussões AsteriskBrasil.org<BR><A 
      href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil.org</A><BR><A 
      href="http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil" 
      target=_blank>http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</A><BR></BLOCKQUOTE></DIV><BR><BR 
    clear=all><BR>-- <BR>Att,<BR>Rodrigo R. Cahanovich <BR>Apoio Técnico<BR>(45) 
    4063-9075<BR>
    <P>
    <HR>

    <P></P><BR>_______________________________________________<BR>http://www.voipmania.com.br<BR>Telefone 
    IP sem fio Gigaset A580IP por 6 x R$59,90. <BR>Promoção por tempo 
    limitado!<BR>Acesse agora 
    http://promo.voipmania.com.br<BR><BR>_______________________________________________<BR>Lista 
    de discussões 
    AsteriskBrasil.org<BR>AsteriskBrasil@listas.asteriskbrasil.org<BR>http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</BLOCKQUOTE>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>http://www.voipmania.com.br<BR>Telefone 
  IP sem fio Gigaset A580IP por 6 x R$59,90. <BR>Promoção por tempo 
  limitado!<BR>Acesse agora 
  http://promo.voipmania.com.br<BR><BR>_______________________________________________<BR>Lista 
  de discussões 
  AsteriskBrasil.org<BR>AsteriskBrasil@listas.asteriskbrasil.org<BR>http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</BLOCKQUOTE></BODY></HTML>