Cosmin Prund
2007-Oct-15 08:26 UTC
[asterisk-users] About .call files when the congestion is on my side
Hello everyone. I'm working on an application that needs to automatically send faxes. To send the faxes I create .call files but the .call files mostly fail because my lines are always congested within business hours! Is there any trick I can use to give the end user a better chance at actually receiving the faxes? I already tried using the local channel for dialing (so I can put in there a loop that waits for a line to be available) but this doesn't work because I'm sending faxes using chan_capi's capicommand(sendfax) - and that command requires an chan_capi channel, it doesn't like the "local" channel. Besides, looping in the dialplan would probably interfere with the "Wait" option in the .call file so that's a really bad solution. -- Thanks for any suggestion, Cosmin Prund -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071015/692e5548/attachment.htm
Anselm Martin Hoffmeister
2007-Oct-15 09:11 UTC
[asterisk-users] About .call files when the congestion is on my side
Am Montag, den 15.10.2007, 11:26 +0300 schrieb Cosmin Prund:> Hello everyone. > > > > I?m working on an application that needs to automatically send faxes. > To send the faxes I create .call files but the .call files mostly fail > because my lines are always congested within business hours! Is there > any trick I can use to give the end user a better chance at actually > receiving the faxes?Are you aware of the MaxRetries, RetryTime and WaitTime in your call-files? You can set quite large numbers, e.g. a RetryTime of 15 minutes and a MaxRetries of 32 would try for up to 8 hours. Note though that any "answered" call will stop the retry cycle. This is embarassing for Zap channels that cannot detect remote ringing / remote busy reliably. As you use ISDN this should not be a problem> I already tried using the local channel for dialing (so I can put in > there a loop that waits for a line to be available) but this doesn?t > work because I?m sending faxes using chan_capi?s capicommand(sendfax) > ? and that command requires an chan_capi channel, it doesn?t like the > ?local? channel. Besides, looping in the dialplan would probably > interfere with the ?Wait? option in the .call file so that?s a really > bad solution.If you want to do this (looping) use MaxRetries = 0. I do not understand why having the remote side connecting to a local extension that does faxing would not work. Or is it that the CAPI FAX stuff will only work on unAnswer()ed channels? Can you provide an example .call file? Regards, Anselm
Lenz
2007-Oct-15 10:35 UTC
[asterisk-users] About .call files when the congestion is on my side
Hello Cosmin, it's hard to tell without first knowing what is going on on your side, but I would not just drop call files and let Asterisk decide when to process them - if you have hundreds of faxes pending, you risk having all lines busy sending faxes and your other users without a dial tone. I would do something like this: 1. create a cron job that runs every couple of minutes 2. the cron job looks at the list of faxes to send (ag a database table) and checks if there are call files waiting to be processed; it will thene generate call files up to a maximum number of parallel slots you choose (so if you have say 10 lines, you never have more than 5 faxes outstanding). 3. when a call file is generated, it is set up to retry a number of times (like 20 minutes) through the MaxRetries, RetryTime and WaitTime parameters 4. Once a fax is sent successfully, the database is updated so it's not sent anymore. Just my euro 0.02, l. On Mon, 15 Oct 2007 10:26:41 +0200, Cosmin Prund <cosmin.prund at adicomsoft.ro> wrote:> Hello everyone. > > > I'm working on an application that needs to automatically send faxes. To > send the faxes I create .call files but the .call files mostly fail > because my lines are always congested within business hours! Is there > any trick I can use to give the end user a better chance at actually > receiving the faxes? > > > I already tried using the local channel for dialing (so I can put in > there a loop that waits for a line to be available) but this doesn't > work because I'm sending faxes using chan_capi's capicommand(sendfax) - > and that command requires an chan_capi channel, it doesn't like the > "local" channel. Besides, looping in the dialplan would probably > interfere with the "Wait" option in the .call file so that's a really > bad solution. > > > -- > > Thanks for any suggestion, > > Cosmin Prund > > >-- Loway Research - Home of QueueMetrics http://queuemetrics.com