Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Elastix 3.0 MT

Elastix 3.0 MT

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 85 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    D
    dynamicit
    wrote on last edited by
    #1

    I'm an existing FOP2 (2.2.8) user (on an older version of Elastix) and I am testing out Elastix 3.0, because I have a need for Multi Tenant soon.

    I've installed a fresh Elastix MT and then installed FOP2:

    cd /usr/src
    wget http://www.fop2.com/download/centos64 -O fop2.tgz
    
    tar zxvf fop2.tgz
    cd fop2
    make install
    
    vi /etc/asterisk/manager.conf
    vi /usr/local/fop2/fop2.cfg
    vi  /etc/asterisk/sip.conf
    
    service asterisk restart
    service fop2 restart
    

    A few issues I am having and the solutions I've worked out:

    1.) I couldn't login to /fop2/admin unless I did define('USE_FREEPBX_AUTH',false);. I hacked secure-functions.php and added this at line 43:

    else if(($config_engine=='elastix_mt') && USE_FREEPBX_AUTH==true) {
    
    		$query="SELECT username AS login, 'admin' AS level, name AS name FROM ".$conf['DBNAME'].".acl_user WHERE username='%s' AND md5_password=md5('%s')";
    
            $res=$db->consulta($query,Array($login,$password));
    		print_r($res);
    
            if($db->num_rows($res)==1) {
                $row = $db->fetch_assoc($result);
                $row['ok']=1;
            } else {
                $row['error']=__('Invalid Credentials');
            }
    
        }
    

    (mainly checking if config_engine=='elastix_mt' and then changing the SQL query, including changing the password from sha1 to md5 as per the Elastix MT acl_user table.)

    Now I can login to the Manager (though obviously I need to fix the 'level' bit and probably UNION from 'acl_group'). It magically created all the fop2 tables in 'elxpbx' and the manager appears to be working.

    2.) At first I couldn't login to the panel with any extensions, but I worked out that I needed to use fop2/?context =mycontext.com and the contexts are stored in fop2contexts and the users are in fop2users.

    My questions:
    1.) Is FOP2 'supported' on Elastix MT?
    2.) If so, are there any 'gotchas' or anything to be aware of? (And is the above the best way to achieve auth to the manager?)
    3.) I assume I'd be best to use the #exec flag to roll my own configs, to pull extensions from Elastix and create matching FOP2 Users for each context?

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      You will have to test FOP2 in Elastix MT. It is supposed to work, but not really tested. The key part is the FOP2 Manager you already set your hands on, there is a functions-elastix.php file that will pull information out from ElastixMT tables and fill the appropiate data in the FOP2 Manager tables.. that is the best way to handle it. The latest FOP2 Manager has many improvements and some subtle changes for multi tenant systems, it is not yet released (version 1.0.7), but you can get it if you download version 2.29.02 beta for FOP2 that already includes the manager. AS for the way to log in, on multi tenant systems that do not use freepbx the usual way is to defined a user/pass in config.php and of course disabling use_freepbx_auth. Your modification is fine also if you want to reuse credentials for elastix in itself.. but take into account that the fop2 manager does not have user levels, the user has full privileges on all domains.

      Best regards,

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      Powered by NodeBB Contributors
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups