Download the PHP package zadarma/multi-ivr without Composer

On this page you can find all versions of the php package zadarma/multi-ivr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package multi-ivr

Interactive voice menu

PHP library for Zadarma voice menu setup

Read the description in other languages:

Requirements:

Features

Voice menu flexible configuration using filters and rules has been implemented. Four types of filters are supported:

A rule consists of filters and actions. An action will be performed if rule filter requirements match. There are two types of actions - transfer to the menu (audio file is played and user action is awaited) and call transfer to a phone number or a scenario (calling several numbers or blacklist).

We will take a closer look at the features below.

Use

To receive call notifications, you need to create an open for all access link that will receive POST-requests with information from Zadarma system. This link has to be input in the personal account under the title "Call notifications in PBX".

The following php code needs to be placed at the link:

$key and $secret - API interface authorization keys, they have to be received in the personal account. $ivrMenuConfig - voice menu text config, we will talk about it later.

Config example

Task:

Divide clients into 3 groups using voice menu:

  1. Direct calls to the sales department when pressing 1.
  2. Direct calls to the purchasing department when pressing 2.
  3. Direct calls to the support department when pressing 3.
  4. If a caller stays on the line, the call is transferred to the secretary.

Here are the voice menu rules:

Voice menu config syntax

Config has 3 possible tags - start, menu, schedule. Each tag has its allowed attributes, they are described below. Attribute name and value are divided by the equal sign attribute=attributeValue.

Attributes are divided by spaces, that is why spaces cannot be used in attribute values.

Start tag

Required. It sets the rules for the beginning of an incoming call to PBX.

It has the following attributes:

  1. action - action type.

    2 possible values:

    • redirect - transfer to a scenario or PBX extension number;
    • goto - transfer to the voice menu by its name.
  2. action-target - action purpose.

    If action attribute has the value:

    • redirect

      An extension number or scenario id must be entered.

      Scenarios are created in the personal account. Scenario id is set in the 0-1 format, where 0 - voice menu number, 1 - scenario number.

      Scenario can also have a blacklist value - in this case, the call will be declined with a busy signal.

    • goto

      Voice menu name must be entered.

  3. callerid - filter by caller numbers, separated by comma.
  4. calleddid - filter by called numbers, separated by comma.
  5. default - default action. One of the actions must have a default sign.
  6. schedule - schedule name filter, can be used to set working and lunch hours.

Start example with several filters:

Menu tag

Sets voice menu elements, rules for transferring between them, rules for transferring to scenarios or PBX extension numbers.

It has the same attributes as start, as well as:

  1. name - voice menu element name, required attribute.
  2. playfile - played file id, required attribute.

    Entered once for the voice menu in a separate from the filters line, responsible for the played file of the voice menu. The id of the uploaded or voiced file can be found in the personal account.

  3. timeout - input timeout in seconds.

    Entered in the same line as playfile attribute, default value - 3.

  4. attempts - number of played file repetitions, if the caller has not pressed a button.

    Entered in the same line as playfile attribute, default value - 1.

  5. maxsymbols - maximum number of symbols that the system is waiting to be entered.

    Entered in the same line as playfile attribute, default value - 1.

  6. button - filter for pressing one or several buttons.

Schedule tag

  1. name - schedule name.
  2. data - schedule description.

Schedule example:

Schedule has name work, it is set that from Monday to Friday the time is from 08:00 until 12:59:59 and from 14:00 until 16:59:59, on Saturday from 09:00 until 14:59:59.

Possible days of the week labels: su, mo, tu, we, th, fr, sa.

Time can be set for each day of the week as one or more intervals separated by commas. An interval consists of two values separated by a hyphen - start time and end time. Start and end time must consist of four digits. The first two digits stand for hours, the other two for minutes.

Time can also be set for several days by listing weekdays using a comma and time using a colon, like so mo,tu,we,th,fr:0800-1300;1400-1700.

If the time is not set, the whole day is applied from 00:00:00 until 23:59:59. For example, mo,tu,we,th,fr:0800-1300;1400-1700,sa,su mo,tu,we,th,fr have two time intervals from 8:00 until 12:59:59 and from 14:00:00 until 16:59:59, and sa,su have one time interval from 00:00:00 until 23:59:59.

Schedule example:

The schedule name is relax, it is set that Mondays through Fridays the off time is from 13:00:00 until 13:59:59, and Saturdays and Sundays are off.

Rules

Config lines that include filters in their attributes are assigned to rules.

As discussed above, the following attributes belong to filters: callerid, calleddid, button, schedule. Rules describe the conditions for performing certain actions depending on Caller number, number that is being called, user action and current time.

Rules priority is set by the order of the lines.

Rules example:

Multilevel voice menu example:

  1. start
    • if number 111 or 222 is calling, the call is transferred to the blacklist scenario (hang up);
    • otherwise if the off-the-clock schedule condition is met, the call is transferred to the off-the-clock menu
    • otherwise if the dinner schedule condition is met, the call is transferred to the dinner menu;
    • otherwise is number 112 or 223 is calling, the call is transferred to the main.1 menu;
    • otherwise the call is transferred to the main menu.
  2. main menu
    • 43d8a740ec032766 file is played, input timeout - 5, File playing repetitions if the caller has not pressed a button - 2, the maximum number of symbols that can be entered - 2.
    • if 1 is pressed, the call is transferred to main.1 menu;
    • otherwise if 2 is pressed, the call is transferred to main.2 menu;
    • otherwise if 3 is pressed, the call is transferred to scenario 0-1;
    • otherwise if 4 is pressed, the call is transferred to PBX extension number 101;
    • otherwise if 10 is pressed, the call is transferred to PBX extension number 110;
    • otherwise the call is transferred to PBX extension number 100.
  3. main.1 menu
    • a279dd3a1da19e57 file is played;
    • if 1 is pressed, the call is transferred to scenario 0-2;
    • otherwise if 2 is pressed, the call is transferred to PBX extension number 102;
    • otherwise if * is pressed, the call is transferred to the main menu;
    • otherwise menu.1 is repeated.
  4. main.2 menu
    • a6842305f1996e34 file is played;
    • if 1 is pressed, the call is transferred to scenario 0-3;
    • otherwise if 2 is pressed, the call is transferred to PBX extension number 103;
    • otherwise if * is pressed, the call is transferred to the main menu;
    • otherwise menu.2 is repeated.
  5. dinner menu
    • facdfc7ca2029552 file is played;
    • the call is transferred to scenario 0-4.
  6. off-the-clock menu
    • b1b2d11f59d8d208 file is played;
    • the call is transferred to the blacklist scenario(hang up).
  7. dinner schedule
    • Condition: Monday - Friday from 13:00:00 until 13:59:59;
  8. off-the-clock schedule
    • Condition: Monday - Friday from 00:00:00 until 08:59:59, from 18:00:00 until 23:59:59, Saturday, Sunday.

All versions of multi-ivr with dependencies

PHP Build Version
Package Version
Requires zadarma/user-api-v1 Version ^1
php Version >=7.2
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zadarma/multi-ivr contains the following files

Loading the files please wait ....