I am trying to send fax via AMI (scripting it with a slightly modified pyst).
Now I can place call (“task”) and get reason “4” back with OriginateResponse event (“Remote end has answered”) — everything works, remote end receives my fax.
r = mgr.originate(
'SIP/m2000/1234567',
'1234567',
context='cntx',
priority='1',
caller_id='7654321',
async=True,
variables={ 'TRUNK': 'SIP/m2000' },
application='SendFax',
data='/tmp/file.tiff,f'
)
But, please, is it ever possible to obtain a status code of Application?
My script receives OriginateResponse event upon call answering (or when remote end is BUSY or like that), and receives nothing after SendFax finishes its job.