<div><div>Hello,</div><div><br></div><div>I noticed that when i move a call file to outgoing directory, two asterisk threads are dealing with it.</div><div><br></div><div>]# grep FAX_44731.call /var/log/asterisk/full.2</div>

<div><br></div><div>[Nov 27 09:23:10] WARNING[26842] pbx_spool.c: Unable to set utime on /var/spool/asterisk/outgoing/FAX_44731.call: Operation not permitted</div><div>[Nov 27 09:23:25] VERBOSE[18852] pbx.c:     -- Executing [s@asteriskgw_fax:1] System(&quot;DAHDI/i1/0312xxxxxxx-b08&quot;, &quot;echo &quot;Set: UNIQUEID=1354000990.39861&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_44731.call&quot;) in new stack</div>

<div>[Nov 27 09:25:33] VERBOSE[18852] pbx.c:     -- Executing [s@asteriskgw_fax:3] System(&quot;DAHDI/i1/0312xxxxxxx-b08&quot;, &quot;echo &quot;Set: FAXSTATUS=SUCCESS&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_44731.call&quot;) in new stack</div>

<div>[Nov 27 09:25:33] WARNING[26842] pbx_spool.c: At least one of app or extension must be specified, along with tech and dest in file /var/spool/asterisk/outgoing/FAX_44731.call</div><div>[Nov 27 09:25:33] WARNING[26842] pbx_spool.c: Invalid file contents in /var/spool/asterisk/outgoing/FAX_44731.call, deleting</div>

<div><br></div><div>As you see there are two thread dealing with my call file. Now let&#39;s inspect the thread 18852.</div><div><br></div><div>]# grep &quot;\[18852\]&quot; /var/log/asterisk/full.2 </div><div>[Nov 27 09:23:10] VERBOSE[18852] pbx_spool.c:     -- Attempting call on DAHDI/g0/0312xxxxxxx for s@asteriskgw_fax:1 (Retry 1)</div>

<div>[Nov 27 09:23:10] DEBUG[18852] sig_pri.c: sig_pri_request 5</div><div>[Nov 27 09:23:10] DEBUG[18852] sig_pri.c: CALLER NAME:  NUM: 90312xxxxxxx</div><div>[Nov 27 09:23:10] VERBOSE[18852] sig_pri.c:     -- Requested transfer capability: 0x00 - SPEECH</div>

<div>[Nov 27 09:23:25] VERBOSE[18852] pbx.c:     -- Executing [s@asteriskgw_fax:1] System(&quot;DAHDI/i1/0312xxxxxxx-b08&quot;, &quot;echo &quot;Set: UNIQUEID=1354000990.39861&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_44731.call&quot;) in new stack</div>

<div>[Nov 27 09:23:25] VERBOSE[18852] pbx.c:     -- Executing [s@asteriskgw_fax:2] SendFAX(&quot;DAHDI/i1/0312xxxxxxx-b08&quot;, &quot;/tmp/Qg90Ox5YGF5kYkJu.tif,zdfs&quot;) in new stack</div><div>[Nov 27 09:23:25] VERBOSE[18852] res_fax.c:     -- Channel &#39;DAHDI/i1/0312xxxxxxx-b08&#39; sending FAX:</div>

<div>[Nov 27 09:23:25] VERBOSE[18852] res_fax.c:     --    /tmp/Qg90Ox5YGF5kYkJu.tif</div><div>[Nov 27 09:25:33] VERBOSE[18852] pbx.c:     -- Executing [s@asteriskgw_fax:3] System(&quot;DAHDI/i1/0312xxxxxxx-b08&quot;, &quot;echo &quot;Set: FAXSTATUS=SUCCESS&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_44731.call&quot;) in new stack</div>

<div>[Nov 27 09:25:33] VERBOSE[18852] pbx.c:     -- Auto fallthrough, channel &#39;DAHDI/i1/0312xxxxxxx-b08&#39; status is &#39;UNKNOWN&#39;</div><div>[Nov 27 09:25:33] VERBOSE[18852] chan_dahdi.c:     -- Hungup &#39;DAHDI/i1/0312xxxxxxx-b08&#39;</div>

<div>[Nov 27 09:25:33] NOTICE[18852] pbx_spool.c: Call completed to DAHDI/g0/0312xxxxxxx</div><div><br></div><div>It seems that the thread 18852 executes it normally but the thread 26842 deletes my call file. And when I inspected the asterisk log file, i saw that the thread 26842 is deleting all my call files.</div>

<div><br></div><div>Here is my custom_extensions.conf file:</div><div><br></div><div>[asteriskgw_fax]</div><div>exten =&gt; s,1,System(echo &quot;Set: UNIQUEID=${CDR(uniqueid)}&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_${ID}.call)</div>

<div>exten =&gt; s,2,SendFAX(${FAXFILE},zdfs)</div><div>exten =&gt; s,3,System(echo &quot;Set: FAXSTATUS=${FAXSTATUS}&quot; &gt;&gt; /var/spool/asterisk/outgoing/FAX_${ID}.call)</div><div><br></div><div>And here is a sample of call file:</div>

<div><br></div><div>Channel: DAHDI/g0/0312xxxxxxx</div><div>MaxRetries: 0</div><div>RetryTime: 60</div><div>Context: asteriskgw_fax</div><div>Extension: s</div><div>Set: FAXFILE=/tmp/8Mg3yihXahZVejDf.tif</div><div>Set: ID=44884</div>

<div>Callerid: 90312xxxxxxx</div><div>Archive: Yes</div><div><br></div><div><br></div><div><br></div><div>-- </div><div>Necati DEMİR</div><div>--------------------</div></div>