HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] jobcontrolcmd



thanks for you help.
 
I want use jobcontrol to config the  modem's work .The fiel is bellow
etc/config
LogFacility:            daemon
CountryCode:            86
AreaCode:               769
LongDistancePrefix:     1
InternationalPrefix:    011
DialStringRules:        etc/dialrules
ServerTracing:          1
ModemGroup:             DYC:ttyS0
ModemGroup:             ZXL:536ep
MaxBatchJobs:           1
JobControlCmd:          bin/jobcontrol-destctrls.sh
 
 
 
bin/jobcontrol-destctrls.sh
 
JOBID=$1
##
## GetJobParam <param>
## - returns the value of the job param
GetJobParam ()
{
        grep "^$1:" sendq/q$JOBID | cut -d : -f 2-
}
 

##
## SetControlParam <tag> <value>
SetControlParam ()
{
    echo "$1: \"$2\""
}
 

MODEM=$(GetJobParam modem)
 
if [ $MODEM != "any" ]
then
        # If they've specified a modem, batching will probably ignore
        # it anyways - we enforce letting us control modem groups.
        SetControlParam RejectNotice "Modem $MODEM not allowed - use any"
        exit
fi
 
DEST=$(GetJobParam number)
 
case "$DEST" in
    +86769*)
                SetControlParam Modem "DYC"
                ;;
        +0*)
                SetControlParam Modem "ZXL"
                ;;
        +86*)
                SetControlParam Modem "DYC"
                ;;
        +*)
                SetControlParam Modem "ZXL"
                ;;
        *)
                SetControlParam RejectNotice "Number was not in IDD format (+CCNXXNXXX)"
                ;;
 
esac
 
 
but the hylafax not work in mi think like.+86 work in DYC .
what is wrong or where are set for me(file).what is file me forgeted
 
 
 
thanks for any help.



Project hosted by iFAX Solutions