Skip to content

sdefauw/libastphonenumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asterisk Libphonenumber

libastphonenumber is a new library that exposes the libphonenumber into Asterisk.

Highlights of asterisk functions

  • FORMAT_NUM - Get formatted numbers in specific format based on a country.
  • IS_VALID_NUM - Check validity of a number.
  • NUM_INFO - Get information about a number: Country calling code, Country of the phone and Type of phone number.
  • REGION_INFO - Get information about a country/region.

Installation

The installation is processed in two parts:

  • A library is added (libastphonenumber) on the device to allow the link between the libphonenumber and Asterisk.
  • Adding a new Asterisk application.

Requirements

The installation of following programs are required:

  • The C++ part of libphonenumner
  • CMake
  • A gnu compiler compatible with c++11
  • Asterisk source code and be able to compile it.

Packaging

To create a Debian version of the library, you can follow these instructions.

Manual lib installation

Compile the main library libastphonenumber:

mkdir build
cd build
cmake ..
make
make install

Asterisk installation

Add Asterisk application to the source code:

cp asterisk/app_numformat.c <ASTERISK_SOURCE_CODE_PATH>/apps/

Compile Asterisk source code.