One or the Other - FOP2 or Elastix GUI

  1. 8 years ago

    I am having an issue with the manager passwords, I can have either FOP2 working and the Extensions display goes blank or I can fix the extensions to display in Elastix (2.5) and FOP2 quits working. (bad auth)

    Note the 2 commented lines in manager.conf (--->>>>) below, changing the admin secret under [admin] section to password1 makes the FOP2 work, but extensions display in elastix goes blank, (see attached image),

    If I change the password to password2, the extensions inside Elastix start to display correctly but FOP2 quit working..

    "Failed to connect to asterisk - localhost:5038
    Error Message: Login Failed to Asterisk (bad auth) at localhost:5038. Check your manager credentials!"

    /usr/local/fop2/fop2.cfg

    [general]
    ; AMI definitions
    manager_host=localhost
    manager_port=5038
    manager_user=admin
    manager_secret=password1
    ;event_mask=agent,call,command,system,user,dialplan

    /etc/asterisk/manager.conf

    [general]
    enabled = yes
    port = 5038
    bindaddr = 0.0.0.0
    displayconnects=no ;only effects 1.6+

    ; --->>> CHANGE THIS [admin] secret TO password2 to GET the Extensions to display in elastix working <<---
    ; --->>> CHANGE THIS [admin] secret TO password1 to GET the FOP2 working display working <<--

    [admin]
    secret = password1
    deny=0.0.0.0/0.0.0.0
    permit=127.0.0.1/255.255.255.0
    read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
    write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
    writetimeout = 5000

    #include manager_additional.conf
    #include manager_custom.conf

    [fop2]
    secret = password1
    deny=0.0.0.0/0.0.0.0
    permit=127.0.0.1/255.255.255.0
    read = all
    write = all
    writetimeout = 1000
    eventfilter=!Event: RTCP*
    eventfilter=!Event: VarSet
    eventfilter=!Event: Cdr
    eventfilter=!Event: DTMF
    eventfilter=!Event: AGIExec
    eventfilter=!Event: ExtensionStatus
    eventfilter=!Event: ChannelUpdate
    eventfilter=!Event: ChallengeSent
    eventfilter=!Event: SuccessfulAuth

    #include manager_additional.conf
    #include manager_custom.conf

  2. admin

    2 Feb 2016 Administrator

    Why change the admin password in /etc/asterisk/manager.conf ? Our documentation never encourages nor tells you to do so. Doing it will break other tools most probably, as you already find out. You should create a special user for FOP2 as we describe in the online documentation,.. A specific user for FOP2 with its own password and set of permissions. So in fop2.cfg use

    manager_user=fop2
    manager_secret=whateverSecretYouSetInManager_custom.conf_for_the_fop2_user

    So, leave the admin user alone and work with the fop2 user. Be sure to also modify the correct configuration file. If you come from elastix rpm version of FOP2, configuration will default to /etc/asterisk/fop2 and not /usr/local/fop2

    The error you show is for the latest FOP2 version (not the one from elastix), so be sure that in /etc/sysconfig/fop2 you do not have -c /etc/asterisk/fop2 as a config parameter, so you can use the stock/default location of /usr/local/fop2 for configuration files and scripts.

or Sign Up to reply!