<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'><div style="font-family: Arial; font-size: 10pt; color: #000000"><div style="font-family: Arial; font-size: 10pt; color: #000000"><span>Hello, </span><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><br></span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5">I don't really understand how channel Local works. I need that asterisk initiate a call and get some data (DTMF). </span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><br></span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5">So to do that I've created this dialplan : </span></div><div><font class="Apple-style-span" face="Times"><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></span></font></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">; extensions.conf - the Asterisk dial plan</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">;</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">[general]</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">static=yes</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">writeprotect=no</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">clearglobalvars=no</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">[dtmf]</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,1,Verbose(Get User ID)</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,Dial(dahdi/1/99999999,120,G(read^1^1))</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,Hangup()</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">[read]</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,1,Hangup()</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,Read(data,play-msg,4,,2,15)</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,Verbose("${data}")</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,AGI(send_data.py,${data})</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">exten => 1,n,Hangup()</span></span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><br></span></div><div>File: test.call</div><div><br></div><div><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">Channel: Local/1@dtmf</span><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><br></span><span class="Apple-style-span" style="font-family: Times; font-size: medium; ">Application: NoOp</span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><br></span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5">I've create a file name test.call and then move the call file to the dir /var/spool/asterisk/outgoing/. Some issues I've had, the option G, in the Dial function don't wait the user answer the call to follow the dialplan. Is this rigth? Is this because I have used a Local Channel? </span></div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"></span>Are better way to do that?</div><div><br></div><div>Regards, </div><div><span id="f9f81ac5-179f-4f59-b690-f4b2f39594e5"><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;"><b><br></b></span></font></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif;"><span class="Apple-style-span" style="font-size: small;"><strong>S<span class="Apple-style-span" style="font-size: small;">idarta Oliveira</span></strong></span></span></div></span></div></div></div></div></body></html>