Ctrl K
ring2all.com

Phonebooks Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Phonebook Types
  5. Compatible Phone Brands
  6. CSV Import
  7. Common Scenarios & Examples
  8. Limitations & Important Notes
  9. Troubleshooting Tips
  10. Glossary

---

1. Module Overview (Technical)

What Are Phonebooks?

Phonebooks are corporate directories that provide contact lists to IP phones. The system automatically detects the phone brand and returns the correct XML format. Phonebooks can be populated from internal PBX modules or external CSV imports.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                    Phonebook System                             │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  IP Phone                                Backend Server          │
│  ┌─────────────────┐                   ┌──────────────────────┐ │
│  │ Yealink T46U    │                   │  Phonebook Service   │ │
│  │                 │◄──HTTP Request───►│                      │ │
│  │ [Phonebook]     │   User-Agent:     │  1. Detect phone     │ │
│  │                 │   Yealink/T46U    │     brand from UA    │ │
│  │                 │                   │  2. Query phonebook  │ │
│  │                 │◄──XML Response────│  3. Format for brand │ │
│  │                 │   (Yealink XML)   │  4. Return XML       │ │
│  └─────────────────┘                   └──────────────────────┘ │
│                                                                 │
│  Phonebook Sources:                                             │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │                                                            │ │
│  │  Internal (from PBX)          External (from CSV)         │ │
│  │  ├─ Extensions                ├─ Customers                │ │
│  │  ├─ Queues                    ├─ Vendors                  │ │
│  │  ├─ Ring Groups               ├─ Partners                 │ │
│  │  ├─ Conferences               └─ Any imported contacts    │ │
│  │  ├─ Feature Codes                                         │ │
│  │  └─ Speed Dials                                           │ │
│  │                                                            │ │
│  └────────────────────────────────────────────────────────────┘ │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Features

FeatureDescription
Auto-Format DetectionDetects phone brand, returns correct XML
23+ Phone BrandsYealink, Grandstream, Polycom, Cisco, etc.
Internal SourcesExtensions, Queues, Ring Groups, etc.
CSV ImportImport external contacts
Unique URLsRandom code for security

Key Tables

TablePurpose
public.phonebooksPhonebook configurations
public.phonebook_entriesExternal contact entries

Key Files

FileDescription
modules/phonebooks/PhonebooksPage.tsxMain page
modules/phonebooks/PhonebookFormView.tsxCreate/edit form
modules/phonebooks/PhonebookEntriesView.tsxView entries
modules/phonebooks/PhonebookImportView.tsxCSV import
---

2. Module Overview (Commercial/Business)

Business Value

Phonebooks provide centralized contact management:

Without PhonebooksWith Phonebooks
Manual phone configAuto directory
Static contactsDynamic updates
Per-phone setupCentral management
No external contactsCSV import

Use Cases

  1. Internal Directory
- All extensions visible

- Updated automatically

  1. Department Phonebooks
- Sales team only

- Support team only

  1. External Contacts
- Customer list

- Vendor directory

  1. Feature Access
- Quick dial codes

- Conference access

Feature Highlights

FeatureBenefit
Multi-BrandOne phonebook for all phones
Auto-FormatNo per-brand configuration
Internal + ExternalCombined directories
CSV ImportBulk contact upload
Secure URLsRandom access codes
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Create internal phonebooks from PBX modules
  • Create external phonebooks from CSV
  • Select which modules to include
  • Import contacts from CSV files
  • Copy phonebook URL for phones
  • View and manage entries

Phonebook Creation Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Create Phonebook                                   │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Section: General                                               │
│  ├─ Description: Sales Team Directory                          │
│  ├─ Type: [Internal ▼] / External                              │
│  ├─ Prefix: (optional)                                         │
│  └─ URL: (auto-generated after save)                           │
│                                                                 │
│  Section: PBX Modules to Include (Internal only)               │
│  ├─ Extensions: [Select extensions...    ] ▼                   │
│  │   ☑ 1001 - John Smith                                       │
│  │   ☑ 1002 - Jane Doe                                         │
│  │   ☐ 1003 - Bob Wilson                                       │
│  ├─ Queues: [Select queues...            ] ▼                   │
│  ├─ Ring Groups: [Select ring groups...  ] ▼                   │
│  ├─ Conferences: [Select conferences...  ] ▼                   │
│  ├─ Feature Codes: [Select feature codes...] ▼                 │
│  └─ Speed Dials: [Select speed dials...  ] ▼                   │
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

URL Configuration

After saving, the phonebook URL is auto-generated:

Plaintext
https://pbx.example.com/api/phonebook/a7b3c9d2e5f1

This URL is configured in the phone's phonebook settings.

Quick Tips

TIP
Auto-Format: The system detects phone brand automatically - one URL works for all phones.
TIP
Copy URL: Use "Copy URL" button to easily share with phone configurations.
CAUTION
Save First: Must save phonebook before URL is generated.

---

4. Phonebook Types

Internal Phonebook

Dynamically generated from PBX modules:

ModuleDescription
ExtensionsSIP extensions with names
QueuesCall center queues
Ring GroupsRing groups
ConferencesConference bridges
Feature CodesStar codes (60, 72, etc.)
Speed DialsSpeed dial numbers
Benefits:
  • Always up-to-date
  • No manual maintenance
  • Reflects current PBX config

External Phonebook

Imported from CSV file:

FieldDescription
NameContact name
NumberPhone number
MobileMobile number
OrganizationCompany name
EmailEmail address
Benefits:
  • Customer directories
  • Vendor contacts
  • Any external list

---

5. Compatible Phone Brands

Supported Brands (23+)

CategoryBrands
EnterpriseYealink, Polycom, Cisco, Avaya
ConsumerGrandstream, Fanvil, Snom, Htek
SoftphonesLinphone, Zoiper, Bria
LegacyAastra, Mitel, Alcatel
OtherPanasonic, Gigaset, Sangoma, etc.

Auto-Detection

The system detects the phone brand from the HTTP User-Agent header:

Plaintext
User-Agent: Yealink SIP-T46U 28.73.0.50
→ Returns Yealink XML format

User-Agent: Grandstream GXP2170 1.0.1.35
→ Returns Grandstream XML format

Format Demo

Each brand receives the correct XML format:

Yealink Example:

Xml
<?xml version="1.0" encoding="UTF-8"?>
<YealinkIPPhoneDirectory>
  <DirectoryEntry>
    <Name>John Smith</Name>
    <Telephone>1001</Telephone>
  </DirectoryEntry>
</YealinkIPPhoneDirectory>

Grandstream Example:

Xml
<?xml version="1.0" encoding="UTF-8"?>
<AddressBook>
  <Contact>
    <Name>John Smith</Name>
    <Phone>1001</Phone>
  </Contact>
</AddressBook>

---

6. CSV Import

CSV Format

Template:

Csv
name,number,mobile,organization,email
John Smith,5551234567,5559876543,Acme Corp,john@acme.com
Jane Doe,5552345678,,Partner Inc,jane@partner.com

Required Fields

FieldRequiredDescription
name✅ YesContact name
number✅ YesPrimary phone
mobile❌ OptionalMobile number
organization❌ OptionalCompany
email❌ OptionalEmail address

Import Process

  1. Create/edit external phonebook
  2. Click Import CSV
  3. Download template (optional)
  4. Upload CSV file
  5. Review import results

Import Results

ResultDescription
ImportedNew contacts added
SkippedDuplicates ignored
ErrorsInvalid entries
---

7. Common Scenarios & Examples

Scenario 1: Company-Wide Directory

Internal Phonebook:
SettingValue
DescriptionCompany Directory
TypeInternal
ExtensionsAll
QueuesAll
Ring GroupsAll

Scenario 2: Sales Team Only

Internal Phonebook:
SettingValue
DescriptionSales Team
TypeInternal
ExtensionsSales department only
QueuesSales Queue

Scenario 3: Customer Directory

External Phonebook:
SettingValue
DescriptionCustomer Contacts
TypeExternal
SourceImport from CRM CSV

Scenario 4: Feature Code Quick Access

Internal Phonebook:
SettingValue
DescriptionFeature Codes
TypeInternal
Feature CodesAll enabled codes
---

8. Limitations & Important Notes

Technical Notes

NOTE
URL Security: Random codes prevent unauthorized access.
NOTE
Auto-Format: No need to create separate phonebooks per brand.
WARNING
Save First: Phonebook must be saved before URL is generated.

Best Practices

  1. Descriptive Names: Clear phonebook descriptions
  2. Limit Scope: Don't include everything - filter appropriately
  3. Regular Updates: Keep external contacts current
  4. Test URLs: Verify phonebook loads on phones
  5. Document: Track which phonebooks go to which phones

---

9. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
No URLNot savedSave phonebook first
Empty phonebookNo modules selectedSelect at least one source
Wrong formatUnknown phoneCheck User-Agent
Import failsBad CSV formatUse template
Missing entriesWrong moduleVerify module selection

Testing Phonebook URL

Bash
# Test with curl (default format)
curl https://pbx.example.com/api/phonebook/a7b3c9d2e5f1

# Test with Yealink User-Agent
curl -A "Yealink SIP-T46U 28.73.0.50" \
  https://pbx.example.com/api/phonebook/a7b3c9d2e5f1

Diagnostic SQL

List phonebooks:

Sql
SELECT id, description, type, url, enabled
FROM public.phonebooks
WHERE domain_id = [domain_id];

Count entries:

Sql
SELECT phonebook_id, COUNT(*) as entries
FROM public.phonebook_entries
GROUP BY phonebook_id;

---

10. Glossary

TermDefinition
PhonebookContact directory for IP phones
InternalGenerated from PBX modules
ExternalImported from CSV
User-AgentHTTP header identifying phone brand
XML FormatPhone-specific directory format
EntrySingle contact in phonebook
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
Phonebooksℹ️ Backend service - XML served by API based on phone brand
Phonebooks are served by the backend API which auto-detects phone brand and returns the appropriate XML format. No Lua handlers are used.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?