WaitForTone and Fax detection

Hi everyone
I am new to Asterisk so please bear with me.
I have been trying to detect a fax tone on outbound calls using WaitForTone application when call connects but somehow it always fails with the status TIMEOUT. The numbers I am dialing are Fax enabled numbers and play the proper fax tone. I have verified this using the call recording.

Here is my simple dialplan and I am using AMI to call the number through PJSIP trunk and when it connects the control goes to fax-test context.
I currently use Asterisk 18

[fax-test]
exten => s,1,Noop(Fax detection)
same => n,WaitForTone(1100,250,10) ; detect 1100 Hz
same => n,Noop(${WAITFORTONESTATUS})
same => n,HangUp()

I will appreciate if someone can help me figure out why I am unable to detect fax tone using the above dialplan.

Thanks

Fax answer is the 2100Hz echo suppressor disable tone, not the calling tone.

Also make sure you are using the right G.711 variant, for your country, as the only codec on path, or something better (I think originate will start as slin, which is better, but the physical channel will downgrade this.

Also, although the documentation isn’t entirely clear about the third parameters interaction with the second, I cannot see any reason for using anything other than 1, here.

1 Like

Thanks for your reply @david551. My bad, you are right, I should look to detect 2100 Hz and not the 1100 Hz tone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.