HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] Faxrcvd and FaxDispatch routing based on MSN number



Hi Johan,

Afraid I can''t help with the CAPI as as I use the Dialogic driver,
which allows me to do as below in FaxDispatch

case "$CIDNUMBER" in
       3001)  SENDTO=reception@xxxxxxxxxxxxxxx; FILETYPE=pdf;;
   # Park St reception
       5900)  SENDTO=reception@xxxxxxxxxxxxxxx; FILETYPE=pdf;;
   # Old Southwark St fax number
       5947)  SENDTO=fax.test@xxxxxxxxxxxxxxx; FILETYPE=pdf;;
   # PS test number
       6998)  SENDTO=test@xxxxxxxxxxxxxxx; FILETYPE=pdf;;
   # test Number
esac





On Thu, Apr 15, 2010 at 1:09 PM, Johan de Vries
<johan.devries@xxxxxxxxxxxx> wrote:
> Hi All,
>
>
>
> I am rather new to the Fax and Capi stuff, so please correct me when I’m
> wrong
>
>
>
> I have a Debian 504 (lenny)  installation with Hylafax 6.0.4 and a Dialogic
> Diva BRi-2  card
>
> Also the capi4hylafax and DIVAS4LINUX are installed
>
>
>
> I want to route the incoming faxes to a mailbox based on the incoming MSN
> number
>
>
>
> An incoming fax gives the following information in the
> /var/spool/hylafax/log
>
>
>
> Apr 14 12:14:59.98: [ 4826]: SESSION BEGIN 000000016 +31.**.****.643
>
> Apr 14 12:14:59.98: [ 4826]: Incoming analog call on controller 1 from 638
> to 3.
>
> Apr 14 12:15:11.84: [ 4826]: Connection established.
>
> Apr 14 12:15:11.84: [ 4826]:    StationID =         +31******758
>
> Apr 14 12:15:11.84: [ 4826]:    BaudRate  = 33600
>
> Apr 14 12:15:11.84: [ 4826]:    Flags     = MMR_compr
>
> Apr 14 12:15:11.84: [ 4826]: Write fax in path /var/spool/hylafax to file
> recvq/fax000000007.tif.
>
> Apr 14 12:15:14.54: [ 4826]: Page 1 was received. - Last Page!
>
> Apr 14 12:15:15.29: [ 4826]: Fax received and calling
> '/var/spool/hylafax/bin/faxrcvd "recvq/fax000000007.tif" "faxCAPI"
> "000000016" "" "        +31725751758" "" "3"'.
>
> Apr 14 12:15:15.49: [ 4826]: Connection is droped with reason 0x3490 (Normal
> call clearing).
>
> Apr 14 12:15:15.49: [ 4826]: SESSION END
>
>
>
> The number "3"  at the end of the line is the number I want to use for the
> routing in FaxDispatch
>
> In the PBX this number is called the MSN number
>
> As far as I understood from the archives this number is called: $SUBADDR  in
> Hylafax
>
>
>
>
>
> My FaxDispatch file is:
>
> FILETYPE=pdf;
>
> case "$SUBADDR" in
>
> 2)          SENDTO=email1@xxxxxxxxxx;;
>
> 3)          SENDTO=email2@xxxxxxxxxx;;
>
> esac
>
>
>
>
>
> In the Faxrcvd file there was nothing mentioned about the $SUBADDR
>
> So I added the lines:
>
> SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>$ERRORSTO | $SED
> 's/^.//'`"
>
> SUBADDR="`$INFO $FILE | $AWK -F: '/SubAddr/ { print $2 }' 2>$ERRORSTO | $SED
> 's/^.//'`"
>
> PAGES="`$INFO -n $FILE | $AWK -F: '/Pages/ { print $2 }' 2>$ERRORSTO | $SED
> 's/^.//'`"
>
>
>
> Still the routing is not working
>
>
>
> My questions are:
>
> Are there suggestions for the Faxrcvd script for this situation ?
>
> How can I do some logging / tailing on the Faxrcvd and FaxDispatch to see
> what happens ?
>
> Is it possible to show the MSN number in the header of the received fax (
> like the CallID1 and CallID2  lines )  ?
>
>
>
> Regards,
>
> Johan
>
>
>
>


____________________ 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@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions