This script uses the DNIS of the received fax call to look up data for processing the call in Active Directory. The sample script pulls down a number of variables, but you can edit the SELECT statements and the assignments to CopiaFacts variables to meet the requirements of your application.
When used in a fax-to-email context, the only required assignment is to set PRV_EMAIL_RECIPS from the user e-mail address retrieved from AD. The example assumes a single e-mail address, but this variable can be set to a comma-separated list of addresses if available. In addition PRV_EMAIL_OPTS can be assigned if available.
The post-receive script chain will normally continue to PRI_Fax2Email after this script.