<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5512" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I did do that, however, if lists 
fax_document_total_pages as NA, and when I try to pass that parameter, I get a 
blank field.&nbsp; The dialplan below is not our production, it is merely a test 
platfrom we use to allow us to ensure your data flow is correct.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Darcy</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=bdfoster@endigotech.com href="mailto:bdfoster@endigotech.com">Brian 
  Foster</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=freeswitch-users@lists.freeswitch.org 
  href="mailto:freeswitch-users@lists.freeswitch.org">FreeSWITCH Users Help</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, May 06, 2012 1:39 PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Freeswitch-users] 
  execute_on_fax_success/failure</DIV>
  <DIV><BR></DIV>
  <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" &lt;<A 
  href="mailto:darcyp@voice2net.ca">darcyp@voice2net.ca</A>&gt; wrote:<BR 
  type="attribution">
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><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,&nbsp; 
    Is there a way to pass the number of pages received, ie, a variable created 
    by spandsp.&nbsp; Everything works, but I do not seem to be able to pass the 
    variables.</FONT></DIV>
    <DIV><FONT face=Arial></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial>&nbsp;&nbsp; &lt;condition field="destination_number" 
    expression="^1(\d{10})$|(\d{10})$"&gt;<BR>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp;&lt;action application="set" 
    data="faxtempdirectory=/faxfiles/${caller_id_number}"/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp; 
    &nbsp;&nbsp;&nbsp;&lt;action application="system" data="mkdir 
    ${faxtempdirectory}"/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;action application="set" 
    data="faxDirection=outbound"/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;action application="set" data="<A 
    href="mailto:emailAddress=$1$2@$%7Bfax2net_server%7D%22/" 
    target=_blank>emailAddress=$1$2@${fax2net_server}"/</A>&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;action application="set" 
    data="faxFile=$1$2-${caller_id_number}-${strftime(%Y-%m-%d-%H-%M-%S)-Success}"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;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}"/&gt;&nbsp;&nbsp; 
    </FONT></DIV>
    <DIV><FONT face=Arial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;action 
    application="answer"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action 
    application="playback" 
    data="silence_stream://2000"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &nbsp;&lt;action application="set" 
    data="fax_enable_t38_request=true"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &lt;action application="set" 
    data="fax_enable_t38=true"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &nbsp;&lt;action application="rxfax" 
    data="${faxFile}.tif"/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    &nbsp;&lt;action 
    application="hangup"/&gt;<BR>&nbsp;&nbsp;&lt;/condition&gt;&nbsp; 
    <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>
  <P>
  <HR>

  <P></P>_________________________________________________________________________<BR>Professional 
  FreeSWITCH Consulting 
  Services:<BR>consulting@freeswitch.org<BR>http://www.freeswitchsolutions.com<BR><BR>FreeSWITCH-powered 
  IP PBX: The CudaTel Communication 
  Server<BR>http://www.cudatel.com<BR><BR>Official FreeSWITCH 
  Sites<BR>http://www.freeswitch.org<BR>http://wiki.freeswitch.org<BR>http://www.cluecon.com<BR><BR>FreeSWITCH-users 
  mailing 
  list<BR>FreeSWITCH-users@lists.freeswitch.org<BR>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<BR>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<BR>http://www.freeswitch.org<BR></BLOCKQUOTE></BODY></HTML>