IAX2 Trunks not working until I Apply Config.

Discussion in 'General' started by pinkertonfloyd, May 4, 2010.

  1. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    Upgraded from 1.5-2 to 1.6.2-1 over the weekend.

    Ever since the two IAX trunks I have do NOT work until I "Apply Configuration" (I can simply "edit" a extension without changing anything, then applying... and bam, the IAX trunks come up.

    I tried adding preload => chan_iax2.so to the modiles.conf... and no-go... still doesn't register the IAX trunks until I apply the configuration.

    As soon as I restart the system... the trunks stop until an apply is done.
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    check your calltoken settings, they have been tightened between the two versions
     
  3. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    Here's what I have, I think I've address the calltokens correctly.
    (I have two companies on our system, both use voip.ms, this has been running on 1.5 for about a year without a hitch).

    [voipms]
    disallow=all
    type=friend
    username=xxxxxxxxx
    secret=xxxxxxxx
    context=from-trunk
    host=losangeles.voip.ms
    allow=g729
    insecure=port,invite
    requirecalltoken=no
    jitterbuffer=no

    [voipms-second]
    disallow=all
    type=friend
    username=xxxxxxxx
    secret=xxxxxxxxxx
    context=from-trunk
    host=losangeles.voip.ms
    nat=yes
    allow=g729
    jitterbuffer=no
    insecure=port,invite
    requirecalltoken=no

    In iax_general_custom I have:

    calltokenoptional = 0.0.0.0/0.0.0.0
    maxcallnumbers = 16382
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
  5. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    here's my setting with voip.ms iax trunk

    type=friend
    username=123456789
    secret=mysecret
    context=from-trunk-iax2-voipms
    host=houston.voip.ms
    disallow=all
    allow=ulaw&alaw&g729
    requirecalltoken=auto
    trunk=yes
    encryption=aes128
    auth=md5
    qualify=no


    the encryption and auth are not yet supported by voipms, but it doesn't hurt until they do.

    register: 12345678:mysecret@houston.voip.ms


    in iax_general_custom.conf I have

    calltokenoptional = 127.0.0.1/255.255.255.0 (to let the fax working)
    maxcallnumbers = 16
     
  6. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    I'll give these a shot, I'll have to wait until after business hours. As once I do apply the config, the system is up and is stable.

    Could someone post their modules.conf? I had to edit it to get the queues to work (same issue, didn't work until I applied the config, although I found a fix for that on another thread... which is why I'm wondering is it's a module that not loading on startup, but is on reload (which occurs when the configuration is applied). Anyhow, I know that modules.conf is very sensitive to the order of items, so I'd like to double check that.

    Since the IAX trunks do work, I'm thinking that the trunk config should be fine (or shouldn't they not work at all?).

    I'm trying to remember why I upgraded to 1.6... 1.5 was working without a issue for over a year!
     
  7. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    Here's my current modules.conf

    ;
    ; Asterisk configuration file
    ;
    ; Module Loader configuration file
    ;

    [modules]
    noload => chan_woomera.so
    preload => chan_local.so
    preload => pbx_config.so
    preload => chan_iax2.so
    autoload=yes
    ;
    ; If you want, load the GTK console right away.
    ; Don't load the KDE console since
    ; it's not as sophisticated right now.
    ;
    noload => pbx_gtkconsole.so
    ;load => pbx_gtkconsole.so
    noload => pbx_kdeconsole.so
    ;
    ; Intercom application is obsoleted by
    ; chan_oss. Don't load it.
    ;
    noload => app_intercom.so
    ;
    ; DON'T load the chan_modem.so, as they are obsolete in * 1.2

    noload => chan_modem.so
    noload => chan_modem_aopen.so
    noload => chan_modem_bestdata.so
    noload => chan_modem_i4l.so

    ; Trunkisavail is a broken module supplied by Trixbox
    noload => app_trunkisavail.so

    ; Ensure that format_* modules are loaded before res_musiconhold
    ;load => format_ogg_vorbis.so
    load => format_wav.so
    load => format_pcm.so
    load => format_au.so
    ; This isn't part of 'asterisk' iteslf, it's part of asterisk-addons. If this isn't
    ; installed, asterisk will fail to start. But it does need to go here for native MOH
    ; to work using mp3's.
    load => format_mp3.so
    load => res_musiconhold.so
    ;
    ; Load either OSS or ALSA, not both
    ; By default, load OSS only (automatically) and do not load ALSA
    ;
    noload => chan_alsa.so
    noload => chan_oss.so
    ;
    ; Module names listed in "global" section will have symbols globally
    ; exported to modules loaded after them.
    ;
    noload => app_directory_odbcstorage.so
    noload => app_voicemail_odbcstorage.so

    [global]
     
  8. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    Still havent been able to get this resolved, had to put in a "kludge" fix by adding a

    sleep 10
    amportal restart

    on bootup, which does the trick. Not sure if something is not fully loading in time and failing (although I can't find anything like that in the logs). But waiting 10 seconds and then restarting asterisk seems to do the trick.
     
  9. pinkertonfloyd

    Joined:
    Apr 2, 2010
    Messages:
    13
    Likes Received:
    0
    Well... I lied... there is another error:

    Jun 22 09:44:38 WARNING [3242] loader.c:

    Error loading module 'chan_iax2.so': /usr/lib/asterisk/modules/chan_iax2.so: undefined symbol: ast_parking_ext

    Jun 22 09:44:38 WARNING [3242] loader.c:

    Module 'chan_iax2.so' could not be loaded.


    From what I read, that means I need to add load => res_features.so
    to modules conf, right?
     
  10. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    watch the order of loading and preloading modules, chan_iax2 should not normally need to be preloaded it "depends" on things but doesn't provide any "dependencies", the autoload should cover it.

    dicko
     

Share This Page