Asterisk Dahdi 1.6.2.23 iaxmodem

Home » Asterisk Users » Asterisk Dahdi 1.6.2.23 iaxmodem
Asterisk Users 12 Comments

Hello, I have anolog lines coming throug Dahdi to Asterisk Server, one of the anolog lines is used for fax line. I received fax fine without any problems using Iaxmodem with Hylafax Server. Outgoint fax is the problem, when IAXMODEM dial out using Dahdi channel, dahdi answers and start to dial the outside number however Iaxmodem thinks that dahdi is the remote fax machine and starts sending fax data eventually giving up.

Here is my dialplan in extensions.conf

[fax-out]
exten => _XXXXXXX,1,Set(__SIP_CODEC=alaw)
exten => _XXXXXXX,2,Dial(dahdi/g3)

If the remote machine answers within the first ring, the outgoing fax works fine, but if remote fax machine does not answer within the first ring, I get the fallowing erro: “no carrier found”

Hylfafax and Iaxmodem are working fine, my problem is between iaxmodem dialing and though dahdi channel.

Thanks,

12 thoughts on - Asterisk Dahdi 1.6.2.23 iaxmodem

  • Am 01.08.2012 17:15, schrieb motty.cruz:

    Hi,

    I think you should configure hylafax to listen some more on the line for a fax carrier. I’m not a hylafax expert, but there should be a configuration parameter how long hylafax should watch the line fo a fax carrier.

    best regards, Ruben

  • Hello Ruben, I belive the problem is not hylafax, is the way dahdi is configure, here is a part of the call log:

    — Accepting AUTHENTICATED call from xxx.xx.xx.xx:
    > requested format = ulaw,
    > requested prefs = (),
    > actual format = ulaw,
    > host prefs = (ulaw),
    > priority = mine
    — Executing [xxx1463@fax-out:1] Dial(“IAX2/503-2966”,
    “dahdi/g3/xxx1463”) in new stack
    — Called g3/xxx1463
    — DAHDI/4-1 answered IAX2/503-2966

    As you can see above dahdi answered and IAXmodem thinks is the remote fax machine answered. That

  • —– Original Message —–

    No, that simply means DAHDI successfully made the call out your POTS line, and Asterisk has ‘bridged’ the call between your IAXmodem peer and the DAHDI channel.

    You could be experiencing some digit loss when dialing, causing the calls to *sometimes* go through or not. Try adding a ‘ww’ to your dialstring to allow the POTS line to settle before dialing:

    Dial(DAHDI/g3/ww${EXTEN})

    –Tim

  • Thanks Tim, I tried your suggestion below the logs:

    — Accepting AUTHENTICATED call from xxx.xx.xx.xx:
    > requested format = ulaw,
    > requested prefs = (),
    > actual format = ulaw,
    > host prefs = (ulaw),
    > priority = mine
    — Executing [xxx1463@fax-out:1] Dial(“IAX2/503-7761”,
    “dahdi/g3/wwxxx1463”) in new stack
    — Called g3/wwxxx1463
    — DAHDI/4-1 answered IAX2/503-7761
    — Registered IAX2 ‘503’ (AUTHENTICATED) at xxx.xx.xx.xx:4570
    [Aug 1 09:04:59] NOTICE[3392]: chan_iax2.c:8486 update_registry:
    Restricting registration for peer ‘503’ to 300 seconds (requested 60)
    — Registered IAX2 ‘503’ (AUTHENTICATED) at xxx.xx.xx.xx:44145
    [Aug 1 09:05:03] NOTICE[3391]: chan_iax2.c:8486 update_registry:
    Restricting registration for peer ‘503’ to 300 seconds (requested 60)
    — Hungup ‘DAHDI/4-1’
    == Spawn extension (fax-out, xxx1463, 1) exited non-zero on
    ‘IAX2/503-7761’
    — Hungup ‘IAX2/503-7761’

    [root@drew home]# faxstat -s HylaFAX scheduler on host.xxxxx.com: Running Modem ttyIAX0 (+1.xxx.8626): Running and idle

    JID Pri S Owner Number Pages Dials TTS Status
    9 126 S root xxx1463 0:1 1:12 16:10 No carrier detected

    Any suggestions?

    Thanks a bunch!

    —–Original Message—

  • that is correct! The reason I think is because when Dahdi “answered”
    iaxmodem thinks is the remote fax machine that answered, but it reality it keeps ringing, if the remote fax machine answer within the first ring then iaxmodem connects but if not it does not detect a fax.

    Here is a sip extension dialing throught the same context.

    dxxx*CLI>
    == Using SIP RTP CoS mark 5
    == Using UDPTL CoS mark 5
    — Executing [xxx1463@fax-out:1] Dial(“SIP/507-00000000”,
    “dahdi/g3/wwxxx1463”) in new stack
    — Called g3/wwxxx1463
    — DAHDI/4-1 answered SIP/507-00000000
    — Hungup ‘DAHDI/4-1’

    Dahdi answered, but after dahdi answer it rang for 4 rings before remote fax answered, if I would be the iaxmodem I would had given up by then,

    Do you see my problem? Anybody else experienced same issue?

    Thanks,

    —–Original Message—

  • Sounds like DAHDI/4 is a FXO port. FXO ports are considered answered when dialing is completed.

    —–Original Message—

  • This is /etc/dahdi/system.conf

    fxsks=1-4
    fxsks=5-8
    echocanceller=mg2,1-8
    loadzone = us defaultzone=us

    And /etc/asterisk/chan_dahdi.conf language=en context

  • Yup, there is your problem. Tell hylafax to extend the amount of time before it times out.

    —–Original Message—

  • Sorry pushed send too fast

    Why both here? Its going to listen for a fax tone on outbound. Can you change to inbound

  • Thank you very much!
    I added the following line to /var/spool/hylafax/etc/config.ttyiax0

    ModemWaitTimeCmd: ATS70

    Thanks,
    —–Original Message—