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] (SOLVED) Really confused about called-based dispatch ...



Giuliano David wrote:
Really confused about called-based dispatch ...
What is confusing me is that my logs CONTAINS the called number (39070xxxxxxx in the log below), but this value is not passed to faxrcvd script nor to FaxDispatch script.
Here a log, wher, at the end, you can see that no called ID is passed to faxrcvd script.


Jun 19 17:12:59.99: [ 4781]: SESSION BEGIN 000006585 39070xxxxxxx
Jun 19 17:12:59.99: [ 4781]: HylaFAX (tm) Version 4.4.0
Jun 19 17:12:59.99: [ 4781]: <-- [4:ATA\r]
Jun 19 17:13:03.71: [ 4781]: --> [7:CONNECT]
Jun 19 17:13:03.71: [ 4781]: ANSWER: FAX CONNECTION DEVICE '/dev/ttyIAX3'
Jun 19 17:13:03.71: [ 4781]: RECV FAX: begin
Jun 19 17:13:03.71: [ 4781]: <-- data [32]
Jun 19 17:13:03.71: [ 4781]: <-- data [2]
Jun 19 17:13:04.67: [ 4781]: --> [7:CONNECT]
...
...
Jun 19 17:13:54.59: [ 4781]: --> [2:OK]
Jun 19 17:13:54.59: [ 4781]: RECV send MCF (message confirmation)
Jun 19 17:13:54.59: [ 4781]: RECV FAX (000006585): from , page 2 in 0:26, INF, 3.85 line/mm, 2-D MR, 14400 bit/s
Jun 19 17:13:54.59: [ 4781]: RECV FAX (000006585): recvq/fax000006023.tif from , route to <unspecified>, 2 pages in 0:51
Jun 19 17:13:54.59: [ 4781]: <-- [9:AT+FRH=3\r]
Jun 19 17:13:55.77: [ 4781]: --> [7:CONNECT]
Jun 19 17:13:56.95: [ 4781]: --> [2:OK]
Jun 19 17:13:56.95: [ 4781]: RECV recv DCN (disconnect)
Jun 19 17:13:56.95: [ 4781]: RECV FAX: bin/faxrcvd "recvq/fax000006023.tif" "ttyIAX3" "000006585" ""
Jun 19 17:13:56.96: [ 4781]: RECV FAX: end
Jun 19 17:13:56.96: [ 4781]: SESSION END



I read many docs about $CIDMNAME, $CIDNUMBER, $CALLID1, $CALLID2 ... variables in FaxDispatch. Doesn't work!!
Also read about CallerIDPattern in config.ttyX file, but more cofused than before.
So, any help is appreciated in finding a solution to pass the called number (Hylafax has it, as you can see at the beginning of my log!!!!) to FaxDispatch script.


Thanks!
giuliano


____________________ 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*



Solved the problem. Of course, you must have CalledID service active from your phone company.

This was the real problem:
- My IAXModem was configured as class 1.0. That configuration was lacking many configuration lines made for iaxmodems, and contains other configuration misleading ones.
- I missed ${EXTEN} parameter in my incoming dialplan.


The problem is solved this way:
- Run faxaddmodem for your ttyIAXnn modem and choose class 1 modem when asked for
- In Asterisk, modify in your incoming dialplan the following dial command: "_123456789,1,Dial(IAX2/abc/${EXTEN},3)" where 123456789 is the telephone number given by your phone company and abc is the extension given by your pbx to the iaxmodem


On incoming call you shold see in your syslog something like this:

Jun 25 17:05:38 faxserver FaxGetty[29474]: ANSWER: Call ID 1 "<NONE>"
Jun 25 17:05:38 faxserver FaxGetty[29474]: ANSWER: Call ID 2 "CID withheld"
Jun 25 17:05:38 faxserver FaxGetty[29474]: ANSWER: Call ID 3 "<NONE>"
Jun 25 17:05:38 faxserver FaxGetty[29474]: ANSWER: Call ID 4 "123456789"
Jun 25 17:05:42 faxserver FaxGetty[29474]: ANSWER: FAX CONNECTION DEVICE '/dev/ttyIAXnn'
Jun 25 17:05:54 faxserver FaxGetty[29541]: RECV FAX (000007032): recvq/fax00000xxxx.tif from remotefaxname, route to <unspecified>, 1 pages in 0:12
Jun 25 17:05:54 faxserver FaxGetty[29540]: RECV FAX (000007032): from iax8, page 1 in 0:11, INF, 7.7 line/mm, 2-D MMR, 9600 bit/s
Jun 25 17:05:56 faxserver FaxGetty[29474]: RECV FAX: bin/faxrcvd "recvq/fax00000xxx.tif" "ttyIAXnn" "000007032" "" "<NONE>" "CID withheld" "<NONE>" "123456789"


with obvious substitutions.

Now you can also dispatch this way:

#! /bin/bash

case $CALLID4
in
*123456789) SENDTO=foo@xxxxxxx
;;
esac
That's all. Enjoy!
Giuliano



____________________ 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