/outgoing/ .call Files And RetryTime Problem

Home » Asterisk Users » /outgoing/ .call Files And RetryTime Problem
Asterisk Users No Comments

asterisk-16.8.0

Hi

I’ve set up a callback script to retry a number if it’s busy, but as I watch the console output asterisk seems to rush 3 or 4 calls at once before waiting the RetryTime of 20 seconds that I’ve set.

The script:

—–8<------ CALLERID=$1 EXTENSION=$2 TEMP=`mktemp /tmp/call-XXXXXX`.call cat < $TEMP
Channel: IAX2/account@provider/44${EXTENSION}
Extension: $CALLERID
Callerid:
Context: out WaitTime: 15
MaxRetries: 9999
RetryTime: 20
Priority: 1
EOF

mv $TEMP /var/spool/asterisk/outgoing/
—–8<------ Some cut log output to show the timing: -----8<------ [2020-04-23 13:05:38.104] NOTICE[23290]: pbx_spool.c:450 attempt_thread: Call failed to go through, reason (5) Remote end is Busy -- Attempting call on xxxxxx@out:1 (Retry 327) -- Called xxxxxxx -- Call accepted by 1.2.3.4:4569 (format alaw) -- Format for call is (alaw) -- xxxxxxxxxxxxxxxxxx is making progress -- xxxxxxxxxxxxxxxxxx is busy -- Hungup 'xxxxxxxxxxxxxxxxxx' [2020-04-23 13:05:38.468] NOTICE[23316]: pbx_spool.c:450 attempt_thread: Call failed to go through, reason (5) Remote end is Busy [2020-04-23 13:05:41.547] NOTICE[23614]: pbx_spool.c:450 attempt_thread: Call failed to go through, reason (5) Remote end is Busy -----8<------ So there it rushed 3 calls through in a few seconds without waiting, and it will do that constantly, but after a `rush' it will wait the 20 seconds before retrying. Any advice appreciated. --