Possible Bug? .call files executing multiple times

Home » Asterisk Users » Possible Bug? .call files executing multiple times
Asterisk Users 4 Comments

Hello all,

We are setting up an auto-dialer to call customers based on the opening
of tickets in our internal ticketing system. Everything is going fine
so far except for one snag:

To test the system we are implementing I am manually moving .call files
into the /var/spool/asterisk/outgoing directory like this:

asterisk@dialerdev:~# cp test5703.call /tmp/test.call && mv
/tmp/test.call /var/spool/asterisk/outgoing/

This works great and the call is immediately started, however more often
than not (ie. not all the time, but most of the time) after answering
the call or rejecting it (sending it to voicemail), another call is
performed using the same file.

I notice that when a call is initiated the .call file is not removed
immediately. Instead, asterisk waits until the call is completed before
removing the call file, so it seems like 5-10 seconds into the call
since the .call file still exists another call is placed.

Any advice on how we can avoid this situation and ensure that only one
call is made per .call file?

The OS is Ubuntu 11.04 server and we’re running Asterisk 1.8.

Thanks,

4 thoughts on - Possible Bug? .call files executing multiple times

  • Danny,

    Now that I notice, MaxRetries has a default of 0 anyway, so not setting
    it should have not retried at all anyway. Although I did set it to 0
    manually and still get the double calls.

    Brandon

  • Danny,

    Now that I notice, MaxRetries has a default of 0 anyway, so not setting
    it should have not retried at all anyway. Although I did set it to 0
    manually and still get the double calls.

    Brandon

  • Here is the contents of the .call file. The file is the same before the
    move as after (I did a cat on the file after the move, while the phone
    was ringing a second time):

    Channel: Local/5703@ext-main
    Callerid: “MyCompany” <8005551234>
    Set: TicketNumber=1000000
    Set: CallerID_Num=8005551234
    Set: CALLSTATUS=0
    Context: ext-autodialer
    MaxRetries: 0
    WaitTime: 45
    Extension: s
    Priority: 1

    We have tried using a SIP channel as well (as opposed to Local) with the
    same results. The s extension of ext-autodialer runs an AGI script
    which makes use of those Set: variables.

    I can most easily reproduce the problem by simply not answering the
    call. After 2 or 3 rings line 2 on the phone lights up indicating
    another call. If I reject the first call and answer the second call,
    it’s the same script.

    Also during my most recent test the following happened:

    1. I moved file to /var/spool/asterisk/outgoing
    2. Phone rang on line 1
    3. I let phone continue to ring
    4. After 3 rings, line 2 started ringing (another call from the same
    .call file)
    5. I rejected both calls, sending both to voicemail.
    6. 6 or 7 seconds after rejecting both calls, the phone rang a 3rd time.
    7. I let the phone ring until it was automatically moved to voicemail
    and finally the .call file was removed.

  • Thanks Danny. Changing the ownership of the .call files seems to have
    fixed the problem and I can now see that asterisk is adding a
    “StartRetry” line to the end of the file after it makes the first call,
    which it was unable to do before since the file was owned by root:

    cp test5703.call /tmp/test.call && chown asterisk:asterisk
    /tmp/test.call && mv /tmp/test.call /var/spool/asterisk/outgoing/

    Thanks,
    Brandon