
public interface PhoneNumberProvisioningManager
Interface for plugging Phone Number Provisioning Providers.
Its init method will be called on startup to initialize and pass the parameters found in restcomm.xml phone-number-provisioning tag as an Apache Commons Configuration Object
the following methods will be called by RestComm during runtime
| Modifier and Type | Method and Description |
|---|---|
boolean |
buyNumber(PhoneNumber phoneNumber,
PhoneNumberParameters phoneNumberParameters)
Purchase a given phone number previously searched through
searchForNumbers method. |
boolean |
cancelNumber(PhoneNumber number)
Cancel an already purchased phone number.
|
List<String> |
getAvailableCountries()
Returns the list of supported countries by the phone number provider
|
void |
init(org.apache.commons.configuration.Configuration phoneNumberProvisioningConfiguration,
org.apache.commons.configuration.Configuration teleStaxProxyConfiguration,
ContainerConfiguration containerConfiguration)
Initialize the Manager with the RestComm configuration passed in restcomm.xml
|
List<PhoneNumber> |
searchForNumbers(String country,
PhoneNumberSearchFilters listFilters)
Search for a list of numbers matching the various parameters
|
boolean |
updateNumber(PhoneNumber number,
PhoneNumberParameters phoneNumberParameters)
Update the parameters for an already purchased phone number.
|
void init(org.apache.commons.configuration.Configuration phoneNumberProvisioningConfiguration,
org.apache.commons.configuration.Configuration teleStaxProxyConfiguration,
ContainerConfiguration containerConfiguration)
phoneNumberProvisioningConfiguration - the configurationteleStaxProxyConfiguration - the configuration from restcomm.xml contained within containerConfiguration - with container configuration informationList<PhoneNumber> searchForNumbers(String country, PhoneNumberSearchFilters listFilters)
country - 2 letters Country Code as defined per http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.listFilters - contains all the filters that can be applied to restrict the resultsboolean buyNumber(PhoneNumber phoneNumber, PhoneNumberParameters phoneNumberParameters)
searchForNumbers method.phoneNumber - An available phone number - defined as msisdn Ex: 34911067000 returned from
searchForNumbers method.phoneNumberParameters - parameters set on the phone number purchase so the Provider knows where to route incoming messages (be it voice or SMS, MMS, USSD)boolean updateNumber(PhoneNumber number, PhoneNumberParameters phoneNumberParameters)
number - An available phone number - defined as msisdn Ex: 34911067000 returned from
searchForNumbers method.phoneNumberParameters - parameters set on the phone number purchase so the Provider knows where to route incoming messages (be it voice or SMS, MMS, USSD).boolean cancelNumber(PhoneNumber number)
number - the phonenumber to cancel -defined as msisdn Ex: 34911067000List<String> getAvailableCountries()
Copyright © 2015. All Rights Reserved.