Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-22424

Superfecta ignores cidnum in superfecta_to_incoming_id when displaying selected scheme

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 15, 16
    • Fix Version/s: 15, 16
    • Component/s: CID Superfecta
    • Labels:
      None
    • Asterisk Version:
      17.9.1
    • Distro Version:
      12.7.8-2012-1.sng7
    • Distro:
      FreePBX Distro
    • Module Fix Version:

      Description

      in CID Superfecta function superfecta_hook_core the code does not properly display the selected scheme on an inbound route with DID / CID both set and the DID matches another inbound route.  The select operation to determine the selected schema only looks at the "extension" field in the record.

      
       $sql = "SELECT scheme FROM superfecta_to_incoming WHERE extension = ?";
                      $q = $db->prepare($sql);
                      $q->execute(array($info[0]));
                      $scheme = $q->fetchColumn();
      

       in a table with the following data:

      
      MariaDB [asterisk]> select * from superfecta_to_incoming;
      +---------------------------+------------+------------+---------------------+
      | superfecta_to_incoming_id | extension  | cidnum     | scheme              |
      +---------------------------+------------+------------+---------------------+
      |                        20 | 9725397452 |            | base_Default        |
      |                        24 | 0000000001 |            | base_AntiSpamChecks |
      |                        25 | 0000000000 |            | base_AntiSpamChecks |
      |                        27 | 5784       |            | base_Announce_Only  |
      |                        35 | 2146354642 | 9726035428 | base_Announce_Only  |
      |                        41 |            |            | base_Default        |
      |                        46 | 2146354642 |            | base_Default        |
      |                        54 | 2146354642 | 9726035429 | base_Announce_Only  |
      +---------------------------+------------+------------+---------------------+{noformat}
      the wrong value will be selected for scheme, and will display "Default" for id 35 when actually it should display "Announce_Only".
      

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  mitchmitchell MItch Mitchell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    NextupJiraPlusStatus

                    Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.