[asterisk-users] Waiting for a call to complete with AMI Originate

Philipp Kempgen philipp.kempgen at amooma.de
Wed Jul 22 06:06:33 CDT 2009


Scott Gifford schrieb:
> I'm using an AMI Originate command to send a fax.  The fax is sent by
> a script, and I'd like my script to send the fax, wait until it has
> succeeded or failed, then exit with an appropriate error code (it is
> driven by a mail system, so the exit code will tell the mail system
> whether to retry the fax later).
> 
> The script works great if the fax succeeds, or if the line is busy or
> doesn't pick up.  The problem I'm having is that when a fax is sent
> and the line picks up but doesn't accept the fax (for example if I
> call a voice line).
> 
> In this case, I don't seem to have enough information to tell when the
> call has failed and I should give up.  I do get a Hangup event, but I
> don't see a way to distinguish it from other hang-up events from other
> calls.
> 
> Here is an example of a recent fax I sent (the format of the request/
> response lines is a dump of the variables in Perl, hopefully it makes
> sense):
> 

>           'Application' => 'txfax',

> Any suggestions?

Probably not what you are looking for but you could use Iaxmodem +
HylaFax.
Alternatively have a look at the SendFax() application in Asterisk 1.6.
------
  -= Info about application 'SendFAX' =-

[Synopsis]
Send a FAX

[Description]
  SendFAX(filename[|options]):
Send a given TIFF file to the channel as a FAX.
...
This application sets the following channel variables upon completion:
     FAXSTATUS       - status of operation:
                           SUCCESS | FAILED
     FAXERROR        - Error when FAILED
------


    Philipp Kempgen
-- 
AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de
Videos of the AMOOCON VoIP conference 2009 ->  http://www.amoocon.de
-- 



More information about the asterisk-users mailing list