Database Grant

Yeastar K2 IPPBX is based on MySQL database. A third-party software can access to the database of PBX. Grant permissions to database before accessing to the database of PBX.

Applications

Database Grant is usually applied in below cases:

  • Billing

    By accessing to the database of PBX, you can get CDR and save it to the local database of billing software. Then you can charge the calls by CDR.

  • Call Center
    By accessing to the database of PBX, you can
    • get CDR and save it to the local database of call center software.
    • get storage path of recordings, and download recordings by FTP or File Sharing.

Capture Data in Database

  1. Add database grant on PBX for the targeted device.
    1. Log in the PBX web interface, go to Settings > System > Security > Database Grant, and click Add.
    2. On the pop-up window, change below settings:

      • Username: Enter the username which can be used by third party to access the database of PBX.
      • Password: Enter the password which can be used by third party to access the database of PBX.
      • Permitted IP: Enter the IP address or IP section which is allowed to access the database of PBX. The input format should be XXX.XXX.XXX.XXX or XXX.XXX.XXX.%.
        For example:
        • 216.207.245.47 means that only the device with IP address 216.207.245.47 is allowed to access the database of PBX.
        • 192.168.6.% means that only the devices whose IP section is 192.168.6.X are allowed to access the database of PBX.
    3. Click Save and Apply.
  2. Access the database of PBX.

    Take Navicat for MySQL for example, to introduce how to access the database of PBX.

    1. Open Navicat for MySQL, and click Connection.
    2. On the pop-up window, change below settings:

      • Connection Name: Enter connection name to help you identify it.
      • Host: Enter the IP address of PBX.
      • Port: Enter 3066.
      • User Name: Enter the user name configured in Database Grant of PBX.
      • Password: Enter the password configured in Database Grant of PBX.
    3. Click OK.
    4. Click cdr table, you can see existing cdr tables on PBX.
      Note: The database generates a cdr table every month

Download Recordings

The third party software can get storage path of recordings, and download recordings.

To download recordings by third party software, you need to Set up File Sharing or save recordings on Network Drive.

  1. Access the database to query the value of recordpatch.
  2. Set access path for recordings by different file sharing methods.
    • External Storage File Sharing

      For example, the value of recordpatch is /tmp/media/harddisk1/autorecords/20170503/20170503162206-161-6222-Inbound.wav.

      The shared folder is CarolShare, the IP address of PBX is 192.168.7.112, then access path for recordings is:

      //192.168.7.112/CarolShare/harddisk1/autorecords/20170503/20170503162206-161-6222-Inbound.wav.

    • Network Drive

      For example, the value of recordpatch is /tmp/media/networkdisk1/autorecords/20170503/20170503162206-161-6222-Inbound.wav.

      The shared folder of computer is recordings, the IP address of computer is 192.168.6.100, then access path for recordings is:

      //192.168.6.100/recordings/autorecords/20170503/20170503162206-161-6222-Inbound.wav.