Incoming faxes from a PRI

I’m testing our new PRI with inbound faxes, but I’m having a problem. It seems as though asterisk detects the fax and wants to direct the fax to the correct place, but it never gets around to it.

Here is the dialplan snippet:

[code][incoming-ld]
exten => 8665789740,1,Answer()
exten => 8665789740,2,Set(TIMEOUT(response)=10)
exten => 8665789740,3,Background(edps-holiday)

exten => fax,1,Goto(internal-extensions,900,1)

[internal-extensions]
exten => 900,1,Dial(IAX2/iaxmodem7,10,r)
exten => 900,2,Goto(901,1)
exten => 900,102,Goto(901,1)

exten => 901,1,Dial(IAX2/iaxmodem6,10,r)
exten => 901,2,Goto(900,1)
exten => 901,102,Goto(900,1)
[/code]

When I call in, this is what I see:

Accepting call from '3306028368' to '8665789740' on channel 0/1, span 2 -- Executing Answer("Zap/5-1", "") in new stack -- Executing Set("Zap/5-1", "TIMEOUT(response)=10") in new stack -- Response timeout set to 10 -- Executing BackGround("Zap/5-1", "edps-holiday") in new stack -- Redirecting Zap/5-1 to fax extension May 3 17:49:02 WARNING[326]: pbx.c:2412 __ast_pbx_run: Timeout, but no rule 't' in context 'incoming-ld' -- Hungup 'Zap/5-1'

The key line being “Redirecting Zap/5-1 to fax extension”, but nothing happens.

Any ideas?

If I just have the line dial the fax extension directly, it works perfectly.

just some guesses, as I haven’t tried it like you are doing. You may want to see what happens if you do add an i extension, (NooP) and see if that helps it get passed that and find its way to the fax extension. If not, maybe you need to put a wait() in before the Backgroud(). Or maybe anything passed the Background() command. Just seems like it is dropping into the background() application, and when it comes out it gets confused - so maybe just getting anything into priority 3 as well as putting in an i extension might let it find its way tot he fax extension and go process.

Again - I’m thinking out loud and guessing - but just some things to try?

p

Try changing the line

exten => fax,1,Goto(internal-extensions,900,1)

to

exten => fax,1,Dial(900@internal-extensions)

does this helps ?

OW we need to trace with NoOp lines, like patrick meantioned already, so we can see were the call get stucked.

The “funny” thing is, the timeout is in the first context, not the fax context (900), so the Goto isnt executed !

But try my above line first.
(The “trick” here is, that the initial thread for the “fax” extension is “duplicated” (new thread) by another dial command, so if there are limitations on the fax-extension internally, we work around them by creating a new call (thread)).

Thanks for the help… I’m not sure why I was having a problem, but I littered the plan with NoOps and added the i,t extensions and it worked fine. Thanks for you help.

Final dialplan:

[code]exten => 8665789740,1,Answer()
exten => 8665789740,2,NoOp(“Setting Timeout”)
exten => 8665789740,3,Set(TIMEOUT(response)=10)
exten => 8665789740,4,NoOp(“Running Background”)
exten => 8665789740,5,Background(edps-day)

exten => i,1,NoOp(“Invalid”)
exten => i,2,GoTo(8665789740,2)

exten => t,1,NoOp(“Timeout”)
exten => t,2,GoTo(8665789740,2)

exten => fax,1,NoOp(“Fax”)
exten => fax,2,GoTo(internal-extensions,903,1)[/code]

stack_,

would you mind sharing what versions of everything you are running where you have inbound faxes working over your PRI? i had inbound fax working with a TDM400 FXO and then built a new server with a Sangoma PRI card and loaded all the latest source code. when i try to start *, it fails with the following:

[app_txfax.so]May 12 15:03:51 WARNING[6746]: loader.c:325 __load_resource: /usr/lib/asterisk/modules/app_txfax.so: undefined symbol: t30_get_far_ident
May 12 15:03:51 WARNING[6746]: loader.c:554 load_modules: Loading module app_txfax.so failed!!

Ouch … error while writing audio data: : Broken pipe

thanks!