Русская версия | English
Contact management module for MikoPBX with real-time caller ID lookup on incoming and outgoing calls.
- Caller ID Lookup — automatic name display for incoming and outgoing calls
- External API Integration — lookup caller ID from external services with caching
- Excel Import — bulk contact import from Excel files (.xlsx, .xls)
- Web Interface — contact management via DataTable with search and pagination
- Input Masking — automatic phone number formatting (optional)
- Multi-language — 26 languages supported
- MikoPBX 2024.1.114 or higher
- Go to Modules → Marketplace in MikoPBX admin panel
- Find Phone Book module
- Click Install
Or install from GitHub release:
- Download the latest
.ziprelease - Go to Modules → Module Installation
- Upload the archive
- Navigate to Phone Book module
- Click Add button
- Enter name and phone number
- Press Enter or click outside the field to save
Prepare an Excel file with two columns:
| Name | Phone Number |
|---|---|
| John Doe | +1 555 123-4567 |
| ACME Corp | 18005551234 |
- Go to Import tab
- Select Excel file
- Click Import
Phone numbers are normalized automatically — any format is accepted.
Configure external API for caller ID lookup:
- Go to Settings tab
- Enter API URL with
%number%placeholder:https://api.example.com/lookup?phone=%number% - Set cache lifetime (seconds, 0 = no cache)
- Click Save
The API should return plain text with the caller name.
When a call comes from +1 (555) 123-4567, the module normalizes it to 1555123456 and makes an HTTP GET request:
Request:
GET https://api.example.com/lookup?phone=1555123456Response (plain text):
John Doe
The name "John Doe" will be displayed as the caller ID on the phone. If the API returns an empty response or error, the module continues without displaying a name.
Example with company name:
GET https://api.example.com/lookup?phone=1800555123Response:
ACME Corporation
The cache stores the response for the configured lifetime to reduce API calls for repeated numbers.
Numbers are normalized for consistent storage and fast lookups:
Input: +7 (906) 555-43-43
Step 1: 79065554343 (digits only)
Step 2: 065554343 (last 9 digits)
Step 3: 1065554343 (prefix "1" added)
This ensures matching works regardless of how numbers are dialed.
Incoming calls:
Asterisk → AGI script → PhoneBook lookup → Set CALLERID(name)
Outgoing calls:
Asterisk → CONNECTED_LINE_SEND_SUB → PhoneBook lookup → Set CONNECTEDLINE(name)
ModulePhoneBook/
├── agi-bin/
│ └── agi_phone_book.php # Asterisk AGI entry point
├── App/
│ ├── Controllers/ # Phalcon MVC controllers
│ ├── Forms/ # Form definitions
│ └── Views/ # Volt templates
├── Lib/
│ ├── PhoneBookConf.php # Asterisk dialplan integration
│ ├── PhoneBookAgi.php # AGI caller ID handler
│ ├── PhoneBookFind.php # External API lookup
│ └── PhoneBookImport.php # Excel import processor
├── Models/
│ ├── PhoneBook.php # Contact model
│ └── Settings.php # Settings model
├── public/assets/
│ ├── css/ # Module styles
│ └── js/ # JavaScript (ES6 source + compiled)
└── Messages/ # Translations (26 languages)
SQLite database at /storage/usbdisk1/mikopbx/custom_modules/ModulePhoneBook/db/module.db
m_PhoneBook — contacts:
id— primary keynumber— normalized number for lookupnumber_rep— display formatcall_id— contact namesearch_index— full-text search fieldcreated— timestamp (for API cache expiration)
m_ModulePhoneBook — settings:
disableInputMask— toggle input maskingphoneBookApiUrl— external API URLphoneBookLifeTime— cache lifetime in seconds
# Compile ES6 to ES5 with Babel
docker run --rm -v ~/mikopbx:/workspace ghcr.io/mikopbx/babel-compiler:latest /workspace/Extensions/[module]/public/assets/js/src/[file] extension`php -l Lib/PhoneBookConf.php- Email: help@miko.ru
- Issues: GitHub Issues
GPL-3.0 — see LICENSE file.