goglphilly.blogg.se

Faxdocument submit
Faxdocument submit













faxdocument submit

# a FaxToSend object, known as a fax document object # This outbound application is going to send a fax, so we create # get the call destination and the fax body name from outbound_parametersĭestination, fax_body = outbound_parameters.split(' ') Origin, fax_header = application_parameters.split(' ') # in this sample the call origin and fax header name are given in application_parameters

Faxdocument submit code#

This application requires that call_from is supplied inĪpplication_parameters (this is configured on the outboundįor information on placing outbound calls please read the onlineįor additional information regarding outbound PSTN calls, please see theĪlso have a look at the invoke_outbound_service sample code in theįrom prosody.uas import Hangup, Error, FaxToSend, FaxToReceiveĭef main(channel, application_instance_id, file_man, my_log, application_parameters, outbound_parameters): Several other assumptions are noted in the code comments. The name of the header page, and outbound_parameters is the It is assumed that application_parameters is This sample uses two documents, a 'header' page and theįax 'body'. After that, the call is hung up.Ī simple example that will place a call and send a fax. It then uses _for_next_page() to wait for each page to be sent, it does this until the last page has been indicated, and prints out the number of pages sent so far.įinally, the function _until_finished() is used to wait until the fax session has completed. The application then waits for the fax settings to be negotiated, _for_negotiated_settings(), and prints them to the screen. The fax transmission is started by calling the () function and supplying a reference to the fax document object. The call destination and the call origin are supplied in outbound_parameters and application_parameters respectively (along with body and header in a semi-colon delimited string). The application now places the outbound call. The application then demonstrates adding a page number to each page by configuring a page text object and then calling the my_fax.add_text_to_page() function on each page. Then the body is appended to by calling the my_fax.append() function. It is assumed that the name of the header file will be read from the application_parameters variable, which is configured on the Outbound Services page (Manage -> Outbound Services), and the name of the body is read from outbound_parameters.Īfter creating the fax document object ( my_fax = FaxToSend()), the header file is read in using the my_fax.set_content() function. Both TIFF files must already have been uploaded to the cloud. The first TIFF file is a header and the second is the body. This object is used to read in two TIFF files to create the fax document to be sent. The sample first creates a FaxToSend object which is the wrapper for the fax document.

faxdocument submit

Samples/outbound_send_fax.py Description:Ī sample application that will place a call and send a fax. UAS API - Outbound Send Fax Sample Application















Faxdocument submit