<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'><div><span><div><div>&nbsp;&nbsp;</div><div>Thanks Mark for your reply.&nbsp;</div><div><br></div><div>I understand all you explained and I agree . All I want to do is abstract for my app how handle channels (DAHDI or SIP). That's is the main reason, I try to use Local Channels and NoOp Application so the dial plan should do all the heavy work (channels avaliable).&nbsp;</div><div>My app , in the first idea, will create the same call file.</div><div>There is a better way to treat this issue?&nbsp;</div><div><br></div><div>Until now, we use asterisk for routes call in our office. Now we are thinking in integrate asterisk with our app.&nbsp;</div><div><br></div><div>Thanks once again!</div><div><br></div>Regards&nbsp;</div><span name="x"></span><div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: small; font-weight: bold; "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; font-size: small; "><strong>S<span class="Apple-style-span" style="font-size: small;">idarta Oliveira</strong></span></span></div><span name="x"></span><br></span><br><hr id="zwchr"><b>De: </b>"Mark Murawski" &lt;markm-lists@intellasoft.net&gt;<br><b>Para: </b>asterisk-users@lists.digium.com<br><b>Enviadas: </b>Terça-feira, 16 de Novembro de 2010 15:15:16<br><b>Assunto: </b>Re: [asterisk-users] Issues with Local Channel<br><br>Local channels behave like an endpoint. &nbsp;So instead of a sip phone <br>picking up the call, asterisk is picking up the call.<br><br>Instead of someone speaking into a sip phone, asterisk can play tracks, <br>or record digits, etc.<br><br>You need to make sure that the call does not end before you're done with <br>your local channel. &nbsp;Your current use is incorrect and your call is <br>going to hang up before it does much of anything.<br><br>Channel: Local/1@dtmf<br>Application: NoOp<br><br>This is guaranteed to not work... asterisk will spawn the local channel <br>one one leg, lets call it the source leg, and it will run the <br>application NoOp on the destination leg. &nbsp;The NoOp will run, there is <br>then no more dialplan to run, so the call will be hung up.<br><br>Also... using the G option to dial, is probably not what you want. &nbsp;You <br>must think of a local channel as an end point.<br><br>I'm not sure if this will get you exactly what you want, but it should <br>get you further along the path.<br><br># destination dialplan<br>[read]<br>exten =&gt; 1,1,Answer()<br>exten =&gt; 1,n,Read(data,play-msg,4,,2,15)<br>exten =&gt; 1,n,Verbose("${data}")<br>exten =&gt; 1,n,AGI(send_data.py,${data})<br>exten =&gt; 1,n,Hangup()<br><br>-- Note that timeout is in milliseconds<br><br>Action: Originate<br>Channel: DAHDI/1/99999999<br>Context: read<br>Exten: 1<br>Priority: 1<br>Timeout: 120000<br><br><br>This isn't using the local channel, but instead uses straight dialplan. <br>&nbsp;&nbsp;Asterisk will wait for the "source leg", 99999999 to answer, and once <br>it does, it will execute [read]<br><br><br>Here's how to do it with local channels.<br><br># source leg<br>[dialout]<br>exten =&gt; 1,1,Dial(dahdi/1/99999999,120)<br>exten =&gt; 1,n,Hangup()<br><br># destination leg<br>[read]<br>exten =&gt; 1,1,Answer()<br>exten =&gt; 1,n,Read(data,play-msg,4,,2,15)<br>exten =&gt; 1,n,Verbose("${data}")<br>exten =&gt; 1,n,AGI(send_data.py,${data})<br>exten =&gt; 1,n,Hangup()<br><br>Action: Originate<br>Channel: Local/1@dialout<br>Context: read<br>Exten: 1<br>Priority: 1<br>Timeout: 120000<br><br>Note, that the timeout applies to waiting for the Channel "source leg", <br>endpoint to pick up. &nbsp;If you put the timeout to say 1000, (1 second), <br>asterisk will kill the call before the Dial() timeout of 120 seconds hit.<br><br><br><br>On 11/16/2010 07:57 AM, Sidarta Aguiar de Oliveira wrote:<br>&gt; Hello,<br>&gt;<br>&gt; I don't really understand how channel Local works. I need that asterisk<br>&gt; initiate a call and get some data (DTMF).<br>&gt;<br>&gt; So to do that I've created this dialplan :<br>&gt;<br>&gt; ; extensions.conf - the Asterisk dial plan<br>&gt; ;<br>&gt; [general]<br>&gt; static=yes<br>&gt; writeprotect=no<br>&gt; clearglobalvars=no<br>&gt;<br>&gt; [dtmf]<br>&gt; exten =&gt; 1,1,Verbose(Get User ID)<br>&gt; exten =&gt; 1,n,Dial(dahdi/1/99999999,120,G(read^1^1))<br>&gt; exten =&gt; 1,n,Hangup()<br>&gt;<br>&gt; [read]<br>&gt; exten =&gt; 1,1,Hangup()<br>&gt; exten =&gt; 1,n,Read(data,play-msg,4,,2,15)<br>&gt; exten =&gt; 1,n,Verbose("${data}")<br>&gt; exten =&gt; 1,n,AGI(send_data.py,${data})<br>&gt; exten =&gt; 1,n,Hangup()<br>&gt;<br>&gt; File: test.call<br>&gt;<br>&gt; Channel: Local/1@dtmf<br>&gt; Application: NoOp<br>&gt;<br>&gt; I've create a file name test.call and then move the call file to the dir<br>&gt; /var/spool/asterisk/outgoing/. Some issues I've had, the option G, in<br>&gt; the Dial function don't wait the user answer the call to follow the<br>&gt; dialplan. Is this rigth? Is this because I have used a Local Channel?<br>&gt; Are better way to do that?<br>&gt;<br>&gt; Regards,<br>&gt; *<br>&gt; *<br>&gt; *Sidarta Oliveira*<br>&gt;<br><br><br>-- <br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; http://www.asterisk.org/hello<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; http://lists.digium.com/mailman/listinfo/asterisk-users<br></div></div></body></html>