OZPHB

Member

Last active 4 weeks ago

  1. 4 weeks ago
    Sat Nov 17 03:06:25 2018
    OZPHB started the conversation Freepbx Conference Members Not Detected.

    Hi Nicolas.
    New installation of FOP2, ver 2.31.20, installation is on Centos 7 using Freepbx 14.0.5.1, asterisk version 13.23.1
    i used the 'automagic' installation method: wget -O - http://download.fop2.com/install_fop2.sh | bash

    All seems working except that the conferences (I am using the Freepbx Conference module) do not show who is in the conference, and do not detect when the conference is over. The button shows 'in use' colour, but no members.

    When everyone hangs up, the button stays lit. I have to restart fop2 to clear the 'in use' colour on the button.

    Can you assist? Thanks in advance.

  2. last year
    Wed Sep 6 13:08:42 2017

    I took a long time to get around to this, but I have had a play, and I think I know what is going on. I have set up a workaround, but I also think I know what is needed for a proper fix.

    THE PROBLEM
    When a user dialled from an extension (3 digits) the lookup would often incorrectly return a name and picture associated with a different address book entry. This happened when the 3 digit extension number appeared anywhere within the longer phone number. For example, calling extension 650, would select entry for user with phone number 12346501

    The issue is that the logic of this select statement did not work:

    $res = $db->consulta("SELECT concat(firstname,' ',lastname) AS name,company,picture FROM visual_phonebook WHERE (phone1 LIKE '%%%s'OR phone2 LIKE '%%%s') AND context='%s' ORDER BY LENGTH(CONCAT(phone1,phone2)) LIMIT 1",$clid_significant,$clid_significant,$context);

    The problem is that the LIKE statement was finding all records containing the callerid phone number ANYWHERE within it. So, when the calling extension is 650, it matched on ALL of 1236504, 1234650, 650, 16501245. The ORDER BY statement was then supposed to select the shortest match (which should have been the extension). However, because there are two phone fields, an attempt was made to identify the record with the shortest match by concatenating both numbers in the record, and comparing that length with the concatenated numbers of the other matching records.
    The LIMIT 1 statement then picked the first record.

    This does not work because there is no certainty that the total length of both phone number fields will be shorter for the correct entry.

    Consider this mini-database:
    Calling Extension is 650.
    User A Phone1: 650 Phone2: 12345678
    User B Phone1: 12650348 Phone2: nul

    Both of these records are selected by the above statement. They are then compared by adding the two phone fields, and picking the shortest COMBINED length:
    User A: 3+8=11
    User B: 8+0=8

    User B record is shorter, so it is selected. The correct record is User A.

    MY WORKAROUND
    In Australia, all phone numbers are 10 digits (including area code) – even mobile numbers.
    So, I have set the comparison to EQUALS (rather than LIKE) so that I only get one valid match. I have removed the LENGTH comparison altogether.

    $res = $db->consulta("SELECT concat(firstname,' ',lastname) AS name,company,picture FROM visual_phonebook WHERE (phone1 = '%s' OR phone2 = '%s') AND context='%s' LIMIT 1",$clid_significant,$clid_significant,$context);

    This works, except that if the visual phone book entry does not include the area code, or includes spaces, the record is not found.

    FIX REQUIRED
    • We need to be able to strip the spaces out of the visual phonebook phone number entries when comparing;
    • We need to be able to perform a routine on the visual phonebook phone number entries to only compare the significant digits – in the same way that the script does with the caller id number:

    	$significant    = 10;
    	$startoffset    = 0;
    	if($largo > $significant) {
            $startoffset=$largo-$significant;
        }
    
        $clid_significant = substr( $decodedClidnum, $startoffset );

    When comparing the CLID with the visual phone book entries after stripping spaces and looking at the same significant digits, the EQUALS comparison operator will then work as desired.

    I am not sufficiently expert to figure out how to do this bit. Hopefully what I have said helps, and the proper fix will be simple for you :)

  3. Wed May 17 03:18:36 2017

    Hi Nikolas,
    I found this thread because I am experiencing similar issues.

    Forgot to add, you can also add your own extensions in the phonebook, so they will match instead of the other customers. If you have an entry with a phone 52 it will have precedence over 3928237352

    This does not appear to be the case. My extensions are 3 digits long. When there is an address book entry for that extension, say, 215, and there is another address book entry for someone else , say 55334215, the second (longer) entry is matched, not the shorter (more precisely matching) entry.

    Running FOP2 version 2.31.05 on FreePBX 13.0.191.11. Any thoughts?

  4. 4 years ago
    Sun Sep 28 09:58:11 2014

    I am confused now too.

    I have my setup so that, in the FOP2 User setup, the "Secret" field is left blank. The information popup for this option says: "The secret to login to fop2. If none specified the voicemail secret will be used."

    I have tested this, and if I change my voicemail password, the NEW password is what I have to use to log into FOP2. That is, I use my current voicemail password, whatever it is.

    My only caveat is that I am running FOP2 2.2.7. However, this has been the behaviour since I first started using FOP2, which was a few years and a few versions earlier still.

  5. Sun Sep 28 06:51:01 2014
    OZPHB posted in IPv6 Support?.

    Hi.

    Do I need to change any configs to allow the use of FOP2 connectivity using IPV6?

    I am running Freepbx 2.11.0.38 on a CentOS 64 vm. I am running FOP2 v 2.2.7

    I have recently enabled IPv6 on the asterisk server (dual stack), and can browse the Freepbx asterisk web interface via IPv6.

    Any attempts to connect to FOP2 time out. I can log into the FOP2 server via ipv4 as normal.

    In order to IPV6 enable the SIP server, I had to change the asterisk HTTP bind address from "0.0.0.0" (any IPv4 address) to "::" (any IPv4 or any IPv6 address).

    Looking at netstat, I think FOP2 is still only listening on IPv4 addresses:

    netstat -lnp | grep 4445
    tcp        0      0 0.0.0.0:4445                0.0.0.0:*                   LIST                   EN      30108/fop2_server

    Does FOP2 allow connection via IPv6? How do I enable it?

  6. Tue Mar 11 02:18:47 2014
    OZPHB posted in Recordings.

    A re-install with the latest version seems to have fixed all issues.

    Thanks for your help.

  7. Tue Mar 11 02:17:34 2014
    OZPHB posted in DND and BLF using FOP2 2.27.

    A re-install with the latest version seems to have fixed all issues (including my recording issues). I must've just been unlucky to have downloaded the new 2.27 version too early.

    I really like the plug-in setup - great for control and visibility of options.

    Thanks for your help.

    One tiny point, for your next fix - the drop down box of permissions 'Quick Pick' does not include the 'presencemanager' permission - it has to be manually typed in.

  8. Sun Mar 9 22:53:29 2014
    OZPHB posted in DND and BLF using FOP2 2.27.

    The PresenceDND plugin in FOP 2.27 was updated to support BLF, you should update the plugin

    sorry, how do I do that? :oops:

    While I said that I 'upgraded' to FOP2 2.27 in my post, it would be more accurate to say that I did a fresh install of FOP2 on a fresh install of FreePBX/Asterisk/Centos 6.5 (64 bit), and then re-created my setup on the new system, then stopped using my old system.... ie - as far as the machine I am using now is concerned, it was a fresh install. Only the user browsers will have 'old' content, and I have Ctrl-R as hard as I can go with all affected browsers before reporting the issues.

    I note that I can do the 'old way'.

    Or you can run the script generate_override_context.pl -w --force to generate the old style of dialplan configs for FreePBX.

    I would prefer to go with the 'new way' if I can get it working - to maximise compatibility with any future work you do on the panel.

    Lastly, while it all appears to be working well, I do get some errors when I run --test

    [root@pbx fop2]# ./fop2_server --test
    unable to initialize libusb: -99
    Flash Operator Panel 2 - Valid License (7)

    /usr/local/fop2/autoconfig-buttons-freepbx.sh: line 17: [: too many arguments
    Connection to manager OK!
    [root@pbx fop2]#

    I did the initial install probably 2 months ago - have there been changes to the package (with same build number) since that time?

    Not sure if this is relevant, but I note I am having issues with recordings as well :
    [url:1urjqkyg]http://forum.fop2.com/esotalk/index.php/1160&start=10[/url:1urjqkyg]

    so is there something I can/should do to re-fresh my install?

    Thanks for your help.

  9. Sun Mar 9 05:50:44 2014
    OZPHB posted in Recordings.

    It looks like recordings.php is already set to allow persons with 'phonebook' permissions to view recordings:

    $context   = $_SESSION[MYAP]['context'];
    $extension = $_SESSION[MYAP]['extension'];
    $allowed   = $_SESSION[MYAP]['phonebook'];
    $admin     = $_SESSION[MYAP]['admin'];
    if($allowed <> "yes") {
       die("You do not have permissions to access this resource.");
    }

    and admin or ownerextension to play them:

    $grid->set_condition("(ownerextension='$extension' OR $admin=1)");

    However this is not the actual behaviour I am seeing. What is happening is that if the user has anything other than 'all' permission set, then they cannot see anything at all under the "Recordings" tab. If they have the 'all' permissions set, then they see ALL recordings, made by any extension.

    Am I right in thinking that this is not the designed behaviour? According to the script (which I have not modified) shouldn't a user with 'phonebook' permission already be able to see their own list, and play it ? If so, any theories as to what is going wrong? (Or am I misreading the script entirely :oops: )

  10. Wed Mar 5 23:33:52 2014
    OZPHB started the conversation DND and BLF using FOP2 2.27.

    Hi Nicolas,

    I have recently upgraded to a new Freepbx system, and the FOP2 ver 2.27
    I am running:
    FOP2 version 2.27
    FreePBX 2.11.0.24
    CentOS 6.5

    I am using Grandstream GXP2120 handsets, with BLFs set to monitor the state of various extensions.

    Mostly everything is working well, but an old problem [url:2hf2vro9]http://forum.fop2.com/esotalk/index.php/1282[/url:2hf2vro9] has resurfaced.

    The problem is that if I set a DND via the FOP2 panel, this does not change the BLF to red on the phone buttons monitoring that extension.

    The reverse DOES work - If I set the phone to DND by dialling *76, then any BLF monitoring that extension turns red, and the DND indicator appears on the FOP2 panel. Using *76 on the phone correctly toggles the status, and the BLF and FOP2 panels correctly update.

    Now, last time this issue arose (as per old thread linked above) the solution was to edit the FOP2Callbacks.pm file.

    When I view this file now, in version 2.27, it says

    # DND Integration from FOP2 to FreePBX ASTDB DND

    #
    # DEPRECATED! All of this can be done from the new plugin
    # architecture

    So, what do I got to plug in where to make my pbx recognise DND settings made from the FOP2 panel ? :?

    Thanks in advance.

View more