Database Grant

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

Applications

Database Grant is usually applied in the following cases:

  • Billing

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

  • Call Center
    By accessing the database of PBX, you can achieve the followings:
    • 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 to the PBX web interface, go to Settings > System > Security > Database Grant, and click Add.
    2. On the pop-up window, configure the following settings:

      • Username: Enter the username that can be used by third party to access the database of PBX.
      • Password: Enter the password that can be used by third party to access the database of PBX.
      • Permitted IP: Enter the IP address or IP section that 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.

    The following takes 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, configure the following settings:

      • Connection Name: Enter a connection name to help you identify it.
      • Host: Enter the IP address of PBX.
      • Port: Enter 3306.
      • 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.