Welcome, Guest. Please login or register.
Did you miss your activation email?
July 30, 2010, 12:11:53 AM
Home Help Search Login Register
News: Version 3.0 of Noojee Fax has been released.
Order it now from here.

+  Noojee Telephony Solutions Forums
|-+  Noojee Fax
| |-+  Installation Support
| | |-+  DID problem
« previous next »
Pages: [1] Print
Author Topic: DID problem  (Read 338 times)
gaya
Newbie
*
Offline Offline

Posts: 3


« on: February 13, 2010, 01:32:39 AM »

Hi There,

when I'am receiving fax, noojee fax app can't see the DID, therefore it can not route the fax correctly based on DID.
DID is also missing in mysql FaxReceivedLog when using JdbcAuditingHandler for logging.
As you can see in noojeefax.log, CallerID is known, but DID is empty.
Do I have something wrong in my configuration?

/var/log/njfax/noojeefax.log:
Code:
12 Feb 2010 09:56:47,305 INFO Received fax from 0434301491
12 Feb 2010 09:56:47,348 INFO Routing fax CallerID=0434301491 DID=
12 Feb 2010 09:56:47,348 INFO no did routes
12 Feb 2010 09:56:47,348 INFO no caller id routes
12 Feb 2010 09:56:47,348 INFO Routing fax to trpis@gaya.sk
12 Feb 2010 09:56:48,747 INFO Archiving fax to zinkpower
12 Feb 2010 09:56:48,759 INFO finished routing

extension.conf:
Code:
[from-gts-pri]
;
; FAX lines
;
exten => _32411XX,1,Set(DID=043${EXTEN})
exten => _32411XX,n,Noop(${DID})
exten => _32411XX,n,Goto(Noojee-Fax-Receive,s,1)

#include noojeefax.conf

noojeefax.conf:
Code:
[Noojee-Fax-Receive]
exten => s,1,Wait(1)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,Set(FAXOPT(localstationid)=+421433241100)
exten => s,n,Set(FAXFILE=/var/spool/njfax/incoming/${UNIQUEID}.tif)
exten => s,n,Set(FAXOPT(minrate)=2400)
exten => s,n,Set(FAXOPT(maxrate)=14400)
exten => s,n,Wait(1)
exten => s,n,Set(DID=${DID}${FROM_DID})
exten => s,n,NoOp(${DID})
exten => s,n,ReceiveFax(${FAXFILE})
exten => s,n,NoOp(REMOTESTATIONID ${FAXOPT(remotestationid)})
exten => s,n,NoOp(FAXPAGES ${FAXOPT(pages)})
exten => s,n,NoOp(FAXBITRATE ${FAXOPT(rate)})
exten => s,n,NoOp(FAXRESOLUTION ${FAXOPT(resolution)})
exten => s,n,Hangup

exten => h,1,GotoIf($["${FAXOPT(status)}" = "SUCCESS"]?3)
exten => h,2,UserEvent(FaxPartial,exten: ${DID},callerId:'${callerid(num)}',remoteStationId:'${FAXOPT(remotestationid)}',localStationId:'${FAXOPT(localstationid)}',pagesTransferred:'${FAXOPT(pages)}',resolution:'${FAXOPT(resolution)}',transferRate:'${FAXOPT(rate)}',filename:'/${FAXFILE}')
exten => h,3,NoOp(FAXRESULT ${FAXOPT(status)})
exten => h,4,Hangup

asterisk -r (asterisk console, when receiving fax):
Code:
    -- Accepting call from '0434301491' to '3241101' on channel 0/5, span 1
    -- Executing [3241101@from-gts-pri:1] Set("DAHDI/5-1", "DID=0433241101") in new stack
    -- Executing [3241101@from-gts-pri:2] NoOp("DAHDI/5-1", "0433241101") in new stack
    -- Executing [3241101@from-gts-pri:3] Goto("DAHDI/5-1", "Noojee-Fax-Receive,s,1") in new stack
    -- Goto (Noojee-Fax-Receive,s,1)
    -- Executing [s@Noojee-Fax-Receive:1] Wait("DAHDI/5-1", "1") in new stack
[Feb 12 09:56:13] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
    -- Executing [s@Noojee-Fax-Receive:2] Answer("DAHDI/5-1", "") in new stack
    -- Executing [s@Noojee-Fax-Receive:3] Wait("DAHDI/5-1", "1") in new stack
    -- Executing [s@Noojee-Fax-Receive:4] Set("DAHDI/5-1", "FAXOPT(localstationid)=+421433241100") in new stack
    -- Executing [s@Noojee-Fax-Receive:5] Set("DAHDI/5-1", "FAXFILE=/var/spool/njfax/incoming/1265964972.13770.tif") in new stack
    -- Executing [s@Noojee-Fax-Receive:6] Set("DAHDI/5-1", "FAXOPT(minrate)=2400") in new stack
    -- Executing [s@Noojee-Fax-Receive:7] Set("DAHDI/5-1", "FAXOPT(maxrate)=14400") in new stack
    -- Executing [s@Noojee-Fax-Receive:8] Wait("DAHDI/5-1", "1") in new stack
    -- Executing [s@Noojee-Fax-Receive:9] Set("DAHDI/5-1", "DID=0433241101") in new stack
    -- Executing [s@Noojee-Fax-Receive:10] NoOp("DAHDI/5-1", "0433241101") in new stack
    -- Executing [s@Noojee-Fax-Receive:11] ReceiveFAX("DAHDI/5-1", "/var/spool/njfax/incoming/1265964972.13770.tif") in new stack
    -- Channel 'DAHDI/5-1' receiving FAX '/var/spool/njfax/incoming/1265964972.13770.tif'
    -- Channel 'DAHDI/5-1' FAX session '5' started
    -- DAHDI/1-1 is ringing
[Feb 12 09:56:17] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:19] NOTICE[1305]: chan_sip.c:20311 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 0433240947
[Feb 12 09:56:21] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:22] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
[Feb 12 09:56:23] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
[Feb 12 09:56:24] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
[Feb 12 09:56:25] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:26] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
[Feb 12 09:56:29] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:30] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
    -- DAHDI/1-1 answered SIP/0433240213-0000196f
[Feb 12 09:56:33] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:34] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
    -- Registered SIP '0433240243' at 80.242.32.72 port 5062
[Feb 12 09:56:37] NOTICE[1305]: chan_sip.c:17303 handle_response_peerpoke: Peer '0433240243' is now Reachable. (391ms / 2000ms)
[Feb 12 09:56:37] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:38] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
    -- FAX handle 0: [ 024.775695 ], entering CLOSING state
    -- FAX handle 0: [ 024.775718 ], entering CLOSING state
[Feb 12 09:56:41] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:42] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
    -- Channel 0/5, span 1 got hangup request, cause 16
[Feb 12 09:56:42] NOTICE[20520]: res_fax.c:906 generic_fax_exec: Channel 'DAHDI/5-1' did not return a frame; probably hung up.
[Feb 12 09:56:45] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '0433240238 <sip:0433240238@62.168.75.8>' failed for '80.242.33.36' - No matching peer found
[Feb 12 09:56:46] NOTICE[1305]: chan_sip.c:20479 handle_request_register: Registration from '<sip:62.168.75.8>' failed for '80.242.32.219' - No matching peer found
    -- Channel 'DAHDI/5-1' FAX session '5' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x98', transfer rate: '9600', remoteSID: '00421434301491'
  == Spawn extension (Noojee-Fax-Receive, s, 11) exited non-zero on 'DAHDI/5-1'
    -- Executing [h@Noojee-Fax-Receive:1] GotoIf("DAHDI/5-1", "1?3") in new stack
    -- Goto (Noojee-Fax-Receive,h,3)
    -- Executing [h@Noojee-Fax-Receive:3] NoOp("DAHDI/5-1", "FAXRESULT SUCCESS") in new stack
    -- Executing [h@Noojee-Fax-Receive:4] Hangup("DAHDI/5-1", "") in new stack
  == Spawn extension (Noojee-Fax-Receive, h, 4) exited non-zero on 'DAHDI/5-1'
    -- Hungup 'DAHDI/5-1'

Regards

Slavo Trpis
Gaya, s.r.o.
Slovakia
Logged
Brett Sutton
Asterisk IT Staff
Sr. Member
*****
Offline Offline

Posts: 404



« Reply #1 on: February 15, 2010, 01:14:46 PM »

Slavo,
you config looks fine and we can see no obvious reason why the DID isn't getting passed to NoojeeFax.

To facilitate diagnosing the problem can you please turn on the logging for asterisk java, re-send the fax and post the log output.

You can turn on the asterisk java logging by doing the following:
Code:
cd /opt/njfax/config

Edit log4j.xml and search for 'org.asteriskjava'.
You should see the following:
Code:
<logger name="org.asteriskjava"
                additivity="false">
                <level value="ERROR" />
                <appender-ref ref="STDOUT" />
                <appender-ref ref="FILE" />
        </logger>


Change the word 'ERROR' to be 'DEBUG' as follows:

Code:
<logger name="org.asteriskjava"
                additivity="false">
                <level value="DEBUG" />
                <appender-ref ref="STDOUT" />
                <appender-ref ref="FILE" />
        </logger>


Save the changes and resend the fax. (No need to restart NoojeeFax).

Once you have sent the log file please remember to revert the above changes as it can quickly fill up you log file if you system is busy.
Regards,
Brett
Logged
gaya
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: February 16, 2010, 01:08:58 AM »

Brett,

a fax was received at 15:34. Called ID was 0433241101.
noojeefax.log can be found here:

http://slavco.gaya.sk/noojeefax.log

(I'm using Asterisk 1.6.1.11)

Regards

Slavo
Logged
Brett Sutton
Asterisk IT Staff
Sr. Member
*****
Offline Offline

Posts: 404



« Reply #3 on: February 16, 2010, 06:05:49 AM »

I've pushed the problem to the dev team and will get back in a day or two with an answer.
Logged
gaya
Newbie
*
Offline Offline

Posts: 3


« Reply #4 on: February 19, 2010, 11:40:45 PM »

Brett, do we have something new?

Regards

Slavo
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!