<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h1
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:57.6pt;
        margin-bottom:.0001pt;
        text-align:justify;
        text-indent:-21.6pt;
        page-break-after:avoid;
        mso-list:l2 level1 lfo3;
        font-size:16.0pt;
        font-family:Arial;}
h2
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:64.8pt;
        margin-bottom:.0001pt;
        text-align:justify;
        text-indent:-28.8pt;
        page-break-after:avoid;
        mso-list:l2 level2 lfo3;
        font-size:14.0pt;
        font-family:Arial;}
h3
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:72.0pt;
        text-align:justify;
        text-indent:-36.0pt;
        page-break-after:avoid;
        mso-list:l2 level3 lfo3;
        font-size:12.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EstiloDeEmail19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:330525855;
        mso-list-type:hybrid;
        mso-list-template-ids:-1215014784 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l1
        {mso-list-id:1241672241;
        mso-list-type:hybrid;
        mso-list-template-ids:1935855544 68550657 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l2
        {mso-list-id:1984119837;
        mso-list-template-ids:136998480;}
@list l2:level1
        {mso-level-style-link:"Título 1";
        mso-level-text:%1;
        mso-level-tab-stop:57.6pt;
        mso-level-number-position:left;
        margin-left:57.6pt;
        text-indent:-21.6pt;}
@list l2:level2
        {mso-level-style-link:"Título 2";
        mso-level-text:"%1\.%2";
        mso-level-tab-stop:64.8pt;
        mso-level-number-position:left;
        margin-left:64.8pt;
        text-indent:-28.8pt;}
@list l2:level3
        {mso-level-style-link:"Título 3";
        mso-level-text:"%1\.%2\.%3";
        mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        margin-left:72.0pt;
        text-indent:-36.0pt;}
@list l2:level4
        {mso-level-text:"%1\.%2\.%3\.%4";
        mso-level-tab-stop:79.2pt;
        mso-level-number-position:left;
        margin-left:79.2pt;
        text-indent:-43.2pt;}
@list l2:level5
        {mso-level-text:"%1\.%2\.%3\.%4\.%5";
        mso-level-tab-stop:86.4pt;
        mso-level-number-position:left;
        margin-left:86.4pt;
        text-indent:-50.4pt;}
@list l2:level6
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
        mso-level-tab-stop:93.6pt;
        mso-level-number-position:left;
        margin-left:93.6pt;
        text-indent:-57.6pt;}
@list l2:level7
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
        mso-level-tab-stop:100.8pt;
        mso-level-number-position:left;
        margin-left:100.8pt;
        text-indent:-64.8pt;}
@list l2:level8
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
        mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        margin-left:108.0pt;
        text-indent:-72.0pt;}
@list l2:level9
        {mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
        mso-level-tab-stop:115.2pt;
        mso-level-number-position:left;
        margin-left:115.2pt;
        text-indent:-79.2pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
</head>
<body lang=PT-BR link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Rodrigo,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Meu programa dispara um monte de chamadas
ao mesmo tempo, então eu uso o ASYNC: true no ORIGINATE.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Isso estava provocando alguma confusão no
programa justamente para pegar o UniqueID.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Eu faço assim:<o:p></o:p></span></font></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo4'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Mando
o ORIGINATE.<o:p></o:p></span></font></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo4'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Até
que venha um Event: NewChannel não mando outro originate.<o:p></o:p></span></font></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo4'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>O
NewChannel vem imediatamente após o ORIGINATE, então essa espera é bem
curta (menos de 100 ms)<o:p></o:p></span></font></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo4'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Aí
eu pego o UniqueID do NewChannel.<o:p></o:p></span></font></li>
<li class=MsoNormal style='color:navy;mso-list:l0 level1 lfo4'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Só
depois mando o próximo originate...<o:p></o:p></span></font></li>
</ul>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Não se esqueça de pedir os eventos do CALL
para o Asterisk, isto é, no login do AMI coloque <o:p></o:p></span></font></p>
<ul style='margin-top:0cm' type=disc>
<li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo5'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>Events:
call<o:p></o:p></span></font></li>
</ul>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Espero que ajude...<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sergio Batarce<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asteriskbrasil-bounces@listas.asteriskbrasil.org
[mailto:asteriskbrasil-bounces@listas.asteriskbrasil.org] <b><span
style='font-weight:bold'>Em nome de </span></b>Rodrigo Lang<br>
<b><span style='font-weight:bold'>Enviada em:</span></b> segunda-feira, 8 de
novembro de 2010 13:30<br>
<b><span style='font-weight:bold'>Para:</span></b> asteriskbrasil@listas.asteriskbrasil.org<br>
<b><span style='font-weight:bold'>Assunto:</span></b> [AsteriskBrasil] Get the
Uniqueid of Action Originate in the AMI</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hi to all.<br>
<br>
I'm begin a use the AMI and i have the need to get the uniqueid from the call i
have generate using the Action Originate. Anyone can help me?<br>
<br>
</span></font><span class=longtextshorttext><span lang=EN style='background:
white'><span id="result_box">When I generate these commands:</span></span></span><br>
<br>
action: Originate<br>
channel: SIP/101<br>
application: Dial<br>
data: SIP/100,120,Ttr<br>
<br>
<span class=longtext><span title=""><span lang=EN><span id="result_box">The
only response I get when the call is answered, is this:</span></span></span></span><br>
<br>
Response: Success<br>
Message: Originate successfully queued<br>
<br>
<br>
<br>
<br>
Thanks a lots,<br>
-- <br>
Rodrigo Lang,<br>
<a href="http://openingyourmind.wordpress.com/" target="_blank">Opening your
mind - Just another Open Source site</a><o:p></o:p></p>
</div>
</body>
</html>