Hi, I done a POC in one of our server in Asterisk 20, to detect fax , Receive Fax and SendFax.
All is working fine, but later I want to put that in to an actual server done everything same as POC server, the fax detection part is not working , Receiving part is working fine.
Steps I took
- Install spandsp module
- module load res_fax.so
module load res_fax_spandsp.so - pjsip.conf
[general]
faxdetect=yes
4. And in extension.conf
[from-twilio]
exten => fax,1,NoOp(Detected fax hureeeeee)
same => n,ReceiveFAX(/var/spool/asterisk/fax/${UNIQUEID}.tif)
exten => _+X.,1,Verbose(Call from ${CALLERID(num)} to ${EXTEN})
same => n,Answer()
same => n,Ringing()
same => n,Wait(5) ; Wait for 3 second before hanging up
same => n,MusicOnHold(default)
So this is working configuration I had in my POC server, done the same thing in my DEV server it is not working. I spend many hours going through source code of asterisk also for this.
Any help is very much appreciated.
-- Executing [+14143865483@from-twilio:1] Verbose("PJSIP/twilio-00000000", "Call from +12064832469 to +14143865483") in new stack
Call from +12064832469 to +14143865483
-- Executing [+14143865483@from-twilio:2] Answer("PJSIP/twilio-00000000", "") in new stack
> 0x7f79c0013d60 -- Strict RTP learning after remote address set to: 168.86.137.234:13936
-- Executing [+14143865483@from-twilio:3] Ringing("PJSIP/twilio-00000000", "") in new stack
-- Executing [+14143865483@from-twilio:4] Wait("PJSIP/twilio-00000000", "5") in new stack
> 0x7f79c0013d60 -- Strict RTP switching to RTP target address 168.86.137.234:13936 as source
== Redirecting 'PJSIP/twilio-00000000' to fax extension due to CNG detection
== Spawn extension (from-twilio, fax, 1) exited non-zero on 'PJSIP/twilio-00000000'
-- Executing [fax@from-twilio:1] NoOp("PJSIP/twilio-00000000", "Detected fax hureeeeee") in new stack
-- Executing [fax@from-twilio:2] ReceiveFAX("PJSIP/twilio-00000000", "/var/spool/asterisk/fax/1732282331.0.tif") in new stack
this is the log I am getting upon detection of fax.
Thank you in advance.