Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] virtual Modems won´t work
Hello Stefan,
>>>Currently, I´m trying hard to make sure, my hylafax server uses its
>>>Fritz!Classic like 4 different virtual Modems.
>
> Again, we are four in our community here and I want to make sure, that
> everyone has got his /her own head information (Fax-Number, Name
> etc.). receiving faxes on different numbers would work using the
> etc/users file, but when you send faxes, everybody will use the same
> information provided by the fax´s head line; and will use the
> provided number to reply -> it would be received in the wrong queue.
> I want them seperated.
you can modify each argument of the config-file when you call the
c2faxsend-command with the -c option. I had the same problem in my
installation and i got the final hint to the undocumented feature from
the avm-list. They should really build an archive!
Write a wrapper-script for c2faxsend and make this the "SendFaxCmd" in
the config-file.
Call c2faxsend with the options you want from this script.
What i haven't solved yet is modifying the FaxNumber and LocalIdentifier
for receiving as this is per device-configuration. In my case i defined
no FaxNumber and a uniform LocalIdentifier string that fits for all users.
I did the following:
-----wrap_c2faxsend ------------
#!/bin/bash
# Wrapper for c2faxsend to manipulate OutgoingMSN, DEVICE and FaxNumber
#
PARAMSTRING=""
DEVICE=""
while getopts ":l:p:c:m:" option
do
case "$option" in
l) ;;
p) ;;
c) PARAMSTRING="$PARAMSTRING -c $OPTARG"
;;
m) DEVICE="$OPTARG"
;;
*) echo "ERROR : Falscher Parameter $OPTARG."
exit 1
;;
esac
done
PARAMSTRING=`echo $PARAMSTRING`
QFILE=`echo $@ | awk '{print $NF}'`
MAILADDR=`awk -F: /mailaddr/'{print $2}' /var/spool/fax/$QFILE`
MSN=`awk /$MAILADDR/'{print $1}' /var/spool/fax/etc/users`
if [ -z "$MSN" ]
then
MSN="999"
fi
if [ "$MSN" -lt "1000" ]
then
FAXNUM="+49.xxxxxxx.$MSN"
MSN="111$MSN"
DEVICE="S1C1B7"
else
FAXNUM="+49.xxxxxxx.$MSN"
MSN="100$MSN"
fi
if [ -z "$PARAMSTRING" ]
then
PARAMSTRING="-c OutgoingMSN:$MSN -c FaxNumber:$FAXNUM"
else
PARAMSTRING="-c OutgoingMSN:$MSN -c FaxNumber:$FAXNUM $PARAMSTRING"
fi
/usr/local/bin/c2faxsend $PARAMSTRING -m $DEVICE $QFILE
-----end wrap_c2faxsend---------
Hope this helps.
--
Holger
____________________ HylaFAX(tm) Users Mailing List _______________________
To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
*To learn about commercial HylaFAX(tm) support, mail sales@hylafax.org.*