1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. Guest: We think the problem with locked threads from long message subjects has been resolved. Post a link here if you still see a problem.

two Asterisk PBX servers connected using an IAX2 trunk

Discussion in 'Help' started by gkrawiec, Apr 4, 2011.

  1. gkrawiec New Member

    I had two Asterisk PBX servers connected using an IAX2 trunk. I configured both sides using the instructions from "PBX in a Flash for Newbies - Connecting two Asterisk PBX servers using an IAX2 trunk" http://www.cadvision.com/blanchas/Asterisk/IAX2Trunk.html
    It worked beautifully. The machines had the following config
    machine A
    Code:
    PBX in a Flash Version   = 1.7.5.5                     
    FreePBX Version          = 2.8.0.4                     
    Running Asterisk Version = Asterisk 1.8.0              
    Asterisk Source Version  = 1.8.0                       
    Dahdi Source Version     = 2.4.0+2.4.0
    machine B
    Code:
    PBX in a Flash Version   = 1.7.5.5          
    FreePBX Version          = 2.8.0.4          
    Running Asterisk Version = Asterisk 1.8.2.1 
    Asterisk Source Version  = 1.8.2.1          
    Dahdi Source Version     = 2.4.0+2.4.0 

    Now I had to reinstall a machine A from scratch, so now
    it has
    Code:
    PBX in a Flash Version = 1.7.5.5
    FreePBX Version = 2.8.1.4
    Running Asterisk Version = Asterisk 1.8.3.2
    Asterisk Source Version = 1.8.3.2
    Dahdi Source Version = 2.4.1+2.4.1
    machine B stayed the same as it was originally.

    the settings are identical to what was in it before (i used freepbx backup and restore and it worked, ive checked manually, and all seems to be exactly the same).

    None-the-less I cant make calls between the servers anymore. The firewalls haven't changed, and the 2 servers still register with each other as can be seen here

    Code:
    Name/Username    Host                 Mask             Port          Status    
    Name/Username    Host                 Mask             Port          Status    
    SD2TJ-VPN/SdUse  192.168.3.99    (S)  255.255.255.255  4569 (T)      OK (597 ms)
    and
    Code:
    Name/Username    Host                 Mask             Port          Status    
    TJ2SD-VPN/TjUse  192.168.2.99    (S)  255.255.255.255  4569 (T)      OK (611 ms)
    but when i try to make a call, i get a all circuits are busy message...
    this is the CLI output calling from server A->B
    Code:
       -- Executing [s@macro-dialout-trunk:19] Dial("SIP/7036-00000011", "IAX2/SD2TJ-VPN/7601,300,tr") in new stack
        -- Called SD2TJ-VPN/7601
        -- Hungup 'IAX2/SD2TJ-VPN-17682'
      == Everyone is busy/congested at this time (1:0/0/1)
        -- Executing [s@macro-dialout-trunk:20] NoOp("SIP/7036-00000011", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 58") in new stack
        -- Executing [s@macro-dialout-trunk:21] Goto("SIP/7036-00000011", "s-CHANUNAVAIL,1") in new stack
        -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    
    the result is exactly the same when calling from B->A

    Any ideas? could this be because of the upgrade to 1.8.3.2 ?

    thanks,
    -gk
  2. atsak Guru

  3. darmock PIAF Developer

    actually in fpbx gui interface you can add it under tools Asterisk IAX settingsnear the bottom of the page you have to put both of the entries in.

    Be warned there does seem to be some problems with these settings in asterisk 1.8.x and using different versions of asterisk 1.8.x on different machines. I have one pair that uses older 1.8.x and one box is current. Couldn't make IAX2 work at all. Eventually I ran update source on the remote side and with both boxes the same version the iax2 trunk seems to work.

    Eventually I set up a simple sip trunk thru the vpn which proved to be adequate.


    Really since they "improved" security for iax2 it has not worked as reliably as before.


    Such is the price of progress.


    Tom
  4. gkrawiec New Member

    Thanks Tom and Atsak,
    Here is were we stand. I tried adding

    -----------
    calltokenoptional = 0.0.0.0/0.0.0.0
    maxcallnumbers = 16382

    to /etc/asterisk/iax_general_custom.conf
    -----------
    on both sides, but it made no difference. Since I used blanchae's spreadsheet to create the trunks, both sides already had calltokenrequired=no

    Finally, calling from server A to server B this is what i see on the log of B (the receiving side) (server A says chanel unavailable)

    --------------------------
    [2011-04-04 19:08:39] NOTICE[9676] chan_iax2.c: Rejected connect attempt from 192.168.2.99,
    requested/capability '0x400000000000000 (nothing)'/'0xffff7f0c03800000 (nothing)' incompatible
    with our capability '0xe (gsm|ulaw|alaw)'.
    -------------------------

    I added an
    allow=all

    on both sides for testing but i got the same error on both sides.
    Anything else I can try? suggestions?

    thanks,
    -gk
  5. atsak Guru

    Did you restart asterisk with amportal restart?
  6. gkrawiec New Member

    yes, i even rebooted the servers. It made no difference.
    -gk
  7. atsak Guru

    Try
    disallow=all
    followed by
    allow=ulaw&alaw&gsm

    See if that does anything?
  8. gkrawiec New Member

    I have already tried

    disallow=all
    allow=ulaw

    on both sides. It made no difference.
    I will try what you suggest when I get a chance to restart services on the machines.

    thanks,
    -gk
  9. angoyr Guru

    Hi,
    I feel your pain. We've all been there one time or another. But from reading all the posts in this thread, I feel the problem might be in your configuration. If the call is being rejected by server "B", it is safe to assume the you're not authenticating properly. Could you post your config. for one or both servers? I'm almost certain the problem would be solved from there.

    Robin

Share This Page