Summary:ASTERISK-15846: redirect to fax extension only after ring
Reporter:Sean Darcy (seandarcy)Labels:
Date Opened:2010-03-20 15:53:56Date Closed:2011-06-07 14:04:56
Versions:Frequency of
Description:Sending fax over SIP using app_fax to faxdetect=yes is set in sip.conf.


exten => fax,1,NoOp(Fax Detected)  ;; the fax line
exten => fax,n,GoTo(incoming-fax,s,1)
exten => fax,n,Hangup()            ;; the fax machine

exten =>s,1,Answer()
exten =>s,n,Wait(100)
exten =>s,n,NoOp(" callerid: "${CALLERID(all)})
exten =>s,n,Dial(${House_Phones},60)

But fax calls don't go to the fax extension until after one ring.
As you can see I've increased Wait to 100. But the same thing happens whether Wait is 4, 8 or 100. One ring on the House_Phones, then fax.

   -- Executing [s@incoming:1] Answer("SIP/side-sip-0000001d", "") in new stack
   -- Executing [s@incoming:2] Wait("SIP/side-sip-0000001d", "100") in new stack
   -- Executing [s@incoming:3] NoOp("SIP/side-sip-0000001d", "" callerid: ""asterisk" <asterisk>") in new stack
   -- Executing [s@incoming:4] Dial("SIP/side-sip-0000001d", "DAHDI/g0,60") in new stack
   -- Called g0
   -- DAHDI/1-1 is ringing
 == Redirecting 'SIP/side-sip-0000001d' to fax extension
   -- Hungup 'DAHDI/1-1'
 == Spawn extension (incoming, fax, 1) exited non-zero on 'SIP/side-sip-0000001d'
   -- Executing [fax@incoming:1] NoOp("SIP/side-sip-0000001d", "Fax Detected") in new stack
   -- Executing [fax@incoming:2] Goto("SIP/side-sip-0000001d", "incoming-fax,s,1") in new stack

Comments:By: Elazar Broad (ebroad) 2010-03-21 18:18:38

I had this same issue when testing res_fax/res_fax_spandsp. Setting Wait() to exactly 4.8 resolved the issue.

By: Sean Darcy (seandarcy) 2010-03-22 17:23:08

Wow, Wait(4.8) worked. How did you ever figure out 4.8? While it hardly resolves the issue, it does make it work for me.

Now if I can just get T38 faxing to work!

By: Sean Darcy (seandarcy) 2010-03-22 17:26:47

Actually I take it back. It worked only once. But now it doesn't:

-- Executing [s@incoming:2] Wait("SIP/side-sip-0000000c", "4.8") in new stack
   -- Executing [s@incoming:3] NoOp("SIP/side-sip-0000000c", "" callerid: ""asterisk" <asterisk>") in new stack
   -- Executing [s@incoming:4] Dial("SIP/side-sip-0000000c", "DAHDI/g0,60") in new stack
   -- Called g0
   -- DAHDI/1-1 is ringing
   -- DAHDI/1-1 is ringing
 == Redirecting 'SIP/side-sip-0000000c' to fax extension

By: Elazar Broad (ebroad) 2010-03-22 21:34:08

Can you post your config for side-sip(minus passwords etc. and including any parent templates)? Thanks!

By: Sean Darcy (seandarcy) 2010-03-25 09:23:06

From sip.conf on receiving side:

[side-sip]     ; receives and places calls
t38pt_udptl = yes

By: Elazar Broad (ebroad) 2010-03-26 00:57:41

As long as t38pt_udptl is enabled under [general], try setting it to no under the peer definition(chances are your provider is just passing T.38 through, not gateway'ing it)...

By: Sean Darcy (seandarcy) 2010-03-27 15:44:01

Left t38pt_udptl = yes in general and set t38pt_udptl = no in the peer definition. That didn't help the ring. And the fax mode became Audio.

Then t38pt_udptl = yes in general and commented out t38pt_udptl in side-sip peer definition. Again, no help with the ring, but fax mode was T38.

I did this on both sides. The SendFax machine is my office box. So I would have thought the office * server is the "provider".

By: Sean Darcy (seandarcy) 2010-04-21 08:13:03

This bug still has status "Feedback".  I thought I provided what was requested. Is something else wanted?

By: Leif Madsen (lmadsen) 2010-05-12 12:51:43

Sorry, changing status is a manual process. Some issues get lost :)

By: Russell Bryant (russell) 2010-05-18 15:13:56

Please try the latest version of 1.6.2, as I think there was a recent change that will fix this.  Enable the "transmit_silence" option in asterisk.conf and give it another try.

By: Paul Belanger (pabelanger) 2010-06-01 13:40:21

Suspending, Russell believe this was fixed in the most recent 1.6.2 branch.
Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.

Further information can be found at http://www.asterisk.org/developers/bug-guidelines