How to rename received fax file names?
You can create a file with name FaxDispatch if you already don't have it after installation. file path is /var/spool/hylafax/etc/FaxDispatch . In FaxDispatch you have variables such as callerid number and name. So with a simple dialplan you can change the calleridname and add the asterisk variables you want and use in FaxDispatch. For example I want to save date, time and uniqueid in the fax file name .
here is the Dialplan :
and in FaxDispatch you can use $CALLID1 that is callerid number and $CIDNAME that is callerid name.
FaxDispatch for Sending file to your email and printer simultaneously :
You can create a file with name FaxDispatch if you already don't have it after installation. file path is /var/spool/hylafax/etc/FaxDispatch . In FaxDispatch you have variables such as callerid number and name. So with a simple dialplan you can change the calleridname and add the asterisk variables you want and use in FaxDispatch. For example I want to save date, time and uniqueid in the fax file name .
here is the Dialplan :
exten => s,1,NOOP( ** Hey Im receiving a Fax ** ) exten => s,n,SET(CALLERID(name)=DATE-${STRFTIME(${EPOCH},,%Y-%m-%d)}-TIME-${STRFTIME(${EPOCH},,%H-%M-%S)}-UNIQUEID-${UNIQUEID}) exten => s,n,Dial(IAX2/iaxmodem) exten => s,n,Hangup
and in FaxDispatch you can use $CALLID1 that is callerid number and $CIDNAME that is callerid name.
case "$DEVICE" in ttyIAX1) cp $FILE /var/spool/hylafax/recvq/FAX-$CALLID1-$CIDNAME.tif;; esac
FaxDispatch for Sending file to your email and printer simultaneously :
case "$DEVICE" in ttyIAX1) SENDTO=omid.mohajerani@miniatel.com,omid.mohajerani@gmail.com # all faxes received on ttyIAX0 /usr/bin/lp -d HP_LaserJet_CP1525N -o portscape -o fit-to-page -o media=A4 /var/spool/hylafax/recvq/${FILENAME}.tif ;; esac
Comments
Post a Comment