&gt;Date: Thu, 24 Apr 2008 06:54:27 -0700 (PDT)<br>&gt;From: Steve Edwards &lt;<a href="http://asterisk.org">asterisk.org</a>@<a href="http://sedwards.com">sedwards.com</a>&gt;<br>&gt;Subject: Re: [asterisk-users] Forking in Dialplan<br>
&gt;To: Asterisk Users Mailing List - Non-Commercial Discussion<br>&nbsp;&gt; &nbsp; &lt;<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>&gt;<br>&gt;Message-ID: &lt;<a href="mailto:Pine.LNX.4.64.0804240648330.23487@fs.sedwards.com">Pine.LNX.4.64.0804240648330.23487@fs.sedwards.com</a>&gt;<br>
&gt;Content-Type: text/plain; charset=&quot;x-unknown&quot;<br><br>&gt;&gt; ----- &quot;Tobias Ahlander&quot; &lt;<a href="mailto:plyschen@gmail.com">plyschen@gmail.com</a>&gt; escreveu:<br><br>&gt;&gt;&gt; Is it possible to somehow fork in the dialplan? Say a call comes in. <br>
&gt;&gt;&gt; Then I want to wait 30 seconds and then write in a database, but at the <br>&gt;&gt;&gt; same time while I wait I want to go on with other commands too.<br><br>&gt;On Thu, 24 Apr 2008, Vin??cius Fontes wrote:<br>
<br>&gt;&gt; You can call an AGI script that will call another script. That last one <br>&gt;&gt; would wait 10 seconds and write in the database. The following example <br>&gt;&gt; works for me:<br>&gt;&gt;<br>&gt;&gt; /var/lib/asterisk/agi-bin/agi-test.agi:<br>
&gt;&gt;<br>&gt;&gt; #!/bin/bash<br>&gt;&gt; nohup /root/helloworld.sh 1&gt;/dev/null 2&gt;/dev/null &amp;<br>&gt;&gt; exit 0<br>&gt;&gt;<br>&gt;&gt; /root/helloworld.sh:<br>&gt;&gt;<br>&gt;&gt; #!/bin/bash<br>&gt;&gt; sleep 10<br>
&gt;&gt; echo &quot;Hello world!&quot; &gt;&gt; /root/helloworld.txt<br>&gt;&gt; exit 0<br><br>&gt;Why do you need the first AGI? Would:<br><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; exten = _x.,n,system(nohup /root/helloworld.sh 1&gt;/dev/null 2&gt;&amp;1 &amp;)<br>
<br>&gt;suit your needs?<br><br>&gt;Thanks in advance,<br>&gt;------------------------------------------------------------------------<br>&gt;Steve Edwards&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sedwards@sedwards.com">sedwards@sedwards.com</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Voice: +1-760-468-3867 PST<br>
&gt;Newline&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax: +1-760-731-3000<br><br><br>Thank you Steve, this seems to work just as I want it to. Now I just have to figure out how to send variables to a system call, but I think I have that covered somewhere :) <br>
<br>Best regards, <br>Tobias<br>