Busy signal when sending fax

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#1
My elastix machine uses a Rhino card with two FXS modules. One FXS module is connected to a Brother MFC-9840CDW. I also completed the fax setup in elastix to send incoming faxes to an email.

Now, when I send an outgoing fax from the Brother printer, the printer starts dialing, but then the connection is always busy even if it isn't. I can even dial the same number manually from the printer and it connects without a problem.

The strange thing is that manual calls show up in the elastix call log, but automatic calls from the printer don't. Well, they do show up, but it seems that it never even tries dialing.

Code:
[Mar 18 15:37:32] VERBOSE[6546] logger.c: -- Starting simple switch on 'DAHDI/2-1'
[Mar 18 15:37:38] NOTICE[2621] chan_iax2.c: Restricting registration for peer '8000' to 60 seconds (requested 300)
[Mar 18 15:37:41] VERBOSE[6546] logger.c: -- Redirecting DAHDI/2-1 to fax extension
[Mar 18 15:37:41] DEBUG[6546] chan_dahdi.c: New owner for channel 2 is DAHDI/2-1
[Mar 18 15:37:41] DEBUG[6546] chan_dahdi.c: waitfordigit returned < 0...
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [fax@from-internal:1] Macro("DAHDI/2-1", "user-callerid|SKIPTTL|") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:1] Set("DAHDI/2-1", "AMPUSER=5001") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Set
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:2] GotoIf("DAHDI/2-1", "0?report") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:3] ExecIf("DAHDI/2-1", "1|Set|REALCALLERIDNUM=5001") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: ExecIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:4] Set("DAHDI/2-1", "AMPUSER=5001") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Set
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:5] Set("DAHDI/2-1", "AMPUSERCIDNAME=Line 2") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Set
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:6] GotoIf("DAHDI/2-1", "0?report") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:7] Set("DAHDI/2-1", "AMPUSERCID=5001") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Set
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:8] Set("DAHDI/2-1", "CALLERID(all)="Line 2" <5001>") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Set
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:9] ExecIf("DAHDI/2-1", "0|Set|CHANNEL(language)=") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: ExecIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:10] GotoIf("DAHDI/2-1", "1?continue") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Goto (macro-user-callerid,s,19)
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-user-callerid:19] NoOp("DAHDI/2-1", "Using CallerID "Line 2" <5001>") in new stack
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: Noop
[Mar 18 15:37:41] VERBOSE[6547] logger.c: == Auto fallthrough, channel 'DAHDI/2-1' status is 'UNKNOWN'
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [h@from-internal:1] Macro("DAHDI/2-1", "hangupcall") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-hangupcall:1] GotoIf("DAHDI/2-1", "1?skiprg") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Goto (macro-hangupcall,s,4)
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-hangupcall:4] GotoIf("DAHDI/2-1", "1?skipblkvm") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Goto (macro-hangupcall,s,7)
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-hangupcall:7] GotoIf("DAHDI/2-1", "1?theend") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Goto (macro-hangupcall,s,9)
[Mar 18 15:37:41] DEBUG[6547] app_macro.c: Executed application: GotoIf
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Executing [s@macro-hangupcall:9] Hangup("DAHDI/2-1", "") in new stack
[Mar 18 15:37:41] VERBOSE[6547] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'DAHDI/2-1' in macro 'hangupcall'
[Mar 18 15:37:41] VERBOSE[6547] logger.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'DAHDI/2-1'
[Mar 18 15:37:41] VERBOSE[6547] logger.c: -- Hungup 'DAHDI/2-1'
What am I missing here?

Thanks,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
For hard fax lines,you probably want faxdetect=no in your

/etc/asterisk/chan_dahdi.conf

file, also check that you have your line and phone jacks on the machine the right way around (if you have them both)
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#3
Thank you for getting back to me Dicko.

Well, I only use my printer to send a fax. Any incoming fax is sent to an internal email address.

So, I am guessing that I still need the faxdetect for that.

I also checked my cable to the printer once more, but it is plugged into LINE outlet.

Looking at my asterisk log I need to figure out why a manually dialed number from the printer shows up in the asterisk log where as a fax number entered into the printer to send a fax does not. It seems that elastix is doing some re-directing, but I don't understand how I can disable that.

Basically, I assume that the following line is causing elastix not to send my fax to an outside number:

Code:
[Mar 18 15:37:41] VERBOSE[6546] logger.c: -- Redirecting DAHDI/2-1 to fax extension
Does anybody know why this is happening? I really just want elastic to dial my fax number and to send the fax, but it seems that it is re-directing my dial attempt to an internal extension.

Thanks,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
The faxdetect options are referenced at:

http://www.voip-info.org/wiki/view/Asterisk+fax

so in your case maybe

faxdetect=incoming

is more appropriate. but if you use hylafax iaxmodem's (Elastix or Avantfax ) I suggest that direct delivery to a "fax" extension, physical or virtual, is probably a cleaner delivery method than running it through the asterisk fax detection code, thus the faxdetect=no


dicko
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#5
I hear you. However, the second line is used for voice as well.

I think I made some "progress". I found that the faxdetection for incoming faxes doesn't work either. It is set to faxdetect=incoming and FreePBX is set to DAHDI...

Furthermore I found that I also can't delete faxes from the fax visor in elastix. It gives an error message about being unable to delete a pdf file.

It seems that my whole installation is messed up when it comes to faxing...

Is it possible to use faxdetect and to simply forward the call to my fax machine? But I guess it would always be an issue if someone picks up the phone and it is a fax...

Not good. Too many problems and no answers... ;)

Maybe somebody has this working and can help out? I only send and receive faxes occasionally.

Thanks,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
Just like in the good old days just transfer a fax tone if you ever hear it to the fax machine..

faxdetect uses app_rxfax and app_txfax to send to the fax destination in general settings, If you use SIP then you will need nvfax to detect but if you installed nvfax and if you turn off the faxdetect in dahdi and turn on the faxdetect in the inbound route and send it to a functional fax machine "It just works" Personally I find Avantfax a real time saver here. YMMV and JM2CWAE

dicko
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#7
Thanks dicko.

I just installed the latest beta of AvantFax and it looks great except that I can't switch the language (it defaults to Spanish).

I also noticed that the only option I have for fax in inbound routes is DAHDI. SIP and NVFAX are greyed out. Furthermore, all options from the General section in FreePBX have disappeared in the latest version.

Is there a simple guide for elastix to send up a working incoming SIP fax? I feel that I should get that to work before I can think about sending a fax...

Best regards,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
You will need to install the nvfax stuff (plenty of posts here as to how to) I assume the SIP is the new Digium pay-as-you-go stuff.

Avantfax can be customiszed in many ways by editing

/var/www/html/avantfax/includes/local_config.php (it is self documented)

dicko
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#9
dicko,

I tried to install avantfax, but I ended up with asterisk no longer starting (dahdi failed to load). Therefore I upgraded to elastix 2.0.

In 2.0 I made some progress. I can now see that the system is forwarding the fax to extension 8000 (my iax fax modem extension configured in elastix), but then 8000 fails (see log below).

Code:
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Caller ID name is '0' number is '0'
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Methodology of ring is 'none'
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Added extension 8000 to extension map
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Extension 8000 cf is disabled
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Extension 8000 do not disturb is disabled
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: EXTENSION_STATE: 4 (UNAVAILABLE)
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Extension 8000 has ExtensionState: 4
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Checking CW and CFB status for extension 8000
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: dbset CALLTRACE/8000 to 0
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Filtered ARG3: 8000
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- <SIP/Localphone-00000001>AGI Script dialparties.agi completed, returning 0
[Mar 24 10:51:08] VERBOSE[4135] pbx.c: -- Executing [s@macro-dial:7] Dial("SIP/Localphone-00000001", "IAX2/8000,,trw") in new stack
[Mar 24 10:51:08] VERBOSE[4135] app_dial.c: -- Called 8000
[Mar 24 10:51:08] WARNING[3089] chan_iax2.c: Call rejected by 127.0.0.1: No matching codec support
[Mar 24 10:51:08] VERBOSE[4135] chan_iax2.c: -- Hungup 'IAX2/8000-251'
[Mar 24 10:51:08] VERBOSE[4135] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
Any ideas?

Thanks,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#10
Faxes can ONLY use g711a or g711u (alaw or ulaw) anything else will fail.

in the iax extension

disallow all
allow ulaw (or whatever you use where you are)

and make sure the same codec is enabled in your outbound sip or iax2 trunk (dahdi only does g711)
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#11
dicko,

I tried to install avantfax, but I ended up with asterisk no longer starting (dahdi failed to load). Therefore I upgraded to elastix 2.0.

In 2.0 I made some progress. I can now see that the system is forwarding the fax to extension 8000 (my iax fax modem extension configured in elastix), but then 8000 fails (see log below).

Code:
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Caller ID name is '0' number is '0'
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Methodology of ring is 'none'
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Added extension 8000 to extension map
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Extension 8000 cf is disabled
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Extension 8000 do not disturb is disabled
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: EXTENSION_STATE: 4 (UNAVAILABLE)
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: dialparties.agi: Extension 8000 has ExtensionState: 4
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Checking CW and CFB status for extension 8000
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: dbset CALLTRACE/8000 to 0
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- dialparties.agi: Filtered ARG3: 8000
[Mar 24 10:51:08] VERBOSE[4135] res_agi.c: -- <SIP/Localphone-00000001>AGI Script dialparties.agi completed, returning 0
[Mar 24 10:51:08] VERBOSE[4135] pbx.c: -- Executing [s@macro-dial:7] Dial("SIP/Localphone-00000001", "IAX2/8000,,trw") in new stack
[Mar 24 10:51:08] VERBOSE[4135] app_dial.c: -- Called 8000
[Mar 24 10:51:08] WARNING[3089] chan_iax2.c: Call rejected by 127.0.0.1: No matching codec support
[Mar 24 10:51:08] VERBOSE[4135] chan_iax2.c: -- Hungup 'IAX2/8000-251'
[Mar 24 10:51:08] VERBOSE[4135] app_dial.c: == Everyone is busy/congested at this time (1:0/0/1)
Any ideas?

Thanks,
Jens
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#12
Faxes can ONLY use g711a or g711u (alaw or ulaw) anything else will fail.

in the iax extension

disallow all
allow ulaw (or whatever you use where you are)

and make sure the same codec is enabled in your outbound sip or iax2 trunk (dahdi only does g711)

(TAG, Your "It")

p.s.

There is no way Avantfax can screw your dahdi, it must have been something else.
 

jstraten

Joined
Jan 11, 2010
Messages
35
Likes
0
Points
0
#13
Success!!! Thanks dicko! I don't think I would have been able to get this far without you.

I limited the codecs for the IAX extension to ulaw&alaw and could finally receive my first fax. :)

That's a big step forward. Now, I am hoping that I can also finally send a fax. My first attempt has failed, but I keep trying and checking the logs.

Hopefully, I can finally fix sending as well. According to JHylaFax the fax modem (8000) doesn't have a dial tone...

Cheers,
Jens
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,561
Latest member
marouen
Top