Detect fax and hangup asterisk 13

Asterisk 13
Centos 7

I know to manipulate fax for Asterisk 13 you need spandsp module but I dont want to do anything with fax.
I want to be able to only detect it and hangup.

Please correct me if im wrong but as long as I have
fax_detect=yes
in pjsip under my endpoint all fax should redirect to
exten => fax

currently what I’m trying to do is AMI Originate to a Phone Number if detect fax hangup
but when I AMI Originate
context=‘support’
exten =‘5555’
phone=‘1234…’
lets say I call a fax machine it doesnt go to exten fax but still goes to exten 5555

is this possible?

[support]

exten => fax,1,NoOp(Incoming fax)
same => n,Hangup()

exten => 5555,1,NoOp(Inbound from support)
same => …
same => …

Probably you have to answer the call before send a call to exten 5555. This action should allow Asterisk to detect whether is this fax or no.

I think the problem is more likely that the call is answered before the dialplan gets control. You may be able to use a local channel as you only want to hang up. It is the local channel, not the callee that will get sent to fax.

How do I answer the call? When I Originate it via AMI it needs an Context, Exten and Priority.

Could you elaborate a little more please. I dont understand. Could you provide an example? Please and Thank you

https://wiki.asterisk.org/wiki/display/AST/Using+Callfiles+and+Local+Channels

1 Like

Im still at a Lost where does local channel come into play?

AMI – > 808XXXXXXX --> Dial Plan Check (Fax/Human) --> …

I prefer to use AMI instead of Call Files as AMI is more robust

I want to be able to detect Fax and Send to hangup else Send to support agent