When .call files remove at "/var/spool/asterisk/outgoing"

I tried copying more than 100 outbound calls all at once to the “/var/spool/asterisk/outgoing” directory.
However, most calls failed, and while looking for the reason, I came across an article saying that many files should not be placed in a directory at once.
So, I copied them in 10 pieces and tried to add a delay in between, but I saw that the call file was still alive in the directory even after the call ended.
When do call files remove?

cp’ing files there will often fail, asterisk is ‘very aggressive’ in consuming them, you need to ‘stage’ them somewhere else then ‘mv’ them into outgoing

In Asterisk, call files in the /var/spool/asterisk/outgoing directory are removed once the associated outbound call is completed or terminated. However, if the call remains active or encounters errors, the file persists until the call ends or the issue is resolved. Monitoring Asterisk logs for errors and ensuring proper call completion can help address any issues with lingering call files in the directory.

Best regard
Danish Hafeez | QA Assistant
ICTInnovations

Even if I change it to ‘mv’ command, the same problem occurs. Could there be another problem?

I checked the log for the call file using ‘tail’, and DelayedRetry keeps being added.

call file before mv

Channel: PJSIP/{userNumber}@{trunk}
CallerID: {myCallerID}
Context: {myContext}
Extension: {myExtension}
Priority: 1
MaxRetries: 2
RetryTime: 3
WaitTime: 5

call file after mv

Channel: PJSIP/{userNumber}@{trunk}
CallerID: {myCallerID}
Context: {myContext}
Extension: {myExtension}
Priority: 1
MaxRetries: 2
RetryTime: 3
WaitTime: 5
StartRetry: 13381 1 (1709875258)

DelayedRetry: 13381 0 (1709875256)

DelayedRetry: 13381 0 (1709875258)

DelayedRetry: 13381 0 (1709875259)

EndRetry: 13381 1 (1709875260)

StartRetry: 13381 2 (1709875264)

DelayedRetry: 13381 1 (1709875262)

DelayedRetry: 13381 1 (1709875263)

DelayedRetry: 13381 1 (1709875264)

DelayedRetry: 13381 1 (1709875265)

DelayedRetry: 13381 1 (1709875266)

DelayedRetry: 13381 1 (1709875267)

DelayedRetry: 13381 1 (1709875268)

DelayedRetry: 13381 1 (1709875269)

DelayedRetry: 13381 1 (1709875270)

DelayedRetry: 13381 1 (1709875271)

Did I write the call file incorrectly?

The call is failing so being retried , you would need to post the logs from
Fri Mar 8 01:48:44 PM UTC 2024
to
Fri Mar 8 01:49:00 PM UTC 2024

Is this the actual body of the callfile? If so, that’s the problem. If not, show us what the values actually are so we are sure it is correct.

Not original. I couldn’t post it because it was personal information. Calls work normally, but only the call files do not disappear. Is there a problem with the text?

What logs should I look at? There is no output in /var/log/asterisk/full.