How To Play Audio To Callee When A Fax Is Detected ?

Home » Asterisk Users » How To Play Audio To Callee When A Fax Is Detected ?
Asterisk Users 1 Comment


Let say Alice and Bob both have a sip phone connected to the same asterisk
11 box. Alice has T.38 enabled softphone.

When Alice sends a fax to Bob extension, the following happens on my system:
– Bob phone starts to ring
– Bob answers
– asterisk sends the incoming call to appropriate fax extension
– Bob is hearing nothing at all: no tone, no sound at all.

I want to play an audio file back to Bob, something “Do not panic, you are receiving a fax’, before hanging up.

How can I do this ?

Playing with pre-dial handlers, I could enter the dialplan context I
dedicated to this feature but obviously, inside that context, applications like Wait or Playback fail with messages like:

— Executing [s@check-fax-reception:2] Playback(“SIP/7005-0000028f”,
“tt-weasels”) in new stack
[Aug 13 16:19:03] WARNING[24235][C-0000046f]: file.c:830
ast_readaudio_callback: Failed to write frame


— Executing [s@check-fax-reception:2] Wait(“SIP/7005-00000291”, “0.5”)
in new stack
== Spawn extension (check-fax-reception, s, 2) exited non-zero on
[Aug 13 16:36:32] NOTICE[24309][C-00000470]: app_stack.c:1031 gosub_run:
SIP/7005-00000291 Abnormal
‘Gosub(check-fax-reception,s,1(SIP/7012-00000290,7005))’ exit. Popping routine return locations.

My understanding is :
when a fax is detected and sent a fax extension, callee channel is in a state “close to termination” which is not compatible with many dialplan applications.

How can I work around this ?
Suggestions ?


One thought on - How To Play Audio To Callee When A Fax Is Detected ?