<p>You news to pass fax_document_total_pages to your script. Please read the spandsp page on the wiki (search spandsp). </p>
<p>Also by looking at your script you might be able to polish up your dialplan so that its not so complicated.</p>
<div class="gmail_quote">On May 6, 2012 11:06 AM, "Darcy Primrose" <<a href="mailto:darcyp@voice2net.ca">darcyp@voice2net.ca</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div bgcolor="#ffffff">
<div><font face="Arial">I am using excute_on_fax_success to call a script
when a fax is received, the script converts the fax to pdf and emails it,
Is there a way to pass the number of pages received, ie, a variable created by
spandsp. Everything works, but I do not seem to be able to pass the
variables.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"> <condition
field="destination_number"
expression="^1(\d{10})$|(\d{10})$"><br>
<action application="set"
data="faxtempdirectory=/faxfiles/${caller_id_number}"/> <br>
<action application="system" data="mkdir
${faxtempdirectory}"/> <br>
<action application="set"
data="faxDirection=outbound"/> <br>
<action application="set" data="<a href="mailto:emailAddress=$1$2@$%7Bfax2net_server%7D%22/" target="_blank">emailAddress=$1$2@${fax2net_server}"/</a>><br>
<action application="set"
data="faxFile=$1$2-${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)-Success}"/><br> <action
application="set" data="execute_on_fax_success=system
/./var/mail/sentfaxes/fax2mail.sh ${faxFile} <a href="mailto:$1$2@$%7Bfax2net_server" target="_blank">$1$2@${fax2net_server</a>}
${fax_security_code} ${fromRc} fax2net_orig=${fax_email}=
${fax_transfer_rate}"/> </font></div>
<div><font face="Arial"> <action
application="answer"/><br> <action
application="playback"
data="silence_stream://2000"/><br>
<action application="set"
data="fax_enable_t38_request=true"/><br>
<action application="set"
data="fax_enable_t38=true"/><br>
<action application="rxfax"
data="${faxFile}.tif"/><br> <action
application="hangup"/><br> </condition>
<br></font></div>
<div><font face="Arial">Thanks</font></div>
<div><font face="Arial">Darcy Primrose</font></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>