For the complete documentation index, see llms.txt. This page is also available as Markdown.

Call the company from your mobile and dial an extension to call a third-party company

This functionality is convenient for mobile employees. When it is important that the conversation is recorded and recorded on the PBX in the call history. When it is not possible to use a softphone / or "IP-SIM".

  1. Add a new dialplan application (see Dialplan Applications)

Dialplan applications section
  1. Assign an internal number, for example 2200109

Dialplan Number
  1. Paste the code into the "Programme Code" tab:

Code for dialplan
  1. In the browser's address bar, copy the application ID. It will look like "DIALPLAN-APP-6A9902C631C5E7B5AC8F501C559FD678"

Dialplan ID
  1. Go to the "System file customization" section

System file customixation section
  1. Open the file "extensions.conf" for editing

"extensions.conf" file
  1. Paste the following code at the end of the file:

code for extensions.conf

here "DIALPLAN-APP-6A9902C631C5E7B5AC8F501C559FD678" is the application ID.

Important points

  1. The application will be executed for all incoming calls

  2. It will be possible to enter an extension only if the caller's phone number is filled in the employee card, that is, the number must belong to the employee. This is done for security.

  3. The script is not a complete product, but is open for customization

DISA — calling out through the PBX with PIN authorization

DISA (Direct Inward System Access) lets you call the PBX number, authenticate with a PIN code and then dial any external or internal number "on behalf of the company" (with the outgoing CallerID substituted). Unlike the example above, access is protected by a PIN code and/or a CID whitelist rather than by matching the number to an employee card.

  1. Add a new dialplan application (see Dialplan Applications) and assign it an internal number, for example 2204. Code type — "PHP-AGI script".

Dialplan applications section
  1. Paste the code into the "Programme Code" tab:

Code for dialplan
  1. Configure the constants in the SETTINGS block:

Constant
Purpose

DISA_PIN

Access PIN. An empty string — the PIN is not requested (then protection is by DISA_CID_WHITELIST only)

DISA_CID

CallerID substituted into the outgoing call

DISA_CID_WHITELIST

Whitelist of incoming CIDs allowed to use DISA. An empty array — allowed for everyone

DISA_CONTEXT

MikoPBX dialing context. all_peers — internal numbers and outbound routes

DISA_MAX_ATTEMPTS

Number of PIN entry attempts

DISA_*_TIMEOUT

Timeouts (ms) for entering the PIN and the number

DISA_NUM_MAXLEN

Maximum length of the dialed number

DISA_*_PROMPT

Paths to the sound files (without extension)

  1. Prepare the sound files. Upload your own recordings (for example, via the "Sound files" section or over SSH to /storage/usbdisk1/mikopbx/media/custom/) and set their full paths in the DISA_*_PROMPT constants. You can verify a file exists on the host with:

You do not have to record the prompts with your own voice — you can synthesize them right on the PBX with our modules: Phrase Studio (TTS) (offline, powered by Piper) or the RHVoice speech generation module. Generate the phrases ("Enter the PIN code and press the hash key", "The password is incorrect", "Goodbye", etc.) and then set the paths to the resulting files in the DISA_*_PROMPT constants.

  1. Route an incoming call to DISA. In the "Incoming routes" section create a route (by a specific DID if needed) and set the created dialplan application (internal number 2204) as its destination.

Pointing an incoming route to the DISA application

Important points (DISA)

  1. DISA allows calling out through your PBX and at your expense. You must protect it with a PIN code (DISA_PIN) and/or a CID whitelist (DISA_CID_WHITELIST). An open DISA without a PIN on a public DID is a risk of unauthorized calls.

  2. All PIN entry and dialing attempts are logged via SystemMessages::sysLogMsg('DISA', ...) — search by the DISA tag in the system log.

  3. The substituted DISA_CID must be allowed for outgoing calls by your provider, otherwise the operator will reject the call.

  4. The script is not a complete product, but is open for customization.

Last updated

Was this helpful?