<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/13/2012 03:20 AM, Olivier wrote:<br>
    </div>
    <blockquote
cite="mid:CAPeT9jgZa=_tZi-HTuMRiV4Cx3k=zQ7Fku7FrnbYBybV7tmnew@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">2012/8/31 Jeff LaCoursiere <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:jeff@sunfone.com" target="_blank">jeff@sunfone.com</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div class="HOEnZb">
            <div class="h5">&gt; -----Original Message-----<br>
              &gt; From: <a moz-do-not-send="true"
                href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
              &gt; [mailto:<a moz-do-not-send="true"
                href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>]
              On Behalf Of Jeff<br>
              &gt; LaCoursiere<br>
              &gt; Sent: Tuesday, August 28, 2012 3:24 PM<br>
              &gt; To: <a moz-do-not-send="true"
                href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>
              &gt; Subject: [asterisk-users] FAX detection in chan_dahdi
              1.8.15<br>
              &gt;<br>
              &gt; Hi,<br>
              &gt;<br>
              &gt; I recently replaced a site that was using
              1.4.[mumble] with<br>
              &gt; hylafax/iaxmodem. &nbsp;They have an RBS T1 and were using
              about half of their 50<br>
              &gt; DID numbers for "fax to email". &nbsp;This all broke with
              the new system :(<br>
              &gt;<br>
              &gt; The original chan_dahdi.conf had no mention of
              "faxdetect", so I assume it<br>
              &gt; was operating with whatever is the default. &nbsp;Off?<br>
              &gt;<br>
              &gt; The new box originally had "faxdetect=no", and I
              found that all my test<br>
              &gt; faxes failed with negotiation errors. &nbsp;When I finally
              tried<br>
              &gt; "faxdetect=incoming" test faxes from another machine
              running hylafax went<br>
              &gt; through fine, and I thought I was done.<br>
              &gt;<br>
              &gt; The following week the customer reported that inbound
              faxes weren't working.<br>
              &gt; When I looked at the log, I saw lots of these:<br>
              &gt;<br>
              &gt; chan_dahdi.c: &nbsp; &nbsp; -- Redirecting DAHDI/24-1 to fax
              extension<br>
              &gt;<br>
              &gt; Which in my FreePBX setup eventually goes to a "no
              service" message and<br>
              &gt; hangs up. &nbsp;I've never defined a "fax" extension and
              don't really know what<br>
              &gt; that is about. &nbsp;Turns out that any fax machine that
              calls ends up following<br>
              &gt; this path. &nbsp;If my other hylafax server calls, it
              follows the normal path and<br>
              &gt; gets answered by my pool of iaxmodems. I don't really
              understand the<br>
              &gt; difference between the two types of calls, first of
              all.<br>
              &gt;<br>
              &gt; So it seems from this experience and a recent thread
              on -users that enabling<br>
              &gt; faxdetection in chan_dahdi sets up some additional
              buffering that at least<br>
              &gt; in my case, in 1.8, seems to be required (without it
              all inbound faxes fail<br>
              &gt; from my hylafax server with negotiation problems).<br>
              &gt; Unfortunately for me, this also seems to bypass
              normal DID handling and<br>
              &gt; sends calls to an undefined "fax extension".<br>
              &gt;<br>
              &gt; Can anyone shed some light?<br>
              &gt;<br>
              &gt; Thanks,<br>
              &gt;<br>
              &gt; j<br>
              &gt;<br>
            </div>
          </div>
          <div class="im">&gt; On Tue, 2012-08-28 at 15:28 -0500, Danny
            Nicholas wrote:<br>
            &gt; IIRC correctly this is sort of like the "s" extension;
            you set up your<br>
            fax<br>
            &gt; handler in [default,fax,1]. &nbsp;Not sure how that is done
            in FreePBX.<br>
            &gt;<br>
            &gt;<br>
            <br>
          </div>
          I've managed to hack a fix for this... in chan_dahdi.c I found
          two<br>
          places where an "async goto" happens right after the message<br>
          "Redirecting to fax extension". &nbsp;I simply commented it out in
          both<br>
          places.<br>
          <br>
          While looking a the source I noticed that an attempt is made
          to create a<br>
          new channel variable "FAXEXTEN" with a comment "save the DID
          number<br>
          before sending to the fax extension". &nbsp;I created a "fax"
          context in<br>
          extensions.conf and tried to use ${FAXEXTEN} to properly route
          my<br>
          inbound fax to email calls, but it turns out that it is just
          set to "s",<br>
          which isn't useful at all. &nbsp;I spent some time trying to figure
          out where<br>
          in the channel structure the actual DID information exists, as
          properly<br>
          setting the "FAXEXTEN" variable is arguably the right "fix"
          for my<br>
          problem. &nbsp;But I'm just not familiar enough with the internals
          :( I'm<br>
          surprised others haven't had this issue...<br>
          <br>
          Anyway commenting out the redirection did the trick for me.<br>
          <br>
          Cheers,<br>
          <div class="HOEnZb">
            <div class="h5"><br>
              j<br>
              <br>
            </div>
          </div>
        </blockquote>
        <div><br>
          Which Freepbx version are you using ?<br>
          Have you installed Freepbx's "Fax Configuration" module ?<br>
          <br>
          Are you trying to attach fax-to-email service to incoming DIDs
          or to SIP endpoints ?<br>
          <br>
          <br>
        </div>
      </div>
    </blockquote>
    FreePBX 2.10<br>
    <br>
    Originally, just because I usually do an install and let FreePBX
    load all available modules, it did load that module.&nbsp; Original
    advice was to remove that module, which had no effect on my
    problem.&nbsp; It is removed now anyway.<br>
    <br>
    The intention is individual DIDs go to specific fax email
    addresses.&nbsp; I saw your explanation for what you are trying to
    accomplish, and it sounds interesting.&nbsp; Curious to see if you get it
    working.<br>
    <br>
    Cheers,<br>
    <br>
    j<br>
  </body>
</html>