PortaSwitch Interfaces MR47
PortaSwitch Interfaces MR47
PortaSwitch Interfaces MR47
ONE
PortaSwitch
External Interfaces
Guide
Maintenance
Release
47
Documentation
www.portaone.com
Porta
Switch
Porta
Switch
Table of Contents
Preface ............................................................................................................................ 5
Whats New in Maintenance Release 47?........................................................... 6
1.
2.
Porta
Switch
3.
4.
Appendices................................................................................. 349
Examples of RADIUS Communication.............................................................. 350
Examples of Scripts for PortaBilling SOAP Communication ................. 356
Examples of Scripts for PortaBilling JSON Communication.................. 367
Examples of API Scripts in Perl, PHP and Python........................................ 369
Description of xDR Record Fields ...................................................................... 373
Service Features Methods .................................................................................... 376
Using the service features methods to change the FollowMe settings 383
Definition of Time Period .................................................................................. 385
How to Allow ISP Customers to Purchase Extra Quota via API ............. 388
Sample Script for PortaSIP Media Server SOAP Communication....... 388
Porta
Switch
Preface
This document provides information for developers who want to
interface their applications or VoIP systems with PortaSwitch.
Where to get the latest version of this guide
The hard copy of this guide is updated upon major releases only, and does
not always contain the latest material on enhancements that occur inbetween minor releases. The online copy of this guide is always up to
date, and integrates the latest changes to the product. You can access the
latest copy of this guide at: www.portaone.com/support/documentation/.
Conventions
This publication uses the following conventions:
Commands and keywords are given in boldface
Terminal sessions, console screens, or system file names are
displayed in fixed width font
The exclamation mark draws your attention to important information or
actions.
NOTE: Notes contain helpful suggestions about or references to materials not
contained in this manual.
Timesaver means that you can save time by taking the action described
here.
Tips provide information that might help you solve a problem.
Porta
Switch
add_periodical_payment
update_periodical_payment
delete_periodical_payment
get_periodical_payment_info
get_periodical_payment_list
get_services_consuming
get_cdrs_retail_customer
get_lines_activesubscriptions
add_group
update_group
delete_group
get_group_list
Porta
Switch
get_resale_map_list
get_resale_map_record
update_resale_map_record
Porta
Switch
1. PortaBilling
RADIUS
Interface
Porta
Switch
RADIUS Protocol
PortaBilling uses the RADIUS protocol as per Remote Authentication
Dial-In User Service (RADIUS), RFC 2865 and RADIUS Accounting, RFC
2866. By default, the PortaBilling RADIUS server listens on port 1812
(UDP) for authentication requests and on port 1813 (UDP) for
accounting requests.
RADIUS Attributes
Description
Specifies the IP address of the network access
server that is requesting authentication
Indicates the name of the user being
authenticated by the RADIUS server
Indicates the users password
The unique call identifier generated by the
gateway. Used to identify the separate billable
events (calls) within a single calling session
The telephone number the user called. Only for
authorization requests
h323-ivr-out
Message-Authenticator
Porta
Switch
A1
Y
A2
h323-return-code
h323-currency
h323-preferred-lang
h323-credit-amount
h323-redirect-number
MessageAuthenticator
Description
Type of billing service for a
specific session
Return codes are the servers
instructions to the network access
server. The list of possible values
are described in the RADIUS
Return Codes section
Currency used with h323-creditamount
Language to use for the audio
prompt
Amount of credit (in currency) in
the account
Optional
Phone number to which the call is
redirected
Used to authenticate and protect
the integrity of Access-Requests
in order to prevent spoofing.
Accounting Requests
Currently, the following attributes are required for correct processing of
accounting requests:
Attribute
NAS-IP-Address
NAS-Port-Name
User-Name
Calling-Station-Id
Called-Station-Id
h323-setup-time
Description
Specifies the IP address of the network access
server that is sending accounting requests
Indicates the name of the physical NAS port
that is authenticating the user
Indicates the name of the user for the
accounting request
The telephone number the call came from
The telephone number the user called
Indicates the setup time in NTP format: hour,
minutes, seconds, microseconds, time_zone,
day, month, day_of_month, year
10
Porta
Switch
h323-connect-time
h323-disconnect-time
h323-conf-id
h323-incoming-conf-id
h323-disconnect-cause
h323-call-origin
h323-call-type
Acct-Session-Time
Acct-Status-Type
h323-ivr-out
h323-remote-address
11
Porta
Switch
This allows you to control an accounts login session (sessions are used to
prevent simultaneous logins by debit accounts). This attribute may be
used in the accounting record for a specific call leg in order to force the
session to be unlocked. (For instance, to force a session unlock on the
answer/VoIP call leg, instead of the customary answer/Telephony call
leg). An optional expires parameter may control how long the session
lock state is supposed to be held on BE (for example, to preserve the
funds deposited for the session until the next radius message.)
Format:
PortaBilling_Session:<string>
PortaBilling_Session:lock=<lockvalue>[;expires=<seconds>]
Description
Do not lock the account after the current request
Do not lock the account for the current session and unlock
any other existing session for this account
Lock the account for the current session and unlock any
other existing session for this account
Do not set or remove any locks, and skip any lock checks
Example:
h323-ivr-out
= 'PortaBilling_Session:nolock'
PortaBilling_Ignore_Password
Possible values:
YES or NO.
Example:
h323-ivr-out
= PortaBilling_Ignore_Password:YES'
12
Porta
Switch
PortaBilling_CallbackHistory
This provides information about the other (second) call leg of a call, so
that the first call leg can be billed properly (e.g. do not bill the first leg if
the second leg was not connected).
This attribute may be present multiple times in a request. Only the last
occurrence is actually used, while the others are ignored.
Format:
PortaBilling_CallbackHistory:<string>
Possible values:
Value
Description
START
The first call leg was started
ATTEMPT The callback engine attempted to establish an outgoing call
for the second leg
OK
The second call leg was successfully connected
If there is no OK entry, the call leg will be billed using a special rate plan
associated in the product configuration with the CALLBACK_FAIL
access code.
Example:
h323-ivr-out
h323-ivr-out
h323-ivr-out
= 'PortaBilling_CallbackHistory:START'
= 'PortaBilling_CallbackHistory:ATTEMPT'
= 'PortaBilling_CallbackHistory:OK'
PortaBilling_AccessCode
Possible values:
Any string. The value passed will be compared to the values entered in the
products accessibility (case-sensitively).
Example:
h323-ivr-out
= 'PortaBilling_AccessCode:18001234567'
PortaBilling_Original_DNIS
13
Porta
Switch
Format:
PortaBilling_Original_DNIS:<value>
= 'PortaBilling_Original_DNIS:19001234567'
PortaBilling_RestoreCacheLevel
This controls how the billing engine uses the account information
retrieved during the authorization process for a request, in order to
facilitate the processing of other requests. Its most common application is
to disable this information for re-use, if for some reason information
from the current request should not be applied to other call legs (e.g. in
callback scripts).
Format:
PortaBilling_RestoreCacheLevel:<integer>
Possible values:
Value
Description
-1
Disable caching and reuse of account information.
0
Use the default policy.
Example:
h323-ivr-out
= ' PortaBilling_RestoreCacheLevel:-1'
Possible values:
A non-empty string identifying a service in PortaBilling:
Session Generic time-based service type; it can be used to apply
charges for any service use based on the length of time the service
was accessed.
Voice Rating telephony calls (incoming or outgoing) made via
PortaSIP, VoIP gateways or other equipment.
Data Data transfers rated using the amount transferred as the
billing parameter.
Netaccess Internet access sessions (DSL, PPPoE, etc.), rated
based on session duration or the amount of transferred data.
14
Porta
Switch
Example:
PortaOne-Service-Type=Conference
PortaOne-Calling-Party
Properties:
Possible values:
Property
Description
id
This contains the caller ID information for the call. It is
taken from the P-Asserted-Identity and RPID headers
display-id
This indicates the Caller number value
that is taken from the From: header and typically
displayed on the called partys phone display
privacy
This is a privacy flag which indicates that the calling party
requests its identification to be kept private (hidden from
the final call recipient.) Possible values: 1/0, default 0
name
This is a caller name. It is taken from the CLN field
x-id
The callers extension number configured on the PBX of a
calling party
ctx-id
The unique identifier for the calling party PBX
Example:
h323-ivr-out
= 'PortaOne-Calling-Party = 'ctxid=52333;name=EASYCALL;id=17289277770;display-id=17289277770''
15
Porta
Switch
PortaOne-Redirecting-Party
This provides information about the redirecting party in case the call is
forwarded or transferred.
Format:
PortaOne-Redirecting-Party:<propertyname1=value1>;
The properties and values are the same as for the PortaOne-Calling-Party
attribute described above.
Used-Service-Unit
This specifies the amount of used service units there are, measured from
the point when the service session identified in the h323_conf_id attribute
became active.
Format:
Used-Service-Unit:<value>
Possible values:
Integer number specifying amount of measurement units.
Example:
h323-ivr-out
= Used-Service-Unit:222
A1
A2
Y
Tariff
available-funds
h323-preferred-lang
Description
The maximum allowed
call duration (in seconds)
The name of the rate plan
applied to the account
within this session
For debit accounts, this is
equal to the h323-creditamount. For credit
accounts, this returns the
actual amount of available
funds (the difference
between the credit limit
and the current balance
with respect to the credit
limits for the individual
account and customer)
Language preference for
the audio prompt
16
Porta
Switch
h323-credit-amount
h323-credit-time
PortaBilling_UserName
Y
Y
PortaBilling_RatePattern
PortaBilling_AccessCode
PortaBilling_AccountBalance
PortaBilling_CustomerBalance
PortaBilling_CustomerCreditLimit
PortaBilling_CustomerCreditLimitT
hreshold
BalanceThreshold
PortaBilling_ProductBreakage
PortaBilling_No_Disconnect_Warn
ing
17
Porta
Switch
DURATION
This specifies the real allowed maximum call duration (in seconds), which
may differ from the announced credit time if billing tricks are applied.
Format:
DURATION:<integer>
Possible values:
Positive integer (number of seconds).
Example:
h323-ivr-in
= 'DURATION:320'
Tariff
The name of the rate plan applied to the account within this session.
Format:
Tariff:<string>
Possible values:
Positive integer (number of seconds).
Example:
h323-ivr-in
= 'Tariff:ABC prepaid'
Available-funds
Possible values:
Any positive number formatted with two decimal places; a dot (.) is used
as the decimal separator.
Example:
h323-ivr-in
= ' available-funds:124.78'
PortaBilling_UserName
The account ID to be used for billing this call. The RADIUS client must
supply this value as the User-Name (or, alternatively, in h323-ivrout=PortaBilling_UserName) attribute value in the accounting records for
all call legs (incoming and outgoing).
18
Porta
Switch
Format:
PortaBilling_UserName:<value>
Possible values:
A non-empty string identifying an account in PortaBilling.
Example:
h323-ivr-in
= 'PortaBilling_UserName:16051233355'
PortaBilling_RatePattern
Possible values:
A non-empty string, usually a destination number in e.164 format.
Example:
h323-ivr-in
= 'PortaBilling_RatePattern:18001233355'
PortaBilling_AccessCode
Possible values:
A non-empty string, the same as for h323-ivrout=PortaBilling_AccessCode.
Example:
h323-ivr-in
= 'PortaBilling_AccessCode:18001234567'
PortaBilling_AccountBalance
19
Porta
Switch
Possible values:
A number with a precision of five decimal places.
Example:
h323-ivr-in
= 'PortaBilling_AccountBalance:13.20000'
PortaBilling_CustomerBalance
Possible values:
A number with a precision of five decimal places.
Example:
h323-ivr-in
= 'PortaBilling_CurstomerBalance:13.20000'
PortaBilling_CustomerCreditLimit
Possible values:
A number with a precision of five decimal places.
Example:
h323-ivr-in
= 'PortaBilling_CustomerCreditLimit:13.00000'
PortaBilling_CustomerCreditLimitThreshold
Possible values:
A number with a precision of five decimal places.
Example:
h323-ivr-in
=
'PortaBilling_CustomerCreditLimitThreshold:12.00000'
20
Porta
Switch
BalanceThreshold
Indicates that the customers balance warning threshold has been reached.
Format:
BalanceThreshold:<value>
Possible values:
YES
Example:
h323-ivr-in
= BalanceThreshold:YES'
PortaBilling_ProductBreakage
Possible values:
A number with a precision of five decimal places.
Example:
h323-ivr-in
= 'PortaBilling_ProductBreakage:0.02000'
PortaBilling_No_Disconnect_Warning
Indicates that NAS should cancel IVR/beep warnings before call session
timeouts (calls will be terminated silently).
Format:
PortaBilling_No_Disconnect_Warning:<value>
Possible values:
YES
Example:
h323-ivr-in
= PortaBilling_No_Disconnect_Warning:YES'
21
Porta
Switch
Explanation
code
success
invalid_account
invalid_password
account_in_use
zero_balance
card_expired
credit_limit
user_denied
not_available
cld_blocked
retries_exceeded
h323-return-code
0
1
2
3
4
5
6
7
8
9
10
invalid_argument
insuff_balance
toll_free_allowed
invalid_card
hairpin_to_pstn
11
12
13
14
50
redirect
51
redirect_to_cs
52
Description
Success, proceed
Failed - Invalid Account number
Failed - Invalid Password
Failed - Account in use
Failed - Zero balance
Failed - Card expired
Failed - Credit limit
Failed - User denied
Failed - Service not available
Failed - Called number blocked
Failed - Number of retries
exceeded
Failed - Invalid argument
Failed - Insufficient balance
Toll-free calls allowed
Failed - Invalid card number
Call will be hairpinned back to the
Public Switched Telephone
Network (PSTN)
Redirect to called party (use
redirect number)
Redirect to customer Service (use
redirect number)
22
Porta
Switch
PortaBilling API
2. PortaBilling API
23
Porta
Switch
PortaBilling API
Overview
PortaBilling allows you to perform operations such as data retrieval or
data modification via API using the following Web Application Services:
XML (SOAP) and JSON RPC.
ITSP A
(Environment A)
Porta
Billing
XML/JSON
API
Application X
HTTPS
Reseller of A
(Environment A)
Application
ITSP B
(Environment B)
Application Y
24
Porta
Switch
PortaBilling API
Security
Connection to the API interface is provided via HTTPS. Authentication is
done using a pair: a user login and either the API access token or the user
password for the administrative web interface. Each request to the API
should contain the AuthInfoStructure structure as the header attribute.
Note that we strongly recommend using the session_id property (which
must be received during the authorization via the login request) in the
AuthInfoStructure structure for all session requests. Otherwise, if you
use the login-password or the API access token authentication pairs for
every request, new sessions will be created and cause additional load to
the database.
XML API
XML/SOAP API has its own advantages and drawbacks as compared
with JSON API. Among the benefits are the following:
There is a wide range of reusable software available to
programmers to handle XML so they dont have to re-invent
code.
XML/SOAP is more verbose compared with JSON, but because
of this, the data encoding result is typically larger than the
equivalent encoding in JSON API.
Error Handling
SOAP faults are used to carry error information within a SOAP message.
If the actual response has a SOAP fault element as the body entry, then an
error has occurred. In this case, any other fields in the response cannot be
guaranteed as accurate; only the fault sub-elements should be used to
identify an error. Currently, these sub-elements are:
25
Porta
Switch
PortaBilling API
faultcode is intended for use by the client software and provides
an algorithmic mechanism for identifying the fault;
faultstring provides a human readable explanation of the fault,
and is not intended for algorithmic processing.
JSON API
As an alternative to XML API, PortaBillling supports JSON API, thus
providing your development department with a choice of Web
Application Services that can be used. Among the advantages of JSON
API are the following:
Simple data structures that can be easily read and written;
JSON format is faster in parsing and generating data due to
simple syntax, thus there is little influence on web server
performance;
Supports the same methods as those in the SOAP;
Simplifies the creation of front-end web sites that receive and
modify data in PortaBilling with minimum impact on
performance.
26
Porta
Switch
PortaBilling API
For HTTP requests you must include the following parameters (in JSON
format) in the POST request body:
auth_info The mandatory authentication information (see the
Security section);
params A set of method parameters (in JSON format) that
depend on a method structure. Note that method parameters and
their structures are the same as those in the SOAP;
Error Handling
If the server returns the 500 Internal Server Error status code in the
HTTP response, then the response body contains a JSON object which
includes two elements (keys) that carry error information:
faultcode, that is intended for use by the client software and
provides an algorithmic mechanism for identifying the fault;
faultstring, that provides a human readable explanation of the
fault, and is not intended for algorithmic processing.
Examples
You can find code samples for Perl for both XML (SOAP) and JSON
formats in the Appendices to the guide.
WSDL
Each installation of PortaBilling contains its own set of WSDL
documents available for download from the web server from the
following URL:
https://portabilling-web.yourdomain.com/wsdl/
27
Porta
Switch
PortaBilling API
Notation conventions
Methods
login
Parameters: LoginRequest
Return value: LoginResponse
Checks the validity of login and password or token and returns session_id
on success. API Fault is thrown on failure.
ping
Parameters: PingRequest
Return value: PingResponse
Checks the validity of previously opened session and returns user_id
on success. API Fault is thrown on failure.
logout
Parameters: LogoutRequest
Return value: no value is returned on success
28
Porta
Switch
PortaBilling API
Parameters: ResetPasswordRequest
Return value: ResetPasswordResponse
Realm: administrator, reseller, retail customer, account, cc staff
Allows an API user to reset the password and create a new one.
Type Reference
HeaderRequest structure
Property
auth_info
Type
AuthInfoStructure
Description
The user login for PortaBilling
web interface
AuthInfoStructure structure
Property
login
Type
string, 16 chars max
string
Description
The user login for PortaBilling
web interface
The user password for
PortaBilling web interface
The API access token of a user
Property
login
Type
string
string
Description
User Name, as specified on web
interface
Password, as specified on web
interface
The API access token of a user
Note that the token can only be
29
Porta
Switch
PortaBilling API
used for the administrative
interface (the admin realm)
LoginResponse structure
Property
session_id
Type
string, 32 chars
max
Description
The unique ID of the newly
opened session
PingRequest structure
Property
session_id
Type
string
Description
ID of previously opened session
PingResponse structure
Property
user_id
Type
int
Description
ID of user currently logged in to
the specified session
LogoutRequest structure
Property
session_id
Type
string
Description
ID of previously opened session
ResetPasswordRequest structure
Property
login
Type
string
email
custom_url
string
string
id
password
string
string
Description
The user login for the
PortaBilling web interface
The user email address
Optional link to the reset
password page. If not supplied
then the default PortaBilling
forgot password page url will
be sent
The reset password ID
A new password
ResetPasswordResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
30
Porta
Switch
PortaBilling API
Methods
get_version
Parameters: GetVersionRequest
Return value: GetVersionResponse
Realm: administrator
This method allows an API user to get the version of PortaBilling
version.
get_countries_list
Parameters: GetCountriesListRequest
Return value: GetCountriesListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of countries.
get_subdivisions_list
Parameters: GetSubdivisionsListRequest
Return value: GetSubdivisionsListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of country subdivisions for
a specific counry.
Parameters: GetGlobalCurrencyListRequest
Return value: GetGlobalCurrencyListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get information about all actual and
outdated world currencies.
get_global_currency_info
Parameters: GetGlobalCurrencyInfoRequest
Return value: GetGlobalCurrencyInfoResponse
Realm: administrator, reseller, retail customer, account
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
31
Porta
Switch
PortaBilling API
This method allows an API user to get information about a specific global
currency.
Parameters: GetXrateListRequest
Return value: GetXrateListResponse
Realm: administrator
This method allows an API user to get a list of all exchange rates used
within the system.
Parameters: GetTimeZoneListRequest
Return value: GetTimeZoneListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get information about time zones.
get_time_zone_info
Parameters: GetTimeZoneInfoRequest
Return value: GetTimeZoneInfoResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get information about a specific time
zone.
Parameters: GetBillingPeriodListRequest
Return value: GetBillingPeriodListResponse
Realm: administrator, reseller
This method allows an API user to get information about billing periods.
32
Porta
Switch
PortaBilling API
Type Reference
GetVersionRequest structure
Property
version
Type
string
Description
PortaBilling version
GetCountriesListRequest structure
Property
Type
countries_list Array of
CountryInfo
Description
Set of country data records
CountryInfo structure
Property
Type
iso_3166_1_a2 string
name
string
Description
A two-letter country code defined in
ISO 3166-1 alpha-2
Country name
GetSubdivisionsListRequest structure
Property
iso_3166_1_a2
Type
string
Description
A two-letter country code defined
in ISO 3166-1 alpha-2
GetSubdivisionsListResponse structure
Property
subdivisions_list
Type
Description
Array of
Set of country subdivision data
SubdivisionInfo records
SubdivisionInfo structure
Property
Type
i_country_subdivision int
name
iso_3166_1_a2
string
string
Description
A unique ID of country
subdivision
Subdivision name
A two-letter country code
defined in ISO 3166-1 alpha-2
33
Porta
Switch
PortaBilling API
iso_3166_2
string
A code of a principal
subdivision (e.g. province or
state)
Property
obsolete
Type
string
Description
Specifies what currency to fetch.
Possible values are:
all
actual
obsolete
GetGlobalCurrencyListResponse structure
Property
global_currency_list
Type
Array of
GlobalCurrencyI
nfo structures
Description
List of global currencies
GlobalCurrencyInfo structure
Property
name
iso_4217
iso_4217_num
decimal_digits
name_major **
name_minor **
obsolete
Type
string
string
Description
The currency name
ISO4217 alphabetic code, the unique
currency identifier
string ISO4217 numeric code, the unique
currency identifier
int
Maximum number of decimal places
allowed by the currency, e.g.
for US dollars or euros it will be 2, since
the smallest unit is one cent (0.01),
while for yen it will be 0, because
an amount in yens can only be an
integer
string Major name of the currency, e.g. dollar
(returned only in the response to the
"get" method)
string Minor name of the currency, e.g. cent,
(returned only in the response to the
get method)
string, Specifies whether this currency is
Y/N obsolete
34
Porta
Switch
PortaBilling API
GetGlobalCurrencyInfoRequest structure
Property
iso_4217
Type
string
Description
ISO4217 alphabetic code, the
unique currency identifier
GetGlobalCurrencyInfoResponse structure
Property
global_currency_info
Type
Description
GlobalCurrenc Complete information about
yInfo structure the global currency. See
above for more detail
Property
Type
iso_4217
string
only_active
int
limit
int
offset
int
get_total
int
Description
Specifies the currency in ISO4217
code for which to provide exchange
rates
Specifies whether to show only
active exchange rates
Number of exchange rates to
retrieve
Number of rows to skip at the
beginning of the list
Get total number of the retrieved
exchange rates
GetXrateListResponse structure
Property
exchange_rate_list
total
Type
Array of XrateInfo
structures
int
Description
Total number of the
retrieved exchange rate data
records
XrateInfo structure
Property
source**
timestamp**
Type
Description
Shows the exchange rate source for the
string
given currency as defined on the Currency
page
The effective date for the given exchange
dateTime
rate
35
Porta
Switch
PortaBilling API
iso_4217**
string
name**
string
base_iso_4217** string
base_units**
float
is_active**
int
Property
search
Type
string
Description
Pattern that allows to search by a
time zone name.
Use the following wildcard symbols:
The percentage ( % )
wildcard allows you to
match any string of zero or
more characters;
The underscore ( _ )
wildcard allows you to
match any single character
GetTimeZoneListResponse structure
Property
time_zone_list
Type
Array of
TimeZoneInfo
structures
Description
List of time zones.
TimeZoneInfo structure
Property
i_time_zone
Type
int
Description
The unique ID of the time zone
36
Porta
Switch
PortaBilling API
time_zone_name
string
GetTimeZoneInfoRequest structure
Property
i_time_zone
Type
int
Description
The unique ID of the time zone
GetTimeZoneInfoResponse structure
Property
time_zone_info
Type
TimeZoneInfo
structure
Description
Complete information
about the time zone. See
above for more detail
Property
Type
Description
billing_period_list Array of
The list of billing periods.
BillingPeriodInfo
BillingPeriodInfo structure
Property
i_billing_period
Type
int
description
string
Description
The unique ID of the billing
period.
The billing period description.
Methods
get_user_info
Parameters: GetUserInfoRequest
Return value: GetUserInfoResponse
Realm: administrator
37
Porta
Switch
PortaBilling API
Parameters: GetUserInfoListRequest
Return value: GetUserInfoListResponse
Realm: administrator
This method allows an API user to retrieve the list of administrative users.
add_user
Parameters: AddUserRequest
Return value: AddUserResponse
Realm: administrator
This method allows an API user to add an administrative user.
update_user
Parameters: UpdateUserRequest
Return value: UpdateUserResponse
Realm: administrator
This method allows an API user to update an existing administrative user.
delete_user
Parameters: DeleteUserRequest
Return value: DeleteUserResponse
Realm: administrator
This method allows an API user to delete an existing administrative user.
i_user
Property
Type
string
login
string
Description
The unique ID of the user
record
The username for login and
user identification
38
Porta
Switch
PortaBilling API
status **
string
password
description
string
string
email
activation_date
string
string
expiration_date
string
i_time_zone
int
out_date_format
out_time_format
out_date_time_format
in_date_format
in_time_format
i_acl
string
string
string
string
string
int
i_lang
string
companyname
string
salutation
firstname
midinit
lastname
baddr1
baddr2
baddr3
baddr4
baddr5
city
state
zip
country
cont1
phone1
faxnum
phone2
cont2
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
39
Porta
Switch
PortaBilling API
GetUserInfoRequest structure
Property
i_user
Type
Description
The unique ID of the user
record
int
GetUserInfoResponse structure
Property
user_info
Type
UserInfo
structure
Description
Complete information about the
user
GetUserInfoListRequest structure
Property
offset
Type
int
limit
search
int
string
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
Pattern that allows to search by
users personal information
(login, company name, first name,
last name, baddr1, baddr2, city,
zip, cont1, cont2, phone1,
phone2, email, description).
Use the following wildcard
symbols:
The percentage ( % )
wildcard allows you to
match any string of zero
or more characters;
The underscore ( _ )
wildcard allows you to
match any single character
GetUserInfoListResponse structure
Property
user_list
Type
Array of UserInfo
structures
Description
Set of user data records
AddUserRequest structure
Property
user_info
Type
UserInfo structure
Description
Complete information
about the user
40
Porta
Switch
PortaBilling API
AddUserResponse structure
Property
Type
i_user
Description
The unique ID of
the user record
int
UpdateUserRequest structure
Property
user_info
Type
UserInfo structure
Description
Complete information
about the user
UpdateUserResponse structure
Property
i_user
Type
int
Description
The unique ID of the user
record
DeleteUserRequest structure
Property
i_user
Type
int
Description
The unique ID of the user record
DeleteUserResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
Methods
get_currency_info
Parameters: GetCurrencyInfoRequest
Return value: GetCurrencyInfoResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get information about a currency
created in PortaBilling.
get_currency_list
Parameters: GetCurrencyListRequest
41
Porta
Switch
PortaBilling API
Parameters: AddCurrencyRequest
Return value: AddCurrencyResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to add a currency.
delete_currency
Parameters: DeleteCurrencyRequest
Return value: DeleteCurrencyResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to delete a currency.
update_currency
Parameters: UpdateCurrencyRequest
Return value: UpdateCurrencyResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to update a currency.
Type Reference
CurrencyInfo structure
Property
iso_4217
name
name_major
Type
string
string
string
name_minor
string
i_x_rate_source
int
Description
Currency ISO4217 code
Currency name
The main currency unit, e.g.
dollar
The lesser currency unit (if
applicable), e.g. cent
Defines the method of
entering the exchange rate for
this currency. Refers to the
X_Rate_Source table
42
Porta
Switch
PortaBilling API
i_ma_currency
int
i_merchant_account
int
base_units
float
min_allowed_payment
float
GetCurrencyInfoRequest structure
Property
iso_4217
i_ma_currency
Type
string
int
Description
Currency ISO4217 code
The unique merchant account
currency identifier.
GetCurrencyInfoResponse structure
Property
currency_info
Type
CurrencyInfo
structure
Description
Complete information about the
Currency
GetCurrencyListRequest structure
Property
offset
Type
int
limit
int
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
43
Porta
Switch
search
PortaBilling API
string
GetCurrencyListResponse structure
Property
Currency_list
Type
Array of
CurrencyInfo
structures
Description
Set of Currency data
records
AddCurrencyRequest structure
Property
currency_info
Type
CurrencyInfo
structure
Description
Complete information
about the Currency
AddCurrencyResponse structure
Property
iso_4217
string
Type
i_ma_currency
int
Description
The unique ID of
the Currency record
The unique merchant
account currency
identifier
UpdateCurrencyRequest structure
Property
currency_info
Type
CurrencyInfo
structure
Description
Complete information
about the Currency
UpdateCurrencyResponse structure
Property
iso_4217
Type
string
i_ma_currency
int
Description
The unique ID of
the Currency record
The unique merchant
account currency
identifier
44
Porta
Switch
PortaBilling API
DeleteCurrencyRequest structure
Property
iso_4217
Type
string
i_ma_currency
int
Description
The unique ID of the Currency
record
The unique merchant account
currency identifier
DeleteCurrencyResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
Methods
get_destination_info
Parameters: GetDestinationPrefixInfoRequest
Return value: GetDestinationPrefixInfoResponse
Realm: administrator
This method allows an API user to get information about a destination.
get_destination_list
Parameters: GetDestinationPrefixListRequest
Return value: GetDestinationPrefixListResponse
Realm: administrator
This method allows an administrator to retrieve the list of destinations.
match_destination_groups
Parameters: MatchDestinationGroupsRequest
Return value: MatchDestinationGroupsResponse
Realm: administrator
This method allows an administrator to locate a destination group by
tariff and phone number.
45
Porta
Switch
PortaBilling API
add_destination
Parameters: AddDestinationPrefixRequest
Return value: AddDestinationPrefixResponse
Realm: administrator
This method allows an API user to add a destination.
update_destination
Parameters: UpdateDestinationPrefixRequest
Return value: UpdateDestinationPrefixResponse
Realm: administrator
This method allows an API user to update an existing destination.
get_dest_group_set_list
Parameters: GetDestGroupSetListRequest
Return value: GetDestGroupSetListResponse
Realm: administrator
This method allows an API user to get a list of destination group sets.
add_dest_group_set
Parameters: AddUpdateDestGroupSetRequest
Return value: AddUpdateDestGroupSetResponse
Realm: administrator
This method allows an API user to add a destination group set.
delete_dest_group_set
Parameters: DeleteDestGroupSetRequest
Return value: DeleteDestGroupSetResponse
Realm: administrator
This method allows an API user to delete a destination group set.
update_dest_group_set
Parameters: UpdateDestGroupSetRequest
Return value: UpdateDestGroupSetResponse
Realm: administrator
This method allows an API user to update a destination group set.
46
Porta
Switch
PortaBilling API
get_dest_group_list
Parameters: GetDestGroupListRequest
Return value: GetDestGroupListResponse
Realm: administrator
This method allows an API user to get a list of destination groups.
add_dest_group
Parameters: AddDestGroupRequest
Return value: AddDestGroupResponse
Realm: administrator
This method allows an API user to add a destination group.
delete_dest_group
Parameters: DeleteDestGroupRequest
Return value: DeleteDestGroupResponse
Realm: administrator
This method allows an API user to delete a destination group.
update_dest_group
Parameters: UpdateDestGroupRequest
Return value: UpdateDestGroupResponse
Realm: administrator
This method allows an API user to update an existing destination group.
get_dest_group_info
Parameters: GetDestGroupInfoRequest
Return value: GetDestGroupInfoResponse
Realm: administrator
This method allows an API user to get information about a destination
group.
Type Reference
AddDestinationPrefixRequest structure
Property
destination_info
Type
Description
DestinationPrefixInfo Complete information
structure
about the destination; for
more information, see
below
47
Porta
Switch
PortaBilling API
AddDestinationPrefixResponse structure
Property
i_dest
Type
int
Description
The unique ID of
a destination record
UpdateDestinationPrefixRequest structure
Property
destination_info
Type
Description
DestinationPrefixInfo Complete information
structure
about the destination; for
more information, see
below
UpdateDestinationPrefixResponse structure
Property
i_dest
Type
int
Description
The unique ID of
a destination record
GetDestinationPrefixInfoRequest structure
Property
i_dest
Type
int
Description
The unique ID of a destination
record
GetDestinationPrefixInfoResponse structure
Property
destination_info
Type
Description
DestinationPrefixInfo Complete information
structure
about the destination; for
more information, see
below
DestinationPrefixInfo structure
Property
Type
i_dest
int
destination
country
subdivision
description
dest_type
iso_3166_1_a2
string, max
16 chars
string
string
string
string
string
iso_3166_1_a3
string
Description
The unique ID of
the destination record
Destination number
Country name
Country subdivision
Text description for this entry
Destination type
A two-letter country code
defined in ISO 3166-1 alpha-2
A three-letter country code
defined in ISO 3166-1 alpha-3
48
Porta
Switch
PortaBilling API
i_country_subdivision int
GetDestinationPrefixListRequest structure
Property
offset
Type
int
limit
destination
int
string, max. 16
chars
order_by_destination string
get_total
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
Refers to the pattern of the
destination prefix
Specifies whether to sort
destinations:
1 descending order
0 ascending
If this field is empty then
destinations will be sorted by
the i_dest field
Get total number of the
retrieved destination prefixes
int
GetDestinationPrefixListResponse structure
Property
destination_list
total
Type
Description
Array of
Set of destination data
DestinationPrefixInfo records
structures
int
Total number of the
retrieved destination data
records
MatchDestinationGroupsRequest structure
Property
i_tariff
int
Type
number
string
get_prefixes_list
int, 0/1
(default 0)
Description
The unique ID of the special tariff
containing destination groups
A caller number for searching the
appropriate destination group in
the tariff
This indicates whether the list
of destinations included in this
group will be retrieved: 0
retrieve, 1 do not retrieve
49
Porta
Switch
PortaBilling API
MatchDestinationGroupsResponse structure
Property
dest_group_list
Type
Description
Array of
Set of destination group
DestinationGroupInfo data records
structures
DestinationGroupInfo structure
Property
name
description
i_dest_group
i_dest_group_set
Type
string
string
int
int
prefixes
string
used
int
Description
The destination group name
The destination group description
The unique ID of the destination group
The unique ID of the destination group
set to which the current destination
group belongs
Comma separated list of destinations
included in the current destination
group
Shows whether the destination group
set is used
GetDestGroupSetListRequest structure
Property
Type
name
string
limit
int
offset
int
get_total
int
Description
Search pattern in the names of
destination group sets
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
Get total number of the retrieved
destination group sets
GetDestGroupSetListResponse structure
Property
Type
Description
Array of
Set of destination group set
dest_group_set_list DestGroupSetInfo data records
structures
Total number of the
total
int
retrieved destination group
sets
AddUpdateDestGroupSetRequest structure
Property
Type
Description
50
Porta
Switch
PortaBilling API
Complete information
Array of
about the destination group
dest_group_set_info DestGroupSetInfo
set; for more information,
structure
see below
AddUpdateDestGroupSetResponse structure
Property
i_dest_group_set
Type
int
Description
The unique ID of
the destination group set
DestGroupSetInfo srtucture
Property
i_dest_group_set
Type
int
name
string
used
int
Description
The unique ID of
the destination group set
The destination group
set name
Shows whether the
destination group set is used
DeleteDestGroupSetRequest structure
Property
i_dest_group_set
Type
int
Description
The unique ID of
the destination group set
DeleteDestGroupSetResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in
case of failure
DestGroupSetInfo structure
Property
Type
i_dest_group_set **
int
name
string
used **
int
Description
The unique ID of a destination group
set record
The destination group set name
Shows whether the destination group
set is used
GetDestGroupListRequest structure
Property
i_dest_group_set
name
Type
Description
The unique ID of a destination group set
int
record
Search pattern in the names of destination
string
groups
51
Porta
Switch
prefix
limit
offset
get_total
PortaBilling API
Prefix by which to search destination
groups. Note that if you provide both name
string
and prefix properties, then search will
be done only by name
int
Number of rows to retrieve
Number of rows to skip at the beginning of
int
the list
Get total number of the retrieved
int
destination groups
GetDestGroupListResponse structure
Property
Type
Description
Array of
Set of destination group
dest_group_list DestinationGroupInfo data records
structures
Total number of the
total
int
retrieved destination groups
AddDestGroupRequest structure
Property
i_dest_group_set int
Type
name
string
add_destinations
Array of Int
Description
The unique ID of
the destination group set
The destination group
name
List of destinations to be
added to the destination
group
AddDestGroupResponse structure
Property
i_dest_group
Type
int
Description
The unique ID of
the destination group
DeleteDestGroupRequest structure
Property
i_dest_group
Type
int
Description
The unique ID of
the destination group
DeleteDestGroupResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in
case of failure
52
Porta
Switch
PortaBilling API
UpdateDestGroupRequest structure
Property
i_dest_group
Type
int
name
string
add_destinations
Array of Int
Description
The unique ID of
the destination group
The destination group
name
List of destinations to be
added to the destination
group
List of destinations to be
removed from the
destination group
UpdateDestGroupResponse structure
Property
i_dest_group
Type
int
Description
The unique ID of
the destination group
GetDestGroupInfoRequest structure
Property
Type
i_dest_group
int
prefix
string
country
string
description
string
limit
int
offset
int
get_total
int
Description
The unique ID of the destination
group record
The prefix by which to search
destinations. Note that the search
parameters prefix, country and description
are exclusive with the following
priority:
prefix->country->description. E.g.,
if you provide both prefix
and country properties, then search
will be done only by the prefix
The country to search destinations
Destination description to search
destinations
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
Get the total number of the retrieved
destinations
GetDestGroupInfoResponse structure
Property
name
Type
string
Description
The destination group
name
53
Porta
Switch
destination_list
total
PortaBilling API
Array of
Set of destination data
DestinationPrefixInfo records
structures
The total number of the
int
retrieved destinations
Tariff Information
get_tariff_info
Parameters: GetTariffInfoRequest
Return value: GetTariffInfoResponse
Realm: administrator, reseller
This method allows an API user to get information about a tariff.
get_tariff_list
Parameters: GetTariffListRequest
Return value: GetTariffListResponse
Realm: administrator, reseller
This method allows an API user to retrieve the list of tariffs.
add_tariff
Parameters: AddTariffRequest
Return value: AddTariffResponse
Realm: administrator
This method allows an API user to add a tariff.
update_tariff
Parameters: UpdateTariffRequest
Return value: UpdateTariffResponse
Realm: administrator
This method allows an API user to update an existing tariff.
delete_tariff
Parameters: DeleteTariffRequest
54
Porta
Switch
PortaBilling API
Property
i_tariff
Type
int
Description
The unique ID of the tariff
record
GetTariffInfoResponse structure
Property
tariff_info
Type
TariffInfo structure
Description
Complete information
about the tariff; for more
information, see below
TariffInfo structure
Property
i_tariff
name
period
i_offpeak
Type
int
string
string
int
currency
free_sec
string
int
connect_fee
float
login_fee
float
description
post_call_surcharge
string
float
i_tariff_template_upload
int
i_tariff_template_download int
i_customer
int
short_description
string
Description
ID of the tariff record
Tariff name
Discontinued.
Refers to ID of the off_peak
period record
Tariff currency
Number of free seconds
granted for each call
Amount to be charged for
each successful call
Amount to be charged
immediately after the first user
authentication
Tariff description
Increases the total call cost by
the given value
Refers to ID of the upload
template
Refers to ID of download
template
ID of Customer Record
(managed by)
Short tariff description
55
Porta
Switch
PortaBilling API
routing_ext
string
volume_based
string
i_dest_group_set
int
rounding
int
formula
string
rating_mode
i_service
string
int
type
string
hidden
usage_update
string
string
GetTariffListRequest structure
Property
offset
Type
int
limit
search
int
string
i_customer
int
i_service
int
applied_to
string
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
Search pattern in the name
and description of the tariff
The unique ID of the customer
record (managed by)
The unique ID of the service
record
One of the following:
Customer
Vendor
Reseller
56
Porta
Switch
PortaBilling API
GetTariffListResponse structure
Property
tariff_list
Type
Array of TariffInfo
structures
Description
Set of tariff data records
AddTariffRequest structure
Property
tariff_info
Type
Description
TariffInfo structure Complete information
about the tariff; for
more information, see
below
AddTariffResponse structure
Property
Type
i_tariff
int
Description
The unique ID of
the tariff record
UpdateTariffRequest structure
Property
tariff_info
Type
TariffInfo structure
Description
Complete information
about the tariff; for more
information, see below
UpdateTariffResponse structure
Property
i_tariff
Type
int
Description
The unique ID of
the tariff record
DeleteTariffRequest structure
Property
i_tariff
Type
int
Description
The unique ID of
the tariff record
DeleteTariffResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in
case of failure
Parameters: GetOverrideTariffRequest
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
57
Porta
Switch
PortaBilling API
Parameters: GetOverrideTariffListRequest
Return value: GetOverrideTariffListResponse
Realm: administrator, reseller
This method allows an API user to retrieve the list of override tariffs for a
customer.
add_override_tariff
Parameters: AddUpdateOverrideTariffRequest
Return value: AddUpdateOverrideTariffResponse
Realm: administrator, reseller
This method allows an API user to add an override tariff rule.
update_override_tariff
Parameters: AddUpdateOverrideTariffRequest
Return value: AddUpdateOverrideTariffResponse
Realm: administrator, reseller
This method allows an API user to update an existing override tariff rule.
delete_override_tariff
Parameters: DeleteOverrideTariffRequest
Return value: DeleteOverrideTariffResponse
Realm: administrator, reseller
This method allows an API user to delete an existing override tariff rule.
Property
Type
i_customer_override_tariff int
i_original_tariff
int
Description
The unique override tariff
rule ID
The unique ID of the
original tariff
58
Porta
Switch
PortaBilling API
GetOverrideTariffResponse structure
Property
override_tariff
Type
OverrideTariffInfo
structure
Description
Complete information
about the override tariff
rule; for more information,
see below
OverrideTariffInfo structure
Property
i_customer *
Type
int
i_customer_override_tariff
int
i_tariff_original
int
original_tariff_name
i_tariff_override
string
int
override_tariff_name
string
Description
The unique ID of the
customer record (managed by)
The unique override tariff
ruleID. This field is only used
for update request
The unique ID of the original
tariff
The original tariff name
The unique ID of the override
tariff
The override tariff name
GetOverrideTariffListRequest structure
Property
i_customer
Type
int
offset
int
limit
int
Description
The unique ID of the
customer record for
retrieving the override tariff
list
Number of rows to skip at
the beginning of the list
Number of rows to retrieve
GetOverrideTariffListResponse structure
Property
Type
override_tariff_list Array of
OverrideTariffInfo
structures
Description
Complete information
about the override tariff
list; for more information,
see below
AddUpdateOverrideTariffRequest structure
Property
override_tariff_info
Type
Description
OverrideTariffInfo Complete information
structure
about the override
tariff rule; for more
information, see below
59
Porta
Switch
PortaBilling API
AddUpdateOverrideTariffResponse structure
Property
i_customer_override_tariff int
Type
Description
The unique override
tariff rule ID
DeleteOverrideTariffRequest structure
Property
i_customer_override_tariff int
Type
Description
The unique ID of an
override tariff rule to
be deleted
DeleteOverrideTariffResponse structure
Property
override_tariff_deleted
Type
int
Description
Specifies whether the
override tariff was
deleted: 1 one tariff
was deleted, 0 nothing
was deleted
Parameters: GetResaleMapListRequest
Return value: GetResaleMapListResponse
Realm: reseller
This method allows an API user (reseller) to retirieve the list of mappings
between resellers wholesale and resale tariffs.
get_resale_map_record
Parameters: GetResaleMapRecordRequest
Return value: GetResaleMapRecordResponse
Realm: reseller
This method allows an API user (reseller) to retrieve mapping between a
resellers wholesale and resale tariffs.
60
Porta
Switch
PortaBilling API
update_resale_map_record
Parameters: UpdateResaleMapRecordRequest
Return value: UpdateResaleMapRecordResponse
Realm: reseller
This method allows an API user (reseller) to update mapping between a
resellers wholesale and resale tariffs.
Property
i_customer
Type
int
Description
The unique ID of the reseller record:
If this field is provided, then the list
of mappings between the resellers
wholesale and resale tariffs is
retrieved;
If this field is not provided, then the
list of wholesale tariffs (which should
be mapped onto resale tariffs) will be
retrieved
GetResaleMapListResponse structure
Property
resale_map_list
Type
Description
array of
The list of mappings
ResaleMapRecordInfo between the resellers
structures
wholesale and resale
tariffs
GetResaleMapRecordRequest structure
Property
i_resale_tariff_mapping
Type
int
Description
The unique ID of the tariff
mapping record
GetResaleMapRecordResponse structure
Property
Type
Description
resale_map_record_info ResaleMapRecordInfo Complete
structure
information about
the mapping
between resellers
wholesale and
resale tariffs
61
Porta
Switch
PortaBilling API
ResaleMapRecordInfo structure
Property
i_resale_tariff_mapping
Type
int
i_customer
int
i_tariff_buy
int
i_tariff_sell
int
currency
i_service_type
string
int
buying_tariff_name
string
selling_tariff_name
string
description
string
Description
The unique ID of the tariff
mapping record
The unique ID of the reseller
record
The unique ID of the wholesale
tariff record (according to which
the reseller is billed by a higher
level reseller or service provider)
The unique ID of the resale tariff
record (the one that the reseller
charges their subresellers)
Shows the resale tariff currency
The unique ID of the related
service type
The name of the wholesale tariff
record (according to which the
reseller is billed by a higher level
reseller or service provider)
The name of the resale tariff
record (the one that the reseller
charges their subresellers)
The resale tariff description
UpdateResaleMapRecordRequest structure
Property
i_resale_tariff_mapping
int
Type
i_tariff_sell
int
Description
The unique ID of the tariff
mapping record
The unique ID of the resale
tariff record (the one that
the reseller charges their
subresellers)
UpdateResaleMapRecordResponse structure
Property
i_resale_tariff_mapping int
Type
Description
The unique ID of the
tariff mapping record
62
Porta
Switch
PortaBilling API
Methods
get_env_info
Parameters: GetEnvInfoRequest
Return value: GetEnvInfoResponse
Realm: administrator
This method allows an API user to get an Environment record from the
database. The user can get the information about the Environment to
which he belongs. Superusers can get information about any
Environment.
update_env
Parameters: UpdateEnvInfoRequest
Return value: UpdateEnvInfoResponse
Realm: administrator
This method allows an API user to update an Environment record in the
database.
Type Reference
GetEnvInfoRequest structure
Property
env_info
Type
EnvInfo structure
Description
Complete information about the
Environment; for more
information, see EnvInfo
UpdateEnvInfoRequest structure
Property
env_info
Type
EnvInfo structure
Description
Complete information about the
Environment; for more
information, see EnvInfo
UpdateEnvInfoResponse structure
Property
i_env
Type
int
Description
The unique ID of the environment
63
Porta
Switch
PortaBilling API
EnvInfo structure
Property
i_env
name
description
Type
int
string
string
Description
The unique ID of the environment
The name of the environment
A short description for the
environment
companyname
string
addr1
addr2
addr3
addr4
iso_3166_1_a2
string
string
string
string
string
phone
faxnum
email
web
lname
string
string
string
string
string
laddr1
string
laddr2
string
lcity
string
i_country_subdivision
int
lzip
string
liso_3166_1_a2
string
tax_id
iso_4217
string
string
i_billing_period
int
i_time_zone
int
64
Porta
Switch
calls_counted_time
billed_to
tax_info
i_number_scope
PortaBilling API
dateTime
dateTime
string
int
Parameters: GetCustomerInfoRequest
Return value: GetCustomerInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get a customer record from the
database. The customer must be viewable (owned) by the user making the
request.
validate_customer_info
Parameters: ValidateCustomerInfoRequest
Return value: ValidateCustomerInfoResponse
Realm: administrator, reseller, distributor
This method allows an API user to check if the supplied data can be used
to create a new customer record or update an existing one.
65
Porta
Switch
PortaBilling API
get_customer_list
Parameters: GetCustomerListRequest
Return value: GetCustomerListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get a list of customer records. The
customer must be viewable (or owned) by the user making the request.
add_customer
Parameters: AddCustomerRequest
Return value: AddUpdateCustomerResponse
Realm: administrator, reseller, distributor
This method allows an API user to create a new customer record using
the supplied data.
update_customer
Parameters: UpdateCustomerRequest
Return value: AddUpdateCustomerResponse
Realm: administrator, reseller, retail customer, distributor
This method allows an API user to update an existing customer record
using the supplied data.
terminate_customer
Parameters: TerminateCustomerRequest
Return value: TerminateCustomerResponse
Realm: administrator, reseller
This method allows an API user to terminate an existing retail customer
or reseller.
delete_customer
Parameters: DeleteCustomerRequest
Return value: DeleteCustomerResponse
Realm: administrator, reseller
This method allows an API user to delete an existing retail customer or
reseller, provided it has no accounts, subcustomers, CDRs or managed
objects.
change_password
Parameters: ChangeCustomerPasswordRequest
Return value: ChangePasswordResponse
66
Porta
Switch
PortaBilling API
Parameters: SuspendCustomerRequest
Return value: SuspendCustomerResponse
Realm: administrator, reseller
This method allows to suspend all services to a retail customer, reseller or
distributor.
unsuspend_customer
Parameters: UnsuspendCustomerRequest
Return value: UnsuspendCustomerResponse
Realm: administrator, reseller
This method allows to unsuspend all services to a retail customer, reseller
or distributor.
Type
int
refnum
string,
32 chars
max
string,
41 chars
max
string
name
login
get_time_zone_name int
get_main_office_info int
Description
The unique ID of the customer
record
Reference number (custom field)
The ID of the customer on the
PortaBilling interface, unique in the
environment
User Name, as specified on web
interface
If set to 1, the customers time zone
will be provided in the response;
refers to Time_Zones table
If set to 1, information will be
provided for the requested Branch
Office (site) customer about the
Main Office (HQ) customer which
is linked with it
67
Porta
Switch
PortaBilling API
get_rt_auth_info
int
GetCustomerInfoResponse structure
Property
customer_info
Type
CustomerInfo
structure
main_office_info CustomerInfo
structure
Description
Complete information about a
customer; for more information,
see below
Complete information about the
Main Office (HQ) customer,
linked with this subordinate one
ValidateCustomerInfoRequest structure
Property
customer_info
Type
Description
CustomerInfo Complete information about a
customer; note: omit i_customer to
check if data can be used to create a
new customer record
ValidateCustomerInfoResponse structure
Property
customer_info
Type
Description
CustomerInfo Data about a customer, see
CustomerInfo above
GetCustomerListRequest structure
Property
offset
Type
int
limit
name
i_parent
int
string
int
i_customer_type
int
i_main_customer int
get_total
int
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
Refers to the customer name
The unique ID of the reseller
who manages the customer
Customer type: 1 (retail
customer or subcustomer), 2
(reseller), 3 (distributor)
The unique ID of the main
customer (Main Office (HQ)
customer) record within one
linked customers group
Get the total number of the
retrieved customers
68
Porta
Switch
PortaBilling API
GetCustomerListResponse structure
Property
customer_list
total
Type
array of CustomerInfo
structures
int
Description
Set of customer data
records
The total number of the
retrieved customers
AddCustomerRequest structure
Property
customer_info
Type
Description
CustomerInfo Notes: i_customer will be ignored;
most fields may be omitted, but
iso_4217 and name are mandatory;
for reseller API users, the
i_customer_type and i_parent fields
will be replaced with predefined
values; default customer class will
be set in case if i_customer_class
is not defined
UpdateCustomerRequest structure
Property
customer_info
**
Type
Description
CustomerInfo Note: i_customer is a mandatory
field; fields not requiring modification
may be omitted; the iso_4217,
i_customer_type, i_parent and
opening_balance fields are read-only
AddUpdateCustomerResponse structure
Property
i_customer
Type
int
Description
ID of created / modified customer record
TerminateCustomerRequest structure
Property
i_customer
Type
int
Description
ID of customer record to be terminated
TerminateCustomerResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
DeleteCustomerRequest structure
Property
i_customer
Type
int
Description
ID of customer record to be deleted
69
Porta
Switch
PortaBilling API
DeleteCustomerResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
CustomerInfo structure
Property
i_customer *
refnum
name
Type
int
string, 32 chars
max
string, 41 chars
max
i_customer_type *
int
i_parent *
int
i_distributor
int
override_tariffs_ena string
bled
iso_4217 *
string, 3 chars
opening_balance *
i_billing_period
float (with 5
decimal places)
float (with 5
decimal places)
int
i_acl
int
balance **
Description
The unique ID of the
customer record
Reference number (custom
field)
The ID of the customer on
the PortaBilling interface,
unique in the billing
environment
Customer type: 1 (retail
customer or subcustomer), 2
(reseller), 3 (distributor)
0 for a direct customer, or
i_customer of the reseller
for a subcustomer
The unique ID of the
distributor record associated
with the customer
Specifies whether the
Override Tariffs feature is
enabled:
Y - enabled, N - disabled
ISO4217 code for currency
in which the customer is
billed
Customers initial balance
Customers balance
The unique ID of the
customers billing period;
refers to the Billing_Period
table
The unique ID of the
customers access level;
refers to the Access_Levels
table
70
Porta
Switch
PortaBilling API
i_routing_plan
int
i_vd_plan
int
i_moh
int
i_customer_class
int
i_tariff
int
i_tariff_incoming
int
i_template
int
i_rep
int
i_time_zone
int
i_ui_time_zone
int
71
Porta
Switch
PortaBilling API
ui_time_zone_nam
e
string
i_lang
string
service_flags**
string, 32 chars
max
rt_auth_info
companyname
salutation
firstname
midinit
lastname
baddr1
baddr2
baddr3
baddr4
baddr5
city
state
zip
RTAuthInfo
structure
string, 41 chars
max
string, 15 chars
max
string, 120 chars
max
string, 5 chars max
string, 120 chars
max
string, 41 chars
max
string, 41 chars
max
string, 41 chars
max
string, 41 chars
max
string, 41 chars
max
string, 31 chars
max
string, 21 chars
max
string, 13 chars
max
72
Porta
Switch
country
note
notepad
faxnum
cont1
phone1
cont2
phone2
email
bcc
login
password
tax_id
credit_limit
credit_limit_warnin
g
PortaBilling API
string, 31 chars
max
string, 41 chars
max
string
string, 21 chars
max
string, 120 chars
max
string, 21 chars
max
string, 120 chars
max
string, 21 chars
max
string, 99 chars
max
string, 99 chars
max
string, 16 chars
max
string, 16 chars
max
string, 16 chars
max
float (with 5
decimal places)
Country
Short note (description)
When making changes in
the customer record, the
administrator can use the
Notepad tab to provide a
comment detailing the
reason for these changes
(for example, product
changed, credited $50)
Fax number
Main contact person
Main phone number
Alternative contact person
Alternative phone number
Email address
BCC email address
Customers login for selfcare web interface
Customers password for
self-care web interface
Tax ID
Customers credit limit value
Note that this property may
be used with the nil
attribute set to true, in
which case the credit limit
will not be enforced
Balance threshold value for
sending warnings; assigned
either an absolute value or a
positive relative value with a
% sign
73
Porta
Switch
PortaBilling API
temp_credit_limit
int
credit_limit_until
dateTime, ISO
format
perm_credit_limit
float (with 5
decimal places)
string
suspend_on_insuff
_funds
send_statistics
string (F, S or N)
send_invoices *
string (Y/N )
blocked
callshop_enabled
string (Y/N )
string (Y/N)
bp_charge_cc
string (Y/N)
74
Porta
Switch
PortaBilling API
O customer is open
S customer is
suspended due to an
overdue invoice
C customer is closed
due to an unpaid invoice
max_abbreviated_le int
Maximum allowed length of
ngth
customers abbreviated
numbers; applies to retail
customers only
discount_rate
float (with 5
Value of customers
decimal places)
subscription discount; a
percentage
out_date_format
string, 16 chars
Output format for date
max
indication on customers
self-care interface
out_time_format
string, 16 chars
Output format for time
max
indication
out_date_time_for string, 16 chars
Output format for full
mat
max
date/time indication
in_date_format
string, 16 chars
Input format for date
max
indication
in_time_format
string, 16 chars
Input format for time
max
indication
creation_date *
dateTime, ISO
Date and time when the
format
customer was created
service_features
array of
Contains service feature
ServiceFeatureInf values for the given
o structures
customer
payment_method_i PaymentMethodI Payment method info to be
nfo
nfo
assigned to the customer
being created / updated.
Used in add_customer /
update_customer
sale_commission_ra float
The commission applied
te
when an account is created
or a distributor is assigned
(only applicable to
distributor)
payment_commissi float
The commission applied
on_rate
when payment is entered
(only applicable to
distributor)
bill_suspension_del int
Shows whether suspension
ayed
of customers services has
been delayed
bill_status *
75
Porta
Switch
PortaBilling API
credit_exceed
int
i_do_batch
int
new_i_billing_perio
d
int
new_i_time_zone
int
scheduled_billing_c
hange
date
shifted_billing_date
has_custom_fields
int
i_balance_control_t
ype
int
i_main_office
int
i_office_type
int
subreseller_status
int
76
Porta
Switch
PortaBilling API
DialingRuleOptionsInfo structure
Property
cc
ac
ia
Type
string
string
int, 1
op
nl
ct
string, 7
chars max
string, 7
chars max
string, 7
chars max
string, 30
chars max
string, 30
chars max
string, 30
chars max
int
int, 1
cs
int, 1
csdr
int, 0/1
css
int, 0/1
csp
string
csps
string
csl
string
dp
ip
em
ex
nex
Description
Country code
Area code(s)
1 Always dial the area code as part of the
number
Prefix for accessing the outside phone
network
Prefix for domestic calls outside area code
International dialing prefix
Emergency numbers; comma-separated list
Exceptions; comma-separated list
National Exceptions; comma-separated list
Local dialing number length
1 convert ANI (CLI) for incoming calls
into this dialing format
Carrier selection is enabled / disabled for
customer
Whether to apply the customer dialing rules
to a number follows after the selection code
Whether to strip selection code after the
Routing Plan selection or not
Pattern or a list of selection codes allowed
for the customer
Allow or reject the destinations dialed
without the selection code
Local carrier code for stripping Selection
Code from CLD
ChangeCustomerPasswordRequest structure
Property
new_password
old_password
i_customer
Type
string
string
int
Description
New password
Old password
The unique ID of the
customer record
ChangePasswordResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in
case of failure
77
Porta
Switch
errors
PortaBilling API
ChangePasswordResponseErr Error explanation
Messages structure
SuspendCustomerRequest structure
Property
i_customer
Type
int
Description
The unique ID of the customer record
SuspendCustomerResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
UnsuspendCustomerRequest structure
Property
i_customer
Type
int
Description
The unique ID of the customer record
UnsuspendCustomerResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
Parameters: GetCustomerSubscriptionsRequest
Return value: GetCustomerSubscriptionsResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of subscription records
associated with a customer.
add_subscription
Parameters: AddCustomerSubscriptionRequest
Return value: AddUpdateCustomerSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to create a new subscription and assign it
to a customer. If successful, a new subscription ID is returned.
update_subscription
Parameters: UpdateCustomerSubscriptionRequest
Return value: AddUpdateCustomerSubscriptionResponse
Realm: administrator, reseller
78
Porta
Switch
PortaBilling API
Parameters: ActivateCustomerSubscriptionsRequest
Return value: ActivateCustomerSubscriptionsResponse
Realm: administrator, reseller
This method allows an API user to instantly activate a customers pending
subscriptions, where the start date is equal to todays date (in the
customers time zone). An activation fee will be charged for each
subscription, if applicable.
close_subscription
Parameters: CloseDeleteCustomerSubscriptionRequest
Return value: CloseCustomerSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to close an existing active subscription
assigned to a customer. It requires an ID number returned, for example,
by the add_subscription method.
delete_subscription
Parameters: CloseDeleteCustomerSubscriptionRequest
Return value: DeleteCustomerSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to delete a pending subscription assigned
to a customer. It requires an ID number returned, for example, by the
add_subscription method.
charge_subscription_fees
Parameters: ChargeCustomerSubscriptionFeesRequest
Return value: ChargeCustomerSubscriptionFeesResponse
Realm: administrator
This method enables an administrator to immediately charge all of a
customers active subscriptions (e.g. if you have just applied a subscription
to a customer with a daily billing period). Otherwise, it will be done
automatically within the hour.
79
Porta
Switch
PortaBilling API
Property
i_customer
Type
int
Description
ID of customer record
GetCustomerSubscriptionsResponse structure
Property
subscriptions
Type
array of
CustomerSubscriptionInfo
structures
Description
Set of customer
subscription data
records
AddCustomerSubscriptionRequest structure
Property
i_customer
subscription_info
Type
int
CustomerSub
scriptionInfo
Description
ID of customer record
Note: i_customer_subscription
will be ignored; i_subscription is a
mandatory field, and must be
unique among all of the
customers pending and active
subscriptions
UpdateCustomerSubscriptionRequest structure
Property
Type
i_customer
int
i_customer_subscription int
subscription_info
Description
ID of customer record
ID of customer subscription
record to be updated
CustomerSub Note:
scriptionInfo i_customer_subscription
and i_subscription will be
ignored
AddUpdateCustomerSubscriptionResponse structure
Property
Type
i_customer_subscription int
Description
ID of created / modified
customer subscription record
CustomerSubscriptionInfo structure
Property
Type
i_customer_subscription int
**
Description
The unique ID of the
customer subscription record
80
Porta
Switch
PortaBilling API
i_subscription *
string, 32
chars max
name **
string, 32
chars max
invoice_description
string
discount_rate
float (with 5
decimal
places)
start_date
date, ISO
format
activation_date **
date, ISO
format
date, ISO
format
billed_to **
finish_date
date, ISO
format
is_finished **
string (Y/N)
int_status **
int
i_customer
int
effective_fee
float
81
Porta
Switch
PortaBilling API
number.
ActivateCustomerSubscriptionsRequest
Property
i_customer
Type
Description
ID of customer record
int
ActivateCustomerSubscriptionsResponse
Property
success
Type
Description
1 in case of success,
0 in case of failure
int
CloseDeleteCustomerSubscriptionRequest structure
Property
Type
i_customer_subscription int
Description
The unique ID of the
customer subscription record
to be closed/deleted
CloseCustomerSubscriptionResponse structure
Property
Type
success
Description
1 in case of success,
0 in case of failure
int
DeleteCustomerSubscriptionResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
ChargeCustomerSubscriptionFeesRequest structure
Property
i_customer
Type
int
Description
The unique ID of the
customer record to be
charged
ChargeCustomerSubscriptionFeesResponse structure
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
Parameters: GetCustomerVDCounterListRequest
82
Porta
Switch
PortaBilling API
This method allows an API user to get the information about volume
discount counters for the specified customer.
get_full_vd_counter_info
Parameters: GetCustomerFullVDCounterListInfoRequest
Return value: GetFullVDCounterListInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get full information about volume
discount counters (e.g. used discount amount, remaining discount
amount, current and next discount values) for the specified customer.
vd_topup
Parameters: CustomerVDTopupRequest
Return value: VDTopupResponse
Realm: administrator
This method allows an administrator to top-up the volume of a service
(e.g. free minutes or gigabytes) provided to a customer with the discount.
Property
i_customer
service_name
dg_name
peak_level
Type
int
string
string
string
Description
The unique ID of the customer record
Service name pattern
Destination group name pattern
ID of the peak level: 0 (peak period), 1 (offpeak period), 2 (2nd off-peak period)
GetCustomerVDCounterListResponse structure
Property
counter_list
Type
Array of
CounterInfo
Description
Array of counter objects
83
Porta
Switch
PortaBilling API
CounterInfo structure
Property
i_cvd_counter
Type
int
i_customer
int
dg_name
service_name
peak_level
rate_unit
string
string
int
string
counter_value
float
Description
The unique ID of the customer
volume discount counter
The unique ID of the customer
record
Destination group name
Name of the service
ID of the peak level
A customer-visible name for the units
used to calculate service charges
Value of counter
GetCustomerFullVDCounterListInfoRequest structure
Property
i_customer
Type
Description
The unique ID of the customer
record
Specifies whether to provide
threshold values and discount
amount units (e.g., minutes) in a
separate field
int
separate_units int
GetFullVDCounterListInfoResponse structure
Property
counter_list
Type
Array of
FullCounterInfo
Description
Array of full counter objects
FullCounterInfo structure
Property
dg_name
service_name
peak_level
Type
string
string
int
threshold
used
remaining
discount_level
next_discount_l
evel
discount_info
unit
vdp_name
string
string
string
string
string
Description
A destination group name
The name of the service
An ID of the peak level:
0 Peak Period
1 Off-peak Period
2 Second Off-peak Period
Threshold value
Used discount amount
Remaining discount amount
Current discount value
Next discount value
string
string
string
84
Porta
Switch
PortaBilling API
In order to differentiate the add-on
products there is also a precedence
level parameter for each add-on
product. If there are more than one
add-on products assigned to an account
they will be sorted according to the
specified precedence level.
addon_priority
int
period_from
period_to
prev_threshold
date
date
float
discount_flag
string
combined_disco
unt
float
combining_mod
e
string
Allowed values:
0 - Main Product
10 - Low
15 - Medium Low
20 - Medium
25 - Medium High
30 - High
Discount start date
Discount reset date
Previous threshold value
Discount applicability:
A discount is available
U not applicable (exceeded)
N excluded, e.g. when a
higher priority discount
prevents the use of a lower
priority one
Total discount to be applied. The
discount_flag property must have the
A value. When the discount is
configured in such a way, that the
discount cant be calculated in advance
(only for a specific call), then this will
show the maximum combined discount.
Defines the possibility of combining
various discount plans when more then
one discount plan is applicable for the
same session (call):
I Never the full override,
when the higher priority
discount prevents the use of
lower priority ones.
N Always the discount rate
is summed up to 100% (we
never give money back for the
call). For example, two 30%
discounts will result in 60%
resulting discount, 70% + 40%
85
Porta
Switch
vdp_combinatio
n_list
discounts
rollover_info
threshold_shift
PortaBilling API
Array of
string
Array of
the
Discounts
structures
Array of
Rollovers
structures
float
86
Porta
Switch
PortaBilling API
has shifted after the top-up of the
service volume
Rollovers structure
Property
amount
Type
float
expiration_date
date
Description
The amount of the service volume that
has rolled-over
The reset date of the rolled-over
discount
Discounts structure
Property
alter_service
Type
string
discount
float
notify_if_exceeded string
threshold
float
xdr_split
string
Description
This property is only available for
services based on the Internet
Access service type. In this case,
when the discount period is active
and the threshold has been
crossed, the level of service
provided can also be adjusted.
The possible values are:
l limited
b blocked
The nill flag sets to no
restriction
The percentage discount value
must be numeric (with a period
allowed) in the 0 100 range. A
0% discount means standard rate
applied, while a 100% discount
means free call
Specifies whether to send an
email notification to the customer
when the threshold is crossed and
the discount no longer applies
The threshold value is measured
either in currency units or time
units (minutes), according to the
type of discount. Will show 0
for unlimited
When a session spans several
rating periods (e.g. covers both
peak and off-peak periods) it is
divided into portions. This
property specifies whether
multiple xDR records will be
produced for sessions like this
87
Porta
Switch
PortaBilling API
one. Each xDR record will be
linked to the applicable discount
level / rate
CustomerVDTopupRequest structure
Property
i_customer
Type
int
topup_amount int
i_dest_group
int
i_service
int
peak_level
int
Description
The unique ID of the customer
record
The top-up amount
The unique ID of the destination
group to apply the top-up to
The unique ID of a service; refers to
the Services table
A Peak Level. One of the following:
0 - Peak Period
1 - Off-Peak Period
2 - 2nd Off-Peak Period
VDTopupResponse structure
Property
counter_info
Type
Description
FullCounterInfo The volume discount counter
structure
See the FullCounterInfo structure
in the Customer Information section
Parameters: GetAutoPaymentInfoRequest
Return value: GetAutoPaymentInfoResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get a customers automated periodic
payment record from the database.
add_auto_payment
Parameters: AddUpdateAutoPaymentInfoRequest
Return value: AddUpdateAutoPaymentInfoResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to set up or update automated periodic
payments. If set up a customers credit card will be charged when the
billing period is closed.
88
Porta
Switch
PortaBilling API
Parameters: DeleteAutoPaymentRequest
Return value: DeleteAutoPaymentResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to delete automated periodic payments.
Property
i_object
Type
int
Description
The unique ID of an account
or a customer
GetAutoPaymentInfoResponse structure
Property
auto_payment_info
Type
AutoPaymentInfo
structure
Description
Auto-payment data
AddUpdateAutoPaymentInfoRequest structure
Property
auto_payment_info
Type
AutoPaymentInfo
structure
Description
Auto-payment data. This
field is nillable for the
update operation
AddUpdateAutoPaymentInfoResponse structure
Property
i_object
Type
int
Description
The unique ID of either an
account or a customer
AutoPaymentInfo structure
Property
Type
i_object
int
object
string
Description
The unique ID of an account
or a customer
A type of entity
(account/customer) for which
89
Porta
Switch
PortaBilling API
pay_amount
float
balance_threshold
float
frozen
string
DeleteAutoPaymentRequest structure
Property
i_object
Type
int
Description
The unique ID of an account
or a customer
DeleteAutoPaymentResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case
of failure
Parameters: GetCustomerTransactionsTotalInfoRequest
Return value: GetTransactionsTotalInfoResponse
Realm: retail customer
This method allows a customer to get the list of customers transactions.
make_transaction
Parameters: MakeCustomerTransactionRequest
Return value: MakeCustomerTransactionResponse
Realm: administrator, reseller, retail customer
This method allows an API user to adjust a customers balance or issue a
payment transaction, including e-commerce transactions.
90
Porta
Switch
PortaBilling API
Property
i_service
int
Type
billing_model
i_customer
int
int
Description
The unique ID of a
service; refers to
Services table
Self-explanatory
The unique ID of the
customer record
GetTransactionsTotalInfoResponse structure
Property
count
sessions_count
total_amount
iso_4217
total_info
per_service_info
Type
int
int
int
string
Array of
TotalTransInfo
Array of
PerServiceInfo
Description
Total transactions
Total sessions
Total transaction
amount
Transaction currency
List of transaction total
values
List of objects
containing information
on per-service basis
TotalTransInfo structure
Property
name
value
Type
string
float
Description
Self-explanatory
Self-explanatory
PerServiceInfo structure
Property
charged_amount
charged_quantity
total_sessions
total
name
unit
Type
float
int
int
int
string
string
Description
Amount charged
Units charged
Self-explanatory
Self-explanatory
Service name
Units
91
Porta
Switch
PortaBilling API
rating_base
string
rate_unit
string
rating_base_unit
ratio
i_service
string
int
int
i_service_type
int
MakeCustomerTransactionRequest structure
Property
i_customer
action
Type
int
string
amount
float
visible_comment
Description
ID of customer record
Same as those available on
the Balance Adjustments
tab of the Customer edit
interface, including
e-commerce transactions.
One of the following:
Refund
Manual charge
Manual credit
Manual payment
Promotional credit
E-commerce payment
E-commerce refund
Authorization only
Capture payment
Amount by which the
customers balance will
increase / decrease. The
number of digits depends
on the maximum number
of decimal places allowed
by the currency
A comment on this
transaction, visible to the
customer in the xDR
browser
92
Porta
Switch
internal_comment
PortaBilling API
string, 32 chars max
An internal comment on
this transaction; not
visible in the xDR
browser, and accessible
only directly from the
database
suppress_notificati int
1 do not send email
on
notifications to this
customer,
0 send email
notifications
transaction_id
string
Applicable to capture
payment and e-commerce
refund transactions; must
contain the ID of a
previously issued
authorization only /
e-commerce payment
transaction
h323_conf_id
string
Optional unique ID of the
transaction generated by
an external system. For
example, if your external
application generates
unique IDs for
transactions made via API
and you want to keep
these IDs in PortaBilling,
pass them in this field
card_info
PaymentMethodInfo Payment method
structure
information for this
transaction.
save_card
string (Y/N)
Indicates whether the
supplied payment method
should be saved as
preferred.
i_service
int
The unique ID of the
Service record; refers to
the Services table
date_inside_billing date
A date associated with the
_period
manual charge/credit
transaction. For example,
you can specify a date for
a manual credit
transaction for when a
customer was credited
93
Porta
Switch
PortaBilling API
MakeCustomerTransactionResponse structure
Property
Type
i_payment_transaction int
balance
transaction_id
authorization
float (with 5
decimal
places)
string
string
result_code
string
i_xdr
int
Description
The unique ID of the
transaction
Customers modified balance
E-Commerce transaction ID
E-Commerce authorization
code
E-Commerce operation result
code
The unique ID of the xdr
record
Parameters: none
Return value: GetMyInfoResponse
Realm: reseller
This method allows a reseller to get information about his own customer
info record.
get_status_history
Parameters: GetCustomerStatusHistoryRequest
Return value: GetCustomerStatusHistoryResponse
Realm: administrator, reseller, retail customer
This method allows an API user to track important events in a customers
lifecycle, such as when a customer was blocked / unblocked, suspended /
unsuspended or terminated.
get_dial_rule_samples
Parameters: GetDialRuleSamplesRequest
Return value: GetDialRuleSamplesResponse
Realm: retail customer
This method allows a retail customer to get the sample dialing rules.
94
Porta
Switch
PortaBilling API
get_moh_list_info
Parameters: GetMOHListInfoRequest
Return value: GetMOHListInfoResponse
Realm: administrator, retail customer
This method allows an API user to get the list of music on hold entries.
get_account_aliases_list
Parameters: GetAllAccAliasesListInfoRequest
Return value: GetAllAccAliasesListInfoResponse
Realm: retail customer
This method allows a retail customer to get the list of his account aliases.
get_services_consumption
Parameters: GetCustomerConsumedServiceRequest
Return value: GetCustomerConsumedServiceResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get information about services
consumed by a customer.
get_customer_xdrs
Parameters: GetRetailCustomerXDRListRequest
Return value: GetRetailCustomerXDRListResponse
Realm: administrator, retail customer, reseller
The cdr_entity attribute allows the use of this method in three modes. In
the customer mode, this method only returns CDRs that directly belong
to a given customer. In the account mode, this method only returns
CDRs that belong to the accounts under a given customer. Supply this
attribute with empty value to retrieve CDRs that belong to a given
customer and his accounts.
mark_xdr_out_of_turn
Parameters: MarkXdrOutOfTurnRequest
Return value: MarkXdrOutOfTurnResponse
Realm: administrator
This method allows an administrator to include a transaction on an outof-turn invoice to be issued on demand.
get_custom_xdr_report_types
Parameters: GetCustomXdrReportTypesRequest
95
Porta
Switch
PortaBilling API
Parameters: GetCustomXdrReportListRequest
Return value: GetCustomXdrReportListResponse
Realm: administrator, retail customer, reseller
This method allows to obtain a list of custom xDR reports for a specific
customer. In addition to the standard customer xDR report it is possible
to obtain site-based reports. These reports can be downloaded by
customers and administrators in CSV and PDF formats. Fields shown in
the report can be configured separately for CSV and PDF files.
get_custom_xdr_report
Parameters: GetCustomXdrReportRequest
Return value: GetCustomXdrReportResponse
Realm: administrator, retail customer, reseller
This method allows to obtain a custom xDR report for a specific
customer.
get_rt_tickets_list
Parameters: GetCustomRTTicketsListRequest
Return value: GetCustomRTTicketsListResponse
Realm: administrator, retail customer, reseller, cc_staff
This method allows to obtain tickets for a customer from the RT server.
Property
customer_info
Type
Description
CustomerInfo Reseller information
structure
GetCustomerStatusHistoryRequest structure
Property
i_customer
int
Type
limit
int
Description
The unique ID of the
customer record
Number of services to retrieve
96
Porta
Switch
offset
PortaBilling API
int
GetCustomerStatusHistoryResponse structure
Property
Type
status_history_changes Array of
StatusHistoryInfo
structures
Description
List of customer status
changes
StatusHistoryInfo structure
Property
i_cust_stat
int
Type
i_status
int
status_name
time_stamp
string
dateTime
Description
The unique ID of the
customer status change
record
The unique ID of the status
record
Customer status name
Date and time when this
change was made
GetDialRuleSamplesRequest structure
Property
Type
Description
dial_rule_samples_list Array of
Array of
SampleDialingRulesInfo SampleDialingRu
lesInfo objects
SampleDialingRulesInfo structure
Property
i_dialing_rule
name
rule
description
options
Type
Description
int
The unique ID of
the dialing rule
record
string
Sample dialing rule
name
string
Dialing rule in a
string format
string
Text description for
the dialing rule
DialingRulesOptionsInfo Sample dialing rule
structure
object
97
Porta
Switch
PortaBilling API
GetMOHListInfoRequest structure
Property
i_customer
Type
Description
The unique ID of the
customer record
int
GetMOHListInfoResponse structure
Property
moh_list_info
Type
MOHListInfo
Description
MOH list object
MOHListInfo structure
Property
system_default_i_moh
is_moh_update_disabled
Type
int
int
default_moh_list
Array of
MOHInfo
structures
customer_defined_moh_list Array of
MOHInfo
structures
aggregated_moh_list
Array of
MOHInfo
structures
Description
Default system MOH object
Indicates whether the MOH
update is allowed
Default MOH list
Customer defined MOH list
Aggregated MOH list
MOHInfo structure
Property
Type
i_moh
int
name
converted
string
string
tries
int
Description
The unique ID of the MOH
record
MOH record name
Indicates whether the MOH
was converted
GetAllAccAliasesListInfoRequest structure
Property
i_customer
Type
int
limit
offset
int
int
Description
Refers to customer record to
which the alias belongs
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
98
Porta
Switch
PortaBilling API
GetAllAccAliasesListInfoResponse structure
Property
account_aliases_list
total
Type
Description
Array of
List of aliases
AccAliasesListInfo
int
Number of aliases
AccAliasesListInfo structure
Property
i_master_account
Type
int
master_account_id
string
i_account
int
id
string
blocked
string
Description
The unique ID of the
main account this alias
account is associated
with
The main account name
that this alias account is
associated with
The unique ID of the
alias record
ID (PIN) of the account
on the PortaBilling
interface, unique in the
environment
Block accounts calls
GetCustomerConsumedServiceRequest structure
Property
i_customer
Type
int
i_service
int
from_date
dateTime
to_date
dateTime
billing_model
int, -1/1
limit
int
offset
int
Description
The unique ID of the
customer record
The unique ID of the
service record
Get information recorded
starting from this date
Get information recorded
before this date
Indicates whether the data
should be retrieved for the
credit entries or for
the debit ones:
-1 Debit account
type
1 Credit account
type
Number of services to
retrieve
Number of rows to skip at
the beginning of the list
99
Porta
Switch
PortaBilling API
get_total
int
show_unsuccessful
int
GetCustomerConsumedServiceResponse structure
Property
consumed_service_list
total
Type
Array of
ConsumedServic
esInfo structures
int
Description
List of
ConsumedServices
records
Total number of the
retrieved services
ConsumedServiceInfo structure
Property
i_service
int
Type
service_name
unit
string
string
charged_amount
charged_quantity
string
string
charged_time
total
total_sessions
rating_base
int
int
int
string
rate_unit
string
Description
The unique ID of the service
record
The name of the service
A customer-visible name for
the units in which service is
measured
Amount charged
The number of charged units
in which service is measured
Time charged
Total number of records
Total number of the sessions
Specifies which particular
parameter is used to calculate
charges, e.g. session time,
amount of data transferred
and the like.
A customer-visible name for
the units used to calculate
service charges
GetRetailCustomerXDRListRequest structure
Property
i_customer
int
Type
i_service
int
i_service_type
int
limit
int
Description
The unique ID of the customer
record
ID of Service; refers to Services
table
The unique ID of the related
service type
Number of rows to retrieve
100
Porta
Switch
PortaBilling API
offset
int
from_date
dateTime
to_date
dateTime
cdr_entity
string
billing_model
int
get_total
int
format
string
show_unsuccessful int
GetRetailCustomerXDRListResponse structure
Property
xdr_list
total
Type
Array of
CustomerXDRInfo
int
Description
Array of customer or account
xDR objects
The number of the retrieved
xDRs
CustomerXDRInfo structure
Property
Type
i_xdr
int
i_service
int
i_dest
int
account_id
int
CLI
CLD
string
string
Description
The unique ID of the xdr
record
The unique ID of the service
record
The unique ID of the
destination record
The unique ID of the account
database record
Calling Line Identification
Called Line Identification
101
Porta
Switch
PortaBilling API
charged_amount
charged_quantity
country
subdivision
description
disconnect_cause
bill_status
disconnect_reason
connect_time
unix_connect_time
float
int
string
string
string
string
string
string
dateTime
int
disconnect_time
unix_disconnect_time
dateTime
int
bill_time
bit_flags
dateTime
int
call_recording_url
call_recording_server_u
rl
string
string
Amount charged
Units charged
Country
Country subdivision
Destination description
The code of disconnect cause
Call bill status
Call disconnect reason
Call connect time
Call connect time (expressed in
Unix time format - seconds
since epoch)
Call disconnect time
Call disconnect time (expressed
in Unix time format - seconds
since epoch)
Call bill time
Extended information how the
service was used; the integer
field that should be treated as a
bit-map. Each currently used bit
is listed in the
Transaction_Flag_Types table
(bit_offset indicates position)
Path to recorded .wav files
URL to the recording server
MarkXdrOutOfTurnRequest structure
Property
i_xdr
Type
int
Description
The unique ID of the xdr record
MarkXdrOutOfTurnResponse structure
Property
success
Type
int
Description
1 if success, 0 in case of failure.
GetCustomXdrReportTypesRequest structure
GetCustomXdrReportTypesResponse structure
Property
report_types
Type
Array of
CustomXdrReportType
structures
Description
A list of available
custom reports
102
Porta
Switch
PortaBilling API
CustomXdrReportType structure
Property
name
Type
string
Description
The name of a custom xDR report type
GetCustomXdrReportListRequest structure
Property
i_customer
int
Type
type
string
period_from
date
period_to
date
limit
int
offset
int
Description
The unique ID of a customer
record
The name of a custom
xDR report type
Get custom xDR reports dated
starting from this date
Get custom xDR reports dated
before this date
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
GetCustomXdrReportListResponse structure
Property
report_list
total
Type
Array of
CustomXdrReportInfo
structures
int
Description
A list of custom reports
available for download
The number of the
retrieved reports
CustomXdrReportInfo structure
Property
Type
type
string
period_from
date
period_to
date
file_name
string
custom_file_name
string
Description
The name of a custom
xDR report type
Get custom xDR reports dated
starting from this date
Get custom xDR reports dated
before this date
The name of the report file (the
unique report ID)
The name of the report file (in a
format defined in the
configuration)
GetCustomXdrReportRequest structure
Property
i_customer
Type
int
Description
The unique ID of a customer record
103
Porta
Switch
PortaBilling API
file_name
string
GetCustomXdrReportResponse structure
Property
Type
success
int
Description
1 if success, 0 in case of failure.
RTAuthInfo structure
Property
rt_login
rt_pass
queue
requestor
Type
string
string
string
string
Description
Customer RT login
Customer RT password
RT queue name
RT requestor name
GetCustomRTTicketsListRequest structure
Property
i_customer
get_total
limit
Type
int
int
int
offset
int
Description
The unique ID of a customer record
Get the total number of retrieved tickets
Number of rows to retrieve
Number of rows to skip at the beginning
of the list
GetCustomRTTicketsListResponse structure
Property
tickets_list
total
Type
array of
TicketInfo
structures
int
Description
List of tickets
The number of retrieved reports
TicketInfo structure
Property
Type
id
subject
status
created
last_updated
int
string
string
dateTime
dateTime
requestors
array of
strings
Description
Ticket number
Ticket subject
Ticket status
Ticket creation time
The time when the ticket was
last updated
Ticket requestors
104
Porta
Switch
PortaBilling API
Parameters: GetCustomerPaymentMethodInfoRequest
Return value: GetCustomerPaymentMethodInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve information about the
payment method (e.g. payment card info) assigned to a customer.
update_payment_method
Parameters: UpdateCustomerPaymentMethodRequest
Return value: UpdateCustomerPaymentMethodResponse
Realm: administrator, reseller
This method allows an API user to assign a preferred payment method to
a customer. For online payment methods, all the information required by
the payment processor should be provided, and an appropriate payment
processor must be set up and properly configured beforehand.
Note that number, name, address, and / or zip fields are not
mandatory in the PaymentMethodInfo structure as long as credit card
was already set.
get_customer_invoices
Parameters: GetCustomerInvoicesRequest
Return value: GetCustomerInvoicesResponse
Realm: retail customer
This method allows a customer to get the list of customers invoices.
get_taxation_info
Parameters: GetCustomerTaxationInfoRequest
Return value: GetCustomerTaxationInfoResponse
Realm: administrator, reseller
This method allows an API user to retrieve information about the plug-in
module which is used to make tax calculations and its parameters.
update_taxation
Parameters: UpdateCustomerTaxationRequest
Return value: UpdateCustomerTaxationResponse
Realm: administrator, reseller
105
Porta
Switch
PortaBilling API
This method allows an API user to set which plugin module will be used
to make tax calculations and set up parameters that affect taxation.
estimate_taxes
Parameters: CustomerEstimateTaxesRequest
Return value: CustomerEstimateTaxesResponse
Realm: administrator, reseller, retail customer
This method allows an API user to calculate the taxes for a payment.
Property
i_customer
Type
int
Description
ID of customer record
GetCustomerPaymentMethodInfoResponse structure
Property
Type
Description
payment_method_info PaymentMethodInfo PaymentMethodInfo
structure
object
UpdateCustomerPaymentMethodRequest structure
Property
Type
Description
i_customer
int
ID of customer record
payment_method_info PaymentMethodInfo Information about
structure
payment method; see
below
UpdateCustomerPaymentMethodResponse structure
Property
i_credit_card
Type
int
Description
ID of modified payment method
record
PaymentMethodInfo structure
106
Porta
Switch
Property
payment_method
name ***
address ***
zip ***
city
i_country_subdivision
iso_3166_1_a2
number
cvv
exp_date ****
start_date
issue_no
account_number
bank_number
phone_number
PortaBilling API
Type
string
string, 41
chars max
string, 85
chars max
string, 41
chars max
string, 50
chars max
int
string, 2
chars
string, 32
chars max
string, 16
chars max
date, ISO
format
date, ISO
format
string, 2
chars max
string, 32
chars max
string, 32
chars max
string
Description
Name of payment method; one
of the following:
Cash
Cheque
American Express
Discover
MasterCard
VISA
FirePay
Switch
Check
DirectDebitNL
(pass an undefined value in
order to clear the payment
method setting)
Name of cardholder (e.g. owner
of bank account)
Address of cardholder
Postal code of cardholder
Name of city of cardholder
ID for cardholders state; refers
to Country_Subdivision table
ISO 3166 two-letter country
code
Credit card number without
spaces, e.g. 4444333322221111
Card security code (CVV, CVS,
etc.); applicable to all credit card
methods
Card expiration date; applicable
to all credit card methods
Card activation date; applicable
to the Switch method
Card issue number; applicable to
the Switch method
Bank account number;
applicable to the Check and
DirectDebitNL methods
Bank routing number; applicable
to the Check method
Phone number in E.164 format
107
Porta
Switch
PortaBilling API
refnum
string
token
string, 256
char max
GetCustomerInvoicesRequest structure
Property
invoice_number
i_customer
limit
offset
from_date
to_date
show_void
only_pay_required
only_last_unpaid_invoice
Type
Description
string Invoice Number unique
identifier of the invoice (a
customer can see only his own
invoices)
int
The unique ID of the customer
record
int
Number of rows to retrieve
int
Number of rows to skip at the
beginning of the list
date Get invoices dated starting from
this date
date Get invoices dated before this
date
int
Show void invoices
int
Show invoices that require
payment
int
Show only last unpaid invoice
GetCustomerInvoicesResponse structure
Property
invoices
total
recommended_amount_to_
pay
last_due_date
Type
Array of
CustomerInvoices
ListInfo
int
float
date
Description
List of customers
invoices
Number of
invoices
Recommended
amount to pay
The last due date
CustomerInvoicesListInfo structure
Property
is_pdf_exists
int
Type
invoice_number
int
i_invoice
int
Description
Indicates whether the
PDF file exists
Invoice Number unique
identifier of the invoice
The unique ID of the
108
Porta
Switch
PortaBilling API
i_customer
int
issue_date
date
period_from
date
period_to
date
due_date
date
i_invoice_status
int
invoice_status_desc
amount_due
string
string
amount_net
string
amount_paid
string
invoice record
Refers to customer record
which the invoice belongs
to
Date when the invoice
was generated
Start date of the billing
period
End date of the billing
period
Date by which payment
must be received
Refers to the invoice
status record
Invoice status
Amount the customer is
supposed to pay for this
period
Sum of all charges in this
period minus credits /
refunds
Amount paid by the
customer already
GetCustomerTaxationInfoRequest structure
Property
i_customer
Type
int
Description
ID of customer record
GetCustomerTaxationInfoResponse structure
Property
Type
taxation_info TaxationInfo
structure
Description
TaxationInfo object
UpdateCustomerTaxationRequest structure
Property
Type
i_customer
int
taxation_info TaxationInfo
structure
Description
ID of customer record
TaxationInfo object
UpdateCustomerTaxationResponse structure
Property
success
Type
int
Description
1 if success, 0 in case of failure.
109
Porta
Switch
PortaBilling API
TaxationInfo structure
Property
processor
options_vat
Type
Description
string
Taxation Plug-In name
TaxationOptionsVat
Parameters of the VAT
structure
plug-in
options_billsoft TaxationOptionsBillsoft Parameters of the
structure
EZtax (formerly
known as BillSoft
EZtax) plug-in
options_suretax TaxationOptionsSureTax Parameters of the
structure
SureTax plug-in
options_custom Array of
List of custom options
TaxationOptionsSureTax for the SureTax plug-in
structures
TaxationOptionsVat structure
Property
Type
exempt
string (Y/N)
percent
int
xdr_per_service int (0/1)
Description
Exempt from tax
VAT percentage
This allows you to calculate
taxes per service (and
respectively show them in the
invoices)
TaxationOptionsBillsoft structure
Property
reseller_regulated
Type
string
reseller_voipa
string
customer_type
string
Description
Resellers status in the sale; one of
the following:
Default
Regulated
Unregulated
VoIP Taxation; one of the
following:
Default
Normal
Aggerssive
Type of the customer; one of the
following:
Default
Business
Residential
110
Porta
Switch
PortaBilling API
incorporated_area string
federal_exempt
state_exempt
county_exempt
local_exempt
string
string
string
string
TaxationOptionsSureTax structure
Property
regulatory_code
Type
string
sales_type
string
summary_type
string
decimal_digits
int
tax_exemption
string
Description
Regulatory code. Could be the
following:
00 ILEC
01 IXC
02 CLEC
03 VOIP (used when
default is specified)
04 ISP
05 Wireless
99 Non-Telecom
Sales type. Possible values:
B,I,L,R,default
Summary type. Possible values:
0,1,default
The maximum number of decimal
places allowed for SureTax method.
Possible values:
2, 3, 4, 5, undef
Exempt from taxes. Could be
default as well. See the
SureTax_Exemption_Codes table for
tax codes and names
TaxationOptionsCustom structure
Property
i_option
Type
int
is_apply
string (Y/N)
Description
The unique ID of the custom tax
option
Indicates whether the custom tax
option has been applied
111
Porta
Switch
PortaBilling API
CustomerEstimateTaxesRequest structure
Property
i_customer
xdr_list
Type
int
array of XDRInfo
structures
Description
The unique ID of the
customer
List of XDRs
CustomerEstimateTaxesResponse structure
Property
taxes_list
Type
array of
EstimatedTax
structures
Description
List of calculated taxes
EstimatedTax structure
Property
amount
level_name
name
type
Type
float
string
string
string
Description
Tax amount
Tax name
Tax rate
The name of the plugin that
was used for tax estimation
Parameters: GetCustomerServiceFeaturesRequest
Return value: GetCustomerServiceFeaturesResponse
Realm: administrator, reseller, retail customer
This method allows an API user to access service features data.
update_service_features
Parameters: UpdateCustomerServiceFeaturesRequest
Return value: UpdateCustomerServiceFeaturesResponse
Realm: administrator, reseller, retail customer
This method allows an API user to update settings for customer service
features.
112
Porta
Switch
PortaBilling API
Property
i_customer
Type
Description
The unique ID of a customer
record
int
GetCustomerServiceFeaturesResponse structure
Property
service_features
Type
array of
ServiceFeatureInfo
structures
Description
List of service features
UpdateCustomerServiceFeaturesRequest structure
Property
i_customer
service_features
Type
int
array of
ServiceFeatureInfo
structures
Description
ID of customer record
List of service features
UpdateCustomerServiceFeaturesResponse structure
Property
i_customer
service_features
Type
int
array of
ServiceFeatureInfo
structures
Description
ID of customer record
List of service features
ServiceFeatureInfo structure
Property
name
flag_value
string
string
Type
effective_flag_value
string
Description
Service feature name
Value of the
corresponding
service_flag item
A value of the service
feature. It can be
received in one of the
two ways:
inherited by the
account from
the customer,
customer site or
the product
113
Porta
Switch
PortaBilling API
attributes
locked
array of
ServiceAttributeInfo
structures
int
inherited by the
customer site
from the
customer
List of service feature
attributes
Specifies whether the
feature is locked for
editing for current user
or not. If absent in
response, then the
feature cant be locked
ServiceAttributeInfo structure
Property
name
values
Type
string
array of strings
effective_values
array of strings
Description
Name of the service feature
Values of the service attribute; if
the attribute accepts a single value,
only the first item will be checked
/ populated
A list of the service feature
attribute values. They can be
received in one of two ways:
inherited by the account from
the customer, customer site or
the product
inherited by the customer site
from the customer
Parameters: GetCustomerSitesRequest
Return value: GetCustomerSitesResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve the list of customer sites (a
group of customers accounts managed as a single entity.)
get_site_info
Parameters: GetSiteInfoRequest
Return value: GetSiteInfoResponse
Realm: administrator, reseller, retail customer
114
Porta
Switch
PortaBilling API
This method allows an API user to get information about a customer site
and its service features.
get_network_connectivity_list
Parameters: GetNetworkConnectivityListRequest
Return value: GetNetworkConnectivityListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of network connectivity
profiles defined in PortaBilling.
add_customer_site
Parameters: AddCustomerSiteRequest
Return value: AddCustomerSiteResponse
Realm: administrator, reseller
This method allows an API user to create a cutomer site.
update_customer_site
Parameters: UpdateCustomerSiteRequest
Return value: UpdateCustomerSiteResponse
Realm: administrator, reseller
This method allows an API user to update a cutomer site or its service
features.
delete_customer_site
Parameters: DeleteCustomerSiteRequest
Return value: DeleteCustomerSiteResponse
Realm: administrator, reseller
This method allows an API user to delete a cutomer site.
Property
i_customer
Type
int
get_service_features
int
Description
The unique ID of a customer
record
Specifies whether the
information about service
features should be included into
the response.
115
Porta
Switch
PortaBilling API
GetCustomerSitesResponse structure
Property
sites
Type
Array of
CustomerSiteInfo
structures
Description
List of customer sites
CustomerSiteInfo structure
Property
i_customer_site
name
i_customer
service_features
Type
Description
int
The unique ID of a
customer site
string
The name of a customer site
int
The unique ID of a
customer record
array of
List of customer sites
ServiceFeatureInfo service features
structures
GetSiteInfoRequest structure
Property
i_customer_site
Type
Description
The unique ID of a customer
site
int
GetSiteInfoResponse structure
Property
site
Type
Description
CustomerSiteInfo Information about a customer
structure
site
GetNetworkConnectivityListRequest structure
Property
connectivities
Type
Description
array of
List of customer sites
NetworkConnectivityInfo
structures
NetworkConnectivityInfo structure
Property
i_env
Type
int
i_network_connectivity
int
Description
The unique ID of the environment
for the network connectivity profile
The unique ID of the network
connectivity profile
116
Porta
Switch
PortaBilling API
mtu
int
name
string
overhead_bits
int
AddCustomerSiteRequest structure
Property
site_info
Type
Description
CustomerSiteInfo Information about a customer
structure
site
AddCustomerSiteResponse structure
Property
i_customer_site
Type
int
Description
The unique ID of a customer site
UpdateCustomerSiteRequest structure
Property
site_info
Type
Description
CustomerSiteInfo Information about a customer
structure
site
UpdateCustomerSiteResponse structure
Property
i_customer_site
Type
int
Description
The unique ID of a customer site
DeleteCustomerSiteRequest structure
Property
i_customer_site
Type
int
Description
The unique ID of a customer site
DeleteCustomerSiteResponse structure
Property
success
Type
int
Description
1 if success, otherwise SOAP fault
Parameters: GetCQListInfoRequest
Return value: GetCQListInfoResponse
Realm: administrator, retail customer
This method allows an API user to get the list of a customers call queues
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
117
Porta
Switch
PortaBilling API
get_callqueue_info
Parameters: GetCQInfoRequest
Return value: GetCQInfoResponse
Realm: administrator, retail customer
This method allows an API user to get call queue information.
add_callqueue
Parameters: AddCallQueueRequest
Return value: AddUpdateCallQueueResponse
Realm: administrator, retail customer
This method allows an API user to add the call queue to a hunt group.
update_callqueue
Parameters: UpdateCallQueueRequest
Return value: AddUpdateCallQueueResponse
Realm: administrator, retail customer
This method allows an API user to update the call queue configured for a
huntgroup.
delete_callqueue
Parameters: DeleteCallQueueRequest
Return value: DeleteCallQueueResponse
Realm: administrator, retail customer
This method allows an API user to remove the call queue from a
huntgroup.
118
Porta
Switch
PortaBilling API
Property
i_customer
Type
int
Description
The unique ID of a customer
record
Specifies whether the main
offices call queues should
be shown instead of call queues
of the specified customer
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
get_main_office_callqueues int
offset
int
limit
int
GetCQListInfoResponse structure
Property
callqueue_list
total
Type
Array of
CQInfo
structures
int
Description
Information about the call queue
The total number of retrieved call
queues
GetCQInfoRequest structure
Property
i_c_queue
Type
int
Description
The unique ID of a call queue
record
GetCQInfoResponse structure
Property
callqueue_info
Type
CQInfo
structure
Description
Information about the call queue
CQInfo structure
Property
i_c_queue
i_c_group
Type
int
int
capacity
int
average_duration
int
Description
The unique ID of the call queue record
The unique ID of the huntgroup record
the call queue is configured for
Maximum number of calls in the call
queue
Average duration of a call in the call
queue (in minutes)
119
Porta
Switch
PortaBilling API
announce_number_of
_callers
String
(Y/N)
announce_estimated_
wait_time
String
(Y/N)
announcement_interva int
l
group_name
string
group_id
string
i_moh
int
i_intro_prompt
int
moh
string
moh_action
string
intro_prompt
string
intro_prompt_action
string
120
Porta
Switch
PortaBilling API
AddCallQueueRequest structure
Property
callqueue_info
Type
CQInfo
structure
Description
Information about the call queue
AddUpdateCallQueueResponse structure
Property
i_c_queue
Type
int
Description
The unique ID of the call queue
record
UpdateCallQueueRequest structure
Property
callqueue_info
Type
CQInfo
structure
Description
Information about the call queue
DeleteCallQueueRequest structure
Property
i_c_queue
Type
int
Description
The unique ID of the call queue
record to be deleted
DeleteCallQueueResponse structure
Property
success
Type
int
Description
1 if success, otherwise SOAP fault
Parameters: GetCustomerAbbreviatedDialingNumberListRequest
Return value: GetCustomerAbbreviatedDialingNumberListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve an abbreviated number list for
a customer.
add_abbreviated_dialing_number
Parameters:
AddUpdateCustomerAbbreviatedDialingNumberRequest
Return value:
AddUpdateCustomerAbbreviatedDialingNumberResponse
Realm: administrator, reseller, retail customer
121
Porta
Switch
PortaBilling API
This method allows an API user to add an abbreviated dialing number for
a customer.
update_abbreviated_dialing_number
Parameters:
AddUpdateCustomerAbbreviatedDialingNumberRequest
Return value:
AddUpdateCustomerAbbreviatedDialingNumberResponse
Realm: administrator, reseller, retail customer
This method allows an API user to update an existing abbreviated dialing
number.
delete_abbreviated_dialing_number
Parameters: DeleteCustomerAbbreviatedDialingNumberRequest
Return value: DeleteCustomerAbbreviatedDialingNumberResponse
Realm: administrator, reseller, retail customer
This method allows an API user to remove an abbreviated dialing
number.
Property
number_to_dial
abbreviated_number
description
string
string
string
Type
i_ab_dialing
int
Description
Number to dial
Abbreviated number
Text description for this
entry
ID of abbreviated
dialing number record
GetCustomerAbbreviatedDialingNumberListRequest
structure
Property
i_customer
Type
int
offset
int
limit
int
Description
The unique ID of a customer
record
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
122
Porta
Switch
PortaBilling API
GetCustomerAbbreviatedDialingNumberListResponse
structure
Property
Type
abbreviated_dialing_number_list Array of
Abbreviated
DialingNum
berInfo
structures
total
int
Description
Array of abbreviated
dialing number
objects
The number of the
retrieved
abbreviated dialing
number
objects
AddUpdateCustomerAbbreviatedDialingNumberRequest
structure
Property
i_customer
Type
Description
ID of customer
record
AbbreviatedDialing Abbreviated
NumberInfo
dialing number
structure
object
int
abbreviated_dialing_number
_info
AddUpdateCustomerAbbreviatedDialingNumberResponse
structure
Property
i_ab_dialing
Type
int
Description
ID of abbreviated dialing number
record
DeleteCustomerAbbreviatedDialingNumberRequest
structure
Property
i_ab_dialing
int
Type
i_customer
int
Description
ID of abbreviated dialing number
record
ID of the customer to whom the
abbreviated dialing number record
is assigned
DeleteCustomerAbbreviatedDialingNumberResponse
structure
Property
success
Type
int
Description
1 if success, otherwise SOAP fault
123
Porta
Switch
PortaBilling API
Parameters: GetExtensionsListInfoRequest
Return value: GetExtensionsListInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of extensions for phone
lines within a customers IP Centrex environment.
add_customer_extension
Parameters: AddCustomerExtensionRequest
Return value: AddUpdateCustomerExtensionResponse
Realm: retail customer
This method allows a retail customer to add an extension.
update_customer_extension
Parameters: UpdateCustomerExtensionRequest
Return value: AddUpdateCustomerExtensionResponse
Realm: retail customer
This method allows a retail customer to modify an extension.
delete_customer_extension
Parameters: DeleteCustomerExtensionRequest
Return value: DeleteCustomerExtensionResponse
Realm: retail customer
This method allows a retail customer to remove an extension.
Property
i_c_ext
Type
int
i_customer
int
id
string
name
string
Description
Extension ID; Refers to the
Centrex_Group_Extensions table
The unique ID of the customer
record
The extension identifier used
in dialing
The name of the extension / owner
124
Porta
Switch
PortaBilling API
type
string
i_account
int
i_c_group
int
group_name
hunt_sequence
string
string
hunt_keep_original_cli
String
account_id
bill_status
string
string
(O, S
and C)
firstname
midinit
lastname
cont1
string
string
string
string
125
Porta
Switch
PortaBilling API
ip_phone_name
i_prompt
string
int
prompt_status
string
prompt_error
string
published
string
(Y/N)
primary_i_c_group
int
primary_group_id
int
IP phone model
The unique ID of the assinged
prompt file
The prompt file processing status.
Possible values:
IN_PROGRESS
ERROR
FINISHED
A description of the last processing
error
When creating an extension you can
mark it as published so that it is
included in the dial-by-name
directory. One of the following:
Y Makes an extensions
accessible via dial-by-name;
N Excludes a certain
extension from being
accessible via dial-by-name
(e.g. you do not want
telemarketers to directly
reach your CEO or CFO
because their names are
publicly accessible)
The unique ID of the huntgroup
that is set for this extension as
primary.
Returns an empty string if this
extension doesnt have a primary
extension assigned
The number of the huntgroup that
is set for this extension as primary.
Returns an empty string if this
extension doesnt have a primary
extension assigned
126
Porta
Switch
PortaBilling API
primary_group_name
string
i_customer_of_account int
GetExtensionsListInfoRequest structure
Property
i_customer
limit
offset
int
int
int
extension
string
detailed_info
get_main_office
_extensions
Type
Description
The unique ID of the customer record
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
Search pattern for extension numbers.
Use the following wildcard symbols:
The percentage ( % ) wildcard
allows you to match any string
of zero or more characters;
The underscore ( _ ) wildcard
allows you to match any single
character
Detailed information
If set to 1, then additionally a list of
main office extensions will be provided
for its branch office
int
int
GetExtensionsListInfoResponse structure
Property
extensions_list
total
Type
Array of
ExtensionsInfo
int
Description
List of extensions
The number of entries
AddCustomerExtensionRequest structure
Property
i_customer
id
name
i_account
Type
int
string
string
int
Description
The unique ID of the customer
Extension number
Extension name
The unique ID of the account
127
Porta
Switch
prompt_action
PortaBilling API
string
Possible values:
set Add (or replace) a
prompt for an extension. The
sound file is sent in a MIME
attachment to the API
request.
unset Remove existing
prompt
Note that the Apache Cassandra
database must be enabled for this
method property to work.
AddUpdateCustomerExtensionResponse structure
Property
i_c_ext
Type
int
Description
ID of the created
extension
UpdateCustomerExtensionRequest structure
Property
i_c_ext
i_customer
id
name
i_account
prompt_action
Type
int
int
string
string
int
string
Description
ID of the modified extension
The unique ID of the customer
Extension number
Extension name
The unique ID of the account
When creating an extension you can upload
a voice prompt with the persons name.
Possible values:
set Add (or replace) a prompt for
an extension. The sound file is sent
in a MIME attachment to the API
request.
unset Remove existing prompt
Note that The Apache Cassandra database
must be enabled for this method property
to work
128
Porta
Switch
PortaBilling API
published
Property
i_c_ext
int
Type
i_customer
int
Description
The unique ID of the
created extension
The unique ID of the
customer record
DeleteCustomerExtensionResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in
case of failure
Parameters: GetHGListInfoRequest
Return value: GetHGListInfoResponse
Realm: retail customer
This method allows a retail customer to get the list of huntgroups.
add_customer_huntgroup
Parameters: AddCustomerHuntgroupRequest
Return value: AddUpdateCustomerHuntgroupResponse
Realm: retail customer
This method allows a retail customer to create a huntgroup.
129
Porta
Switch
PortaBilling API
update_customer_huntgroup
Parameters: UpdateCustomerHuntgroupRequest
Return value: AddUpdateCustomerHuntgroupResponse
Realm: retail customer
This method allows a retail customer to modify a huntgroup.
delete_customer_huntgroup
Parameters: DeleteCustomerHuntgroupRequest
Return value: DeleteCustomerHuntgroupResponse
Realm: retail customer
This method allows a retail customer to remove a huntgroup.
Property
i_customer
self_ref
limit
offset
Type
int
int
int
int
i_c_ext
int
Description
The unique ID of the customer record
Reference to huntgroup
Number of rows to retrieve
Number of rows to skip at the beginning
of the list
The unique extension ID. If provided,
will return the list of huntgroups this
extension is assigned to.
Otherwise returns the list of all
huntgroups
If provided, the list of the main office
huntgroups will be returned together
with a branch office huntgroups
get_main_office_h int
untgroups
GetHGListInfoResponse structure
Property
huntgroup_list
total
Type
Array of HGInfo
int
Description
List of huntgroups
Number of huntgroups
HGInfo structure
Property
i_c_group
Type
int
Description
The unique ID of the group
record (for type = Group)
130
Porta
Switch
PortaBilling API
i_customer
int
name
hunt_sequence
string
string
hunt_keep_original_cli String
(Y/N/I)
i_c_ext
int
id
assigned_extensions
i_prompt
string
Array of
AssignedExt
ensionsInfo
CQInfo
structure
int
prompt_status
string
prompt_error
string
assigned_callqueue
131
Porta
Switch
PortaBilling API
published
string
pickup_allowed
string
AssignedExtensionsInfo structure
Property
i_cg_ext
int
Type
i_c_ext
int
type
string
id
string
name
huntstop
string
string (Y/N,
default is N)
Description
Primary key in the
Centrex_Group_Extensions table
the list of numbers
to forward the call to
Extension ID; Refers to the
Centrex_Group_Extensions table
One of the following:
Account
Group
Unassigned
The extension identifier used
in dialing
The name of the owner
Indicates whether to disable
any forwarding for calls made
to this huntgroup
132
Porta
Switch
PortaBilling API
primary_group
string (Y/N)
hunt_delay
int
hunt_expire
int
hunt_order
int
account_id
string
AddCustomerHuntgroupRequest structure
Property
i_customer
int
id
name
hunt_sequence
string
string
string
add_extensions
Array of
AssignedExte
nsionsInfo
structures
CQInfo
structure
add_callqueue
Type
Description
The unique ID of the
customer record
Huntgroup number
Huntgroup name
The ringing strategy;
one of the following:
Order
Random
Simultaneous
LeastUsed
List of extension IDs to be
added
Information about the call
queue
133
Porta
Switch
PortaBilling API
prompt_action
string
pickup_allowed
string
hunt_keep_original_cl string
i
Possible values:
set Add (or replace)
a prompt for
an extension. The
sound file is sent in a
MIME attachment to
the API request.
unset Remove
existing prompt
Note that The Apache
Cassandra database must be
enabled for this method
property to work.
Specifies whether to allow
extensions to pick up calls
made to the members of this
huntgroup.
Possible values:
Y Allow
N Disallow
Specifies whether to keep the
original CLI; one of the
following:
Y The call is
redirected with the
phone number and
name of the original
caller;
N The call is
redirected with the
phone number and
name of the
huntgroup;
I ID only, the call
is redirected with the
phone number of the
original caller and
name of the
huntgroup.
AddUpdateCustomerHuntgroupResponse structure
Property
i_c_group
Type
int
Description
The unique ID of the created
huntgroup
134
Porta
Switch
PortaBilling API
UpdateCustomerHuntgroupRequest structure
Property
i_c_ext
int
i_c_group
int
i_customer
int
id
name
hunt_sequence
string
string
string
add_extensions
Array of
AssignedE
xtensionsIn
fo structures
Array of int List of extension IDs within the
huntgroup (i_cg_ext) to be
removed
Array of
List of extension records to be
AssignedE updated
xtensionsIn
fo structures
CQInfo
Information about the call
structure
queue to be assigned to a
huntgroup
int
The unique ID of the call queue
name to be deleted
CQInfo
Information about the call
structure
queue to be updated
string
A SOAP attachment name to be
used in prompt operations
string
Possible values:
set Add (or replace) a
prompt for
an extension. The sound
file is sent in a MIME
attachment to the API
request
unset Remove existing
prompt
del_extensions
chg_extensions
add_callqueue
del_callqueue
chg_callqueue
prompt
prompt_action
Type
Description
Obsolete. The unique ID of the
extension
The unique ID of the
huntgroup
Obsolete. The unique ID of the
customer record
Huntgroup number
Extension name
The ringing strategy;
one of the following:
Order
Random
Simultaneous
LeastUsed
List of extension IDs to be
added
135
Porta
Switch
PortaBilling API
pickup_allowed
string
hunt_keep_original_cli String
DeleteCustomerHuntgroupRequest structure
Property
i_c_group
int
Type
i_c_ext
int
i_customer
int
Description
The unique ID of the created
extension
Obsolete. The unique ID of the
extension
Obsolete. The unique ID of the
customer record
DeleteCustomerHuntgroupResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
136
Porta
Switch
PortaBilling API
Parameters: GetCustomerCustomFieldsValuesRequest
Return value: GetCustomerCustomFieldsValuesResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of customers custom
fields.
update_custom_fields_values
Parameters: UpdateCustomerCustomFieldsValuesRequest
Return value: UpdateCustomerCustomFieldsValuesResponse
Realm: administrator, reseller
This method allows an API user to modify a customers custom fields.
get_custom_fields_schema
Parameters: GetCustomerCustomFieldsSchemaRequest
Return value: GetCustomerCustomFieldsSchemaResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of customers custom fields
with information about their types and possible values.
Property
i_customer
Type
int
Description
The unique ID of the
customer record
GetCustomerCustomFieldsValuesResponse structure
Property
custom_fields_values
Type
Array of
CustomFieldsValues
Info
Description
List of Custom Fields
values for the given
customer
CustomFieldsValuesInfo structure
Property
name
Type
string
Description
Custom Field name
137
Porta
Switch
text_value
db_value
PortaBilling API
string
string
UpdateCustomerCustomFieldsValuesRequest structure
Property
i_customer
custom_fields_values
Type
Description
The unique ID of the
customer record
Array of
List of Custom Fields
CustomFieldsValues values for the given
Info
customer
int
UpdateCustomerCustomFieldsValuesResponse structure
Property
i_customer
custom_fields_values
Type
int
Array of
CustomFieldsValues
Info
Description
The unique ID of the
customer record
List of Custom Fields
values for the given
customer
GetCustomerCustomFieldsSchemaRequest structure
Property
i_customer
Type
int
Description
The unique ID of the
customer record. If not
provided, the ID of
logged in entity will
be used
GetCustomerCustomFieldsSchemaResponse structure
Property
custom_fields
Type
Array of
CustomFieldsInfo
Description
List of Custom Fields
with information for
the given customer
CustomFieldsInfo structure
Property
default_value
Type
string
mandatory
string
name
string
Description
Current Custom Field
value
Specifies whether the
Custom Field is
mandatory (i.e. cant be
empty)
Name of the Custom
Field
138
Porta
Switch
PortaBilling API
type
string
value
string (Y/N)
properties
string
Parameters: GetPromptFileRequest
Return value: GetPromptFileResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get information about a voice prompt
and the prompt file itself in a MIME attachment to the API response (if
available). This method can be used for both extensions and huntgroups.
Property
i_prompt
int
Type
codec
string
Description
The unique ID of the
requested prompt file
The name of a codec, by
which the prompt file in the
response will be encoded.
Possible values:
a_law
u_law
g729
GetPromptFileResponse structure
Property
prompt_status
Type
string
Description
Prompt file conversion
139
Porta
Switch
prompt_error
PortaBilling API
string
status
Error message, if any
Parameters: GetAccountInfoRequest
Return value: GetAccountInfoResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get an account record from the
database. The account must be viewable (owned) by the user making the
request.
validate_account_info
Parameters: ValidateAccountInfoRequest
Return value: ValidateAccountInfoResponse
Realm: administrator, reseller, distributor
This method allows an API user to check if the supplied data can be used
to create a new account record or update an existing one. If successful,
the completed data is returned.
get_account_list
Parameters: GetAccountListRequest
Return value: GetAccountListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the list of account records. The
account must be viewable (owned) by the user making the request.
add_account
Parameters: AddAccountRequest
Return value: AddUpdateAccountResponse
Realm: administrator, reseller, distributor
This method allows an API user to create a new account record using the
supplied data.
140
Porta
Switch
PortaBilling API
update_account
Parameters: UpdateAccountRequest
Return value: AddUpdateAccountResponse
Realm: administrator, reseller, retail customer, account, distributor
This method allows an API user to update an existing account record
using the supplied data.
terminate_account
Parameter: TerminateAccountRequest
Return value: TerminateAccountResponse
Realm: administrator, reseller
This method allows an API user to terminate an existing account record.
move_account
Parameters: MoveAccountRequest
Return value: MoveAccountResponse
Realm: administrator
This method allows an administrator to move an account to a different
customer. The movement is performed in two steps:
1) The clone of the target account is created for the appropriate
customer;
2) The target account is terminated.
change_password
Parameters: ChangeAccountPasswordRequest
Return value: ChangePasswordResponse
Realm: retail customer, account
This method allows an API user to change his password.
Type
int
Description
The unique ID of the
account
or:
141
Porta
Switch
PortaBilling API
i_batch
int
control_number
int
or:
batch_name
control_number
or:
id
or:
login
string
additional:
detailed_info
expand_alias
int
int
Detailed information
For account aliases:
indicates whether the
information should be
retrieved from the alias or
from the related master
account
Specifies whether the
information about service
features should be included
in the response.
without_service_features int
Property
account_info
Type
AccountInfo
structure
Description
Data about an account, see
AccountInfo below
ValidateAccountInfoRequest structure
Property
Type
Description
142
Porta
Switch
PortaBilling API
account_info
AccountInfo
ValidateAccountInfoResponse structure
Property
account_info
Type
AccountInfo
Description
Data about an account, see
AccountInfo above
GetAccountListRequest structure
Property
Type
offset
int
limit
i_customer
int
int
i_product
int
i_batch
int
batch_name
string
id
string
get_total
int
get_only_real_accounts
int
get_not_closed_accounts
int
legal_intercept_only
int
Description
Number of rows to skip at
the beginning of the list
Number of rows to retrieve
Refers to the customer
record to which the
account belongs
Refers to the product
record which is assigned to
the account
Refers to the batch record
to which the account
belongs
The batch name to which
the account belongs
Search pattern for account
IDs
Get the total number of the
retrieved accounts
Get only accounts and skip
account aliases
Get only accounts with
statuses different from
closed
Get only accounts with the
Legal Intercept feature
enabled
GetAccountListResponse structure
Property
account_list
Type
array of
AccountInfo
structures
Description
Set of account data records
143
Porta
Switch
PortaBilling API
AddAccountRequest structure
Property
account_info
Type
Account Info
Description
Note: i_account will be ignored;
most fields may be omitted
UpdateAccountRequest structure
Property
account_info
Type
AccountInfo
Description
Note: i_account is a mandatory
field; only fields requiring
modification should be provided
AddUpdateAccountResponse structure
Property
i_account
Type
int
Description
The unique ID of the
created/modified account
TerminateAccountRequest structure
Property
i_account
Type
int
Description
The unique ID of the account
TerminateAccountResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
AccountInfo structure
Property
i_account *
id
Type
int
string, 32
chars max
Description
The unique ID of the account
ID (PIN) of the account on the
PortaBilling interface, unique in the
environment
144
Porta
Switch
billing_model *
PortaBilling API
int
i_customer *
int
i_distributor
int
i_batch
int
batch_name
string, 32
chars
control_number *
int
iso_4217 *
string, 3 chars
opening_balance *
float (with 5
decimal
places)
float (with 5
decimal
places)
date, ISO
format
date, ISO
format
balance **
issue_date *
activation_date
145
Porta
Switch
expiration_date
first_usage
last_usage
last_recharge
PortaBilling API
date, ISO
format
date, ISO
format
dateTime,
ISO format
dateTime,
ISO format
life_time
int
redirect_number
string, 15
chars
i_product
int
i_routing_plan
int
i_acl
int
i_vd_plan
int
i_moh
int
ua_profile_id
int
i_time_zone
int
time_zone_name
i_lang
string
string
iso_639_1
string, 2 chars
max
146
Porta
Switch
service_flags
service_features
assigned_addons
companyname
salutation
firstname
midinit
lastname
baddr1
baddr2
baddr3
baddr4
baddr5
PortaBilling API
string, 32
chars max
array of
ServiceFeatu
reInfo
structures
array of
ProductInfo
structures
string, 41
chars max
string, 15
chars max
string, 120
chars max
string, 5 chars
max
string, 120
chars max
string, 41
chars max
string, 41
chars max
string, 41
chars max
string, 41
chars max
string, 41
chars max
147
Porta
Switch
city
state
zip
country
note
notepad
faxnum
cont1
phone1
cont2
phone2
subscriber_email
login
password
h323_password
PortaBilling API
string, 31
chars max
string, 21
chars max
string, 13
chars max
string, 31
chars max
string, 41
chars max
string
string, 21
chars max
string, 120
chars max
string, 21
chars max
string, 120
chars max
string, 21
chars max
string, 99
chars max
string, 64
chars max
string, 16
chars max
string, 255
chars max
string, 128
chars max
credit_limit
float (with 5
decimal
places)
148
Porta
Switch
PortaBilling API
blocked
string (Y/N)
follow_me_enable
d
string, 1 char
ecommerce_enabl
ed
string (Y/N)
out_date_format
string, 16
chars max
out_time_format
string, 16
chars max
out_date_time_for string, 16
mat
chars max
in_date_format
string, 16
chars max
in_time_format
string, 16
chars max
i_parent
int
refunds **
mac
float (with 5
decimal
places)
string
bill_status **
string
i_master_account
**
int
149
Porta
Switch
PortaBilling API
i_subscriber
int
password_timesta
mp *
i_credit_card
dateTime
int
customer_name ** string
zero_balance_date
**
date, ISO
bcc *
voucher_info
string
VoucherInfo
structure
um_domain
string
um_ip
string
login_to_um_is_a
vailable
int
sip_status
int
sip_contact
string
sip_agent
string
extension_id
extension_name
idle_days
string
string
int
product_name
credit_exceed
string
string
zero_balance
int
150
Porta
Switch
PortaBilling API
customer_bill_sus
pended
int
cust_bill_suspensi
on_delayed
int
customer_blocked
string
customer_status
string
customer_credit_e
xceed
string
account_inactive
**
int
account_expired
**
is_active
int
has_custom_fields
int
i_customer_site
int
site_name
int
i_account_balance
_control_type
int
inactivity_expire_t
ime
int
int
MoveAccountRequest structure
Property
i_account
int
Type
i_customer
int
batch_name string
Description
The unique ID of the account to
be moved
The unique ID of the customer to
move account to
The name of the a batch to put
151
Porta
Switch
PortaBilling API
the account into
MoveAccountResponse structure
Property
old_i_account int
Type
i_account
int
warnings
Array of Strings
Description
The old ID of the account that
was moved
The new unique ID of the
account that was moved
Warnings accumulated while
moving the account
ChangeAccountPasswordRequest structure
Property
new_password
old_password
i_account
Type
string
string
int
Description
The new password
The old password
The unique ID of the
account record
ChangePasswordResponseErrMessages structure
Property
new_password
old_password
Type
string
string
Description
New password error
Old password error
Parameter: GetAccountAliasListRequest
Return value: GetAccountAliasListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of aliases.
add_alias
Parameter: AddAccountAliasRequest
Return value: AddAccountAliasResponse
Realm: administrator, reseller
This method allows an API user to add an alias.
delete_alias
Parameter: DeleteAccountAliasRequest
Return value: DeleteAccountAliasResponse
152
Porta
Switch
PortaBilling API
Property
i_master_account int
get_total
int
Type
Description
ID of a master account record
Get the total number of the
retrieved aliases
GetAccountAliasListResponse structure
Property
alias_list
total
Type
array of AliasInfo
structures
int
Description
List of aliases
The number of the retrieved
aliases
AliasInfo structure
Property
Type
id
i_master_account
blocked
i_account
string
int
string
int
Description
Alias ID
ID of parent account record
Block accounts calls
The unique ID of an account
(alias)
AddAccountAliasRequest structure
Property
alias_info
Type
AliasInfo structure
Description
Alias information
AddAccountAliasResponse structure
Property
success
i_account
Type
int
int
Description
1 if success, 0 if failure
The unique ID of the added alias
DeleteAccountAliasRequest structure
Property
alias_info
Type
AliasInfo structure
Description
Alias information
153
Porta
Switch
PortaBilling API
DeleteAccountAliasResponse structure
Property
success
Type
int
Description
1 if success, 0 if failure
Parameters: GetAccountSubscriptionsRequest
Return value: GetAccountSubscriptionsResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of subscription records
associated with an account.
add_subscription
Parameters: AddAccountSubscriptionRequest
Return value: AddUpdateAccountSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to add a new subscription associated
with an account. If successful, a new subscription ID is returned.
update_subscription
Parameters: UpdateAccountSubscriptionRequest
Return value: AddUpdateAccountSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to update an existing subscription record
associated with an account. It requires an ID number returned, for
example, by the add_subscription method.
close_subscription
Parameters: CloseDeleteAccountSubscriptionRequest
Return value: CloseAccountSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to close an existing active subscription
associated with an account. It requires an ID number returned, for
example, by the add_subscription method.
delete_subscription
Parameters: CloseDeleteAccountSubscriptionRequest
Return value: DeleteAccountSubscriptionResponse
Realm: administrator, reseller
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
154
Porta
Switch
PortaBilling API
Parameters: ActivateAccountSubscriptionsRequest
Return value: ActivateAccountSubscriptionsResponse
Realm: administrator, reseller
This method allows an API user to instantly activate an accountss
pending subscriptions, where the start date is less than or equal to todays
date (in the customers time zone). An activation fee will be charged for
each subscription, if applicable.
charge_subscription_fees
Parameters: ChargeAccountSubscriptionFeesRequest
Return value: ChargeAccountSubscriptionFeesResponse
Realm: administrator
This method allows an administrator to immediately charge all of an
accounts subscriptions (otherwise later this will be done automatically.)
Property
i_account
Type
int
Description
The unique ID of the
account
GetAccountSubscriptionsResponse structure
Property
subscriptions
Type
Description
array of
Set of account
AccountSubscriptionInfo subscription data
structures
records
AddAccountSubscriptionRequest structure
Property
i_account
Type
Description
The unique ID of the
account
subscription_info AccountSubscriptionInfo Note:
structure
i_account_subscription
int
155
Porta
Switch
PortaBilling API
will be ignored;
i_subscription is a
mandatory field, and
must be unique among
all of the accounts
pending and active
subscriptions
UpdateAccountSubscriptionRequest structure
Property
i_account
i_account_subscription
subscription_info
Type
Description
The unique ID of
the account
int
The unique ID of
the account
subscription record
to be updated
AccountSubscription Note:
Info
i_account_subscripti
on and
i_subscription will
be ignored
int
AddUpdateAccountSubscriptionResponse structure
Property
i_account_subscription
Type
int
Description
The unique ID of the created
/ modified account
subscription record
AccountSubscriptionInfo structure
Property
i_account_subscription
**
i_subscription *
Type
int
string, 32
chars max
name **
string, 32
chars max
invoice_description
string
discount_rate
float (with 5
decimal
places)
Description
The unique ID of the account
subscription record
The unique ID of the
subscription plan; refers to the
Subscriptions table
Name of the subscription
plan, referenced by the
i_subscription attribute
The subscription plan name
that is visible to the end user
Discount rate for the
subscription, in percents; if
missing or undefined, the
discount rate defined in the
customer information is
156
Porta
Switch
PortaBilling API
start_date
date, ISO
format
activation_date **
date, ISO
format
date, ISO
format
billed_to **
finish_date
date, ISO
format
obligatory **
string (Y/N)
is_finished **
string (Y/N)
int_status **
int
effective_fee
float
applied
The desired subscription
activation date (defined in the
customers time zone); if
missing or undefined, the
subscription will start
immediately after it is created;
otherwise, the value should be
greater than or equal to
todays date (in the customers
time zone); can be updated
for pending subscriptions only
Date when the subscription
was activated
Date to which subscription
charges have already been
applied
Date when the subscription
should be automatically
canceled; if defined, must be
greater than or equal to
start_date
Indicates that the subscription
comes from the accounts
product, and so cannot be
closed until the account has
this product assigned to it
Indicates whether the
subscription has already been
closed
Status of the subscription:
0 pending
1 active
2 closed
Amount of the actual periodic
fee for the current billing
period according to its order
number.
CloseDeleteAccountSubscriptionRequest structure
Property
i_account_subscription
Type
int
Description
The unique ID of the
accounts subscription record
to be closed / deleted
157
Porta
Switch
PortaBilling API
CloseAccountSubscriptionResponse structure
Property
Type
success
Description
1 in case of success,
0 in case of failure
int
DeleteAccountSubscriptionResponse structure
Property
success
Type
Description
1 in case of success,
0 in case of failure
int
ActivateAccountSubscriptionsRequest
Property
i_account
Type
int
Description
The unique ID of the account
ActivateAccountSubscriptionsResponse
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
ChargeCustomerSubscriptionFeesRequest structure
Property
i_account
Type
int
Description
The unique ID of the account
record to be charged
ChargeCustomerSubscriptionFeesResponse structure
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
Parameters: GetAccountVDCounterListRequest
Return value: GetAccountVDCounterListResponse
Realm: administrator, reseller
4
This method allows an API user to get the information about volume
discount counters for the specified account.
get_full_vd_counter_info
Parameters: GetAccountFullVDCounterListInfoRequest
Return value: GetFullVDCounterListInfoResponse
158
Porta
Switch
PortaBilling API
Parameters: AccountVDTopupRequest
Return value: VDTopupResponse
Realm: administrator
This method allows an administrator to top-up the volume of a service
(e.g. free minutes or gigabytes) provided to an end-user (account) with the
discount.
Property
i_account
Type
int
service_name string
dg_name
string
peak_level
string
Description
The unique ID of the account
record
Service name pattern
Destination group name pattern
ID of the Peak Level: 0 (peak
period), 1 (off-peak period), 2
(2nd off-peak period)
GetAccountVDCounterListResponse structure
Property
counter_list
Type
Array of CounterInfo
structures
Description
Array of counter objects
CounterInfo structure
Property
i_avd_counter
Type
int
i_account
int
dg_name
service_name
peak_level
rate_unit
counter_value
string
string
int
string
float
Description
The unique ID of the account
volume discount counter
The unique ID of the account
record
Destination group name
Name of the service
ID of the Peak Level
Units
Value of counter
159
Porta
Switch
PortaBilling API
GetAccountFullVDCounterListInfoRequest structure
Property
i_account
Type
int
separate_units
int
Description
The unique ID of the
account record
Specifies whether to
provide threshold values
and discount amount
units (e.g., minutes) in a
separate field
GetFullVDCounterListInfoResponse structure
Property
counter_list
Type
Array of
FullCounterInfo
structures
Description
List of volume discount
counters.
See the FullCounterInfo
structure in the Customer
Information section.
AccountVDTopupRequest structure
Property
i_account
int
Type
topup_amount
i_dest_group
int
int
i_service
int
peak_level
int
Description
The unique ID of the account
record
The top-up amount
The unique ID of the
destination group to apply the
top-up to
The unique ID of a service;
refers to the Services table
A Peak Level. One of the
following:
0 - Peak Period
1 - Off-Peak Period
2 - 2nd Off-Peak
Period
Parameters: GetAccountTransactionsTotalInfoRequest
Return value: GetTransactionsTotalInfoResponse
Realm: retail customer, account
This method allows an API user to get the list of accounts transactions.
160
Porta
Switch
PortaBilling API
make_transaction
Parameters: MakeAccountTransactionRequest
Return value: MakeAccountTransactionResponse
Realm: administrator, reseller, account
This method allows an API user to adjust an accounts balance or issue a
payment transaction, including e-commerce transactions.
Property
i_account
Type
int
i_service
int
from_date
dateTime
to_date
dateTime
Description
The unique ID of the
account record
The unique ID of the
Service record; refers to
the Services table
Get transactions made
after this date
Get transactions made
before this date
GetTransactionsTotalInfoResponse structure
Property
count
sessions_count
total_amount
iso_4217
total_info
per_service_info
Type
int
int
int
string
Array of
TotalTransInfo
Array of
PerServiceInfo
Description
Total transactions
Total sessions
Total transaction
amount
Transaction currency
List of transaction total
values
List of objects
containing information
on per-service basis
PerServiceInfo structure
161
Porta
Switch
PortaBilling API
MakeAccountTransactionRequest structure
Property
i_account
action
amount
Type
int
string
one of the following:
Manual charge
Manual refund
Manual payment
Promotional
credit
float
visible_comment
internal_comment
suppress_notificati int
on
transaction_id
string
Description
The unique ID of the
account record
Same as those available on
the Balance Adjustments
tab of the Customer edit
interface, except for
e-commerce transactions
162
Porta
Switch
h323_conf_id
PortaBilling API
string
Property
i_payment_transaction int
balance
Type
transaction_id
float (with 5
decimal places)
string
authorization
string
result_code
string
i_xdr
int
Description
The unique ID of the
transaction
Modified account
balance
E-Commerce transaction
ID
E-Commerce
authorization code
E-Commerce operation
result code
The unique ID of the xdr
record
163
Porta
Switch
PortaBilling API
Parameters: GetSipStatusRequest
Return value: GetSipStatusResponse
Realm: administrator, reseller
This method allows an API user to check if an account is currently being
used by a SIP UA to register with the SIP server and retrieve registration
information, such as the user agents identification or URI.
get_account_product_info
Parameters: GetAccountProductInfoRequest
Return value: GetProductInfoResponse
Realm: retail customer, account
This method allows an API user to get the information about the
accounts product.
get_moh_list_info
Parameters: GetAccountMOHListInfoRequest
Return value: GetAccountMOHListInfoResponse
Realm: retail customer, account
This method allows an API user to get the list of accounts music on hold
entries.
get_member_of_huntgroups_list
Parameters: GetMemberOfHuntgroupsList
Return value: GetHGListInfoResponse
Realm: retail customer, account
This method allows an API user to get accounts huntgroup.
get_permitted_sip_proxies_info
Parameters: GetAccountPermittedProxyInfoRequest
Return value: GetAccountPermittedProxyInfoResponse
Realm: retail customer, account
This method allows an API user to get the list of permitted IP addresses
for proxying.
164
Porta
Switch
PortaBilling API
get_xdr_list
Parameters: GetAccountXDRListRequest
Return value: GetAccountXDRListResponse
Realm: administrator, reseller, retail customer, account
This method retrieves Account XDR records.
mark_xdr_out_of_turn
Parameters: MarkXdrOutOfTurnRequest
Return value: MarkXdrOutOfTurnResponse
Realm: administrator
This method allows an administrator to include a transaction on an outof-turn invoice to be issued on demand.
get_services_consumption
Parameters: GetAccountConsumedServiceRequest
Return value: GetAccountConsumedServiceResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the information about services
consumed by an account.
Property
i_account
Type
int
Description
The unique ID of the account
GetSipStatusResponse structure
Property
sip_status
sip_info
Type
int
SipStatusInfo
structure
Description
1 online (account is used by SIP UA
to register with the SIP server)
0 offline
Information about SIP UA registration
SipStatusInfo structure
Property
username
Type
string
Description
Username of registered account; same
as accounts ID attribute from
AccountInfo
165
Porta
Switch
PortaBilling API
i_env
int
user_agent
contact
string
string
domain
string
callid
flags
expires
string
int
dateTime,
ISO format
last_modified dateTime,
ISO format
GetAccountProductInfoRequest structure
Property
i_account
Type
int
Description
The unique ID of the
account record
GetProductInfoResponse structure
Property
product_info
Type
ProductInfo structure
Description
Product data record
GetAccountMOHListInfoRequest structure
Property
i_account
Type
int
Description
The unique ID of the
account record
GetAccountMOHListInfoResponse structure
Property
moh_list_info
Type
Description
AccountMOHListInfo Account MOH List
structure
object
AccountMOHListInfo structure
Property
system_default_i_moh
Type
int
is_moh_update_disabled
int
Description
Default system MOH
object
Indicates whether the
MOH update is
allowed
166
Porta
Switch
PortaBilling API
default_moh_list
Array of
MOHInfo
structures
account_defined_moh_list Array of
MOHInfo
structures
aggregated_moh_list
Array of
MOHInfo
structures
MOHInfo structure
Property
i_account
Type
int
Description
The unique ID of the
account record
GetHGListInfoResponse structure
Property
i_account
Type
int
Description
The unique ID of the
account record
GetAccountPermittedProxyInfoResponse structure
Property
Type
is_add_new_sip_proxy_allowed int
permitted_sip_proxies
Array of
PermittedSip
ProxiesInfo
structures
Description
Indicates whether the
adding of a new
proxy is allowed
List of permitted SIP
proxies
PermittedSipProxiesInfo structure
Property
proxy_name
Type
string
Description
Name of the proxy
167
Porta
Switch
PortaBilling API
GetAccountXDRListRequest structure
Property
i_account
i_service
Type
int
int
limit
offset
int
int
from_date
dateTime
to_date
dateTime
format
string
get_total
int
show_unsuccessful int
Description
The unique ID of the account
ID of Service; refers to
Services table
Number of rows to retrieve
Number of rows to skip at
the beginning of the list
Get xDRs with bill_time
starting from this date
Get xDRs with bill_time
before this date
This parameter allows to get
xDRs in other formats via
SOAP attachment. Currently
only the csv format is
supported
Get the total number of the
retrieved xDRs
Show xDRs of unsuccessful
attempts
GetAccountXDRListResponse structure
Property
xdr_list
total
Type
array of XDRInfo
structure
int
Description
List of XDRs
The number of the retrieved
xDRs
XDRInfo structure
Property
Type
i_xdr
i_service
int
int
i_dest
int
CLI
CLD
charged_amount
charged_quantity
country
subdivision
description
disconnect_cause
string
string
float
int
string
string
string
string
Description
ID of XDR record
The unique ID of the service
record
The unique ID of the
destination record
Calling Line Identification
Called Line Identification
Amount charged
Units charged
Country
Country Subdivision
Destination description
The code of disconnect cause
168
Porta
Switch
PortaBilling API
disconnect_reason
bill_status
connect_time
unix_connect_time
string
string
dateTime
int
disconnect_time
unix_disconnect_time
dateTime
int
bill_time
bit_flags
dateTime
int
call_recording_url
string
call_recording_server_url string
MarkXdrOutOfTurnRequest structure
Property
i_xdr
Type
Description
The unique ID of the xdr record
int
MarkXdrOutOfTurnResponse structure
Property
success
Type
Description
1 if success, 0 in case of failure.
int
GetAccountConsumedServiceRequest structure
Property
i_account
Type
int
i_service
int
from_date
dateTime
to_date
dateTime
limit
int
offset
int
Description
The unique ID of the
account record
The unique ID of the
service record
Get information recorded
starting from this date
Get information recorded
before this date
Number of services to
retrieve
Number of rows to skip at
the beginning of the list
169
Porta
Switch
PortaBilling API
get_total
int
show_unsuccessful
int
GetAccountConsumedServiceResponse structure
Property
consumed_service_list
total
Type
Array of
ConsumedServic
esInfo structures
int
Description
List of
ConsumedServices
records
Total number of the
retrieved services
ConsumedServiceInfo structure
Property
i_service
int
Type
service_name
unit
string
string
charged_amount
charged_quantity
string
string
total
total_sessions
rating_base
int
int
string
rate_unit
string
Description
The unique ID of the service
record
The name of the service
A customer-visible name for
the units in which service is
measured
Amount charged
The number of charged units
in which the service is
measured
Total number of records
Total number of the sessions
Specifies which particular
parameter is used to calculate
charges, e.g. session time,
amount of data transferred
and the like.
A customer-visible name for
the units used to calculate
service charges
Parameters: GetAccountPaymentMethodInfoRequest
Return value: GetAccountPaymentMethodInfoResponse
Realm: administrator, reseller, retail customer, account
170
Porta
Switch
PortaBilling API
This method allows an API user to retrieve the information about the
payment method (e.g. payment card info) assigned to an account.
update_payment_method
Parameters: UpdateAccountPaymentMethodRequest
Return value: UpdateAccountPaymentMethodResponse
Realm: administrator, reseller
This method allows an API user to assign a preferred payment method to
an account. For online payment methods, all the information required by
the payment processor should be provided, and an appropriate payment
processor must be set up and properly configured beforehand.
Note that the number, name, address, and / or zip fields are not mandatory in
the PaymentMethodInfo structure as long as credit card was already set.
topup_account
Parameters: TopupAccountRequest
Return value: TopupAccountResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to top up an account using voucher.
estimate_taxes
Parameters: AccountEstimateTaxesRequest
Return value: AccountEstimateTaxesResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to calculate the taxes for a payment.
Property
i_account
Type
int
Description
The unique ID of the account
GetAccountPaymentMethodInfoResponse structure
Property
Type
Description
payment_method_info PaymentMethodInfo PaymentMethodInfo
structure
object
171
Porta
Switch
PortaBilling API
PaymentMethodInfo structure
Property
i_account
Type
Description
int
The unique ID of the
account
payment_method_info PaymentMethodInfo Data about payment
structure
method; see Access
to Customer
Information section
above
UpdateAccountPaymentMethodResponse structure
Property
i_credit_card
Type
Description
int
ID of modified payment method record
TopupAccountRequest structure
Property
account_info
Type
AccountInfo
structure
voucher_info
VoucherInfo
structure
use_debit_voucher
string
Description
Data about an account, see
AccountInfo above
Note: only i_account is used
The information about a
voucher, see VoucherInfo
below
Specifies whether to use
another prepaid card to
recharge an account (both
accounts must have the same
main product assigned)
TopupAccountResponse structure
amount
Property
Type
float
balance
float
billing_model
currency
credit_limit
string
string
float
Description
Amount by which the
accounts balance will
increase
The current amount of the
accounts balance
Shows the account type
Shows the account currency
The accounts credit limit
value
172
Porta
Switch
PortaBilling API
available_funds
float
breakage
float
customer_balance
customer_credit_limit
float
float
VoucherInfo structure
Property
id
Type
string
Description
The unique ID of the voucher
AccountEstimateTaxesRequest structure
Property
i_account
xdr_list
Type
int
array of XDRInfo
structures
Description
The unique ID of the
account
List of XDRs
AccountEstimateTaxesResponse structure
Property
taxes_list
Type
array of
EstimatedTax
structures
Description
List of calculated taxes
EstimatedTax structure
Property
amount
Type
float
Description
Tax amount
173
Porta
Switch
level_name
PortaBilling API
string
Tax name
Possible values for BillSoft:
Federal
State
County
City
Un-incorporated
Possible values for Suretax:
Federal
State
County
City
Local
Reporting Agency
Possible values for VAT:
VAT
Possible values for GST:
GST
name
type
string
string
Parameters: GetAccountServiceFeaturesRequest
Return value: GetAccountServiceFeaturesResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to access service features data
update_service_features
Parameters: UpdateAccountServiceFeaturesRequest
Return value: UpdateAccountServiceFeaturesResponse
Realm: administrator, reseller, retail customer, account
174
Porta
Switch
PortaBilling API
This method allows an API user to update settings for account service
features.
Property
i_account
Type
Description
The unique ID of the account
int
GetAccountServiceFeaturesResponse structure
Property
i_account
Type
int
Description
The unique ID of the account
UpdateAccountServiceFeaturesRequest structure
Property
i_account
Type
int
service_features
array of
ServiceFeatureInfo
structures
detailed_response int
Description
The unique ID of the
account
List of service features
Specifies whether a list of
Service Features will be
returned in the response or
not
UpdateAccountServiceFeaturesResponse structure
Property
Type
Description
i_account
int
The unique ID of the account
service_features array of
List of service features
ServiceFeatureInfo
structures
PaymentMethodInfo structure
Property
value
name
Type
int
string
Description
The unique ID of the routing plan record
The routing plan name
175
Porta
Switch
PortaBilling API
Parameters: GetUAInfoRequest
Return value: GetUAInfoResponse
Realm: administrator, reseller
This method allows an API user to get the information about the UA (IP
phone) assigned to account.
assign_ua
Parameters: AssignUARequest
Return value: AssignUAResponse
Realm: administrator, reseller
This method allows an API user to assign a UA to an account.
release_ua
Parameters: ReleaseUARequest
Return value: ReleaseUAResponse
Realm: administrator, reseller
This method allows an API user to release an accounts UA.
Property
i_account
Type
int
Description
The unique ID of the account
GetUAInfoResponse structure
Property
Type
i_ua
int
name
mac
port
inventory_id
profile
type
string
string
int
string
string
string
Description
ID of UA record; refers to the
UA table
Name of UA
MAC address of UA
UA port used by this account
Inventory ID of UA
Name of UA profile
UA type
176
Porta
Switch
PortaBilling API
AssignUARequest structure
Property
i_account
i_ua
port
Type
int
int
int
Description
The unique ID of the account
ID of UA record
UA port used by this account
Note: if the type of UA is
PortaPhone, the port field is not
mandatory
AssignUAResponse structure
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
ReleaseUARequest structure
Property
i_account
Type
int
Description
The unique ID of the account
ReleaseUAResponse structure
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
Parameters: GetAccountStateRequest
Return value: GetAccountStateResponse
Realm: administrator
This method allows an administrator to obtain the current condition
applied to the account by the Fraud Prevention feature (e.g. Active,
Screened, Quarantined).
set_account_state
Parameters: SetAccountStateRequest
Return value: SetAccountStateResponse
Realm: administrator
177
Porta
Switch
PortaBilling API
Property
i_account
i_acc_state_type
Type
Description
int
The unique ID of the account record
int
State of the account:
state_name
service_type
0 normal
1 screening allow calls only
via screening app
2 screening user failed to validate 1x
3 screening user failed to validate 2x
4 screening user failed to validate 3x
5 quarantine disallow any calls (e.g.
when user failed to validate 4th time)
GetAccountStateResponse structure
Property
value
Type
string
Description
Accounts actual state
SetAccountStateRequest structure
Property
i_account
i_acc_state_type
Type
Description
int
The unique ID of the account record
int
State of the account:
state_name
service_type
value
0 normal
1 screening allow calls only
via screening app
2 screening user failed to validate 1x
3 screening user failed to validate 2x
4 screening user failed to validate 3x
5 quarantine disallow any calls (e.g.
when user failed to validate 4th time)
178
Porta
Switch
PortaBilling API
SetAccountStateResponse structure
Property
success
Type
int
Description
Indicates whether the
accounts state setting
was:
1 successful
0 unsuccessful
Parameters: GetAccountFollowMeRequest
Return value: GetAccountFollowMeResponse
Realm: administrator, reseller, retail customer, account
This method retrieves the follow-me settings associated with an account.
Follow-me entries (numbers) are returned in the order of their priority.
update_account_followme
Parameters: UpdateAccountFollowMeRequest
Return value: UpdateAccountFollowMeResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to update the follow-me settings
associated with an account. It does not add or update follow-me entries.
add_followme_number
Parameters: AddFollowMeNumberRequest
Return value: AddUpdateFollowMeNumberResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to add a new follow-me entry (number)
associated with an account. If successful, a new ID number is returned.
Note: the newly added number becomes the last entry in the list of the
accounts follow-me numbers.
update_followme_number
Parameters: UpdateFollowMeNumberRequest
Return value: AddUpdateFollowMeNumberResponse
Realm: administrator, reseller, retail customer, account
179
Porta
Switch
PortaBilling API
Parameters: DeleteFollowMeNumberRequest
Return value: DeleteFollowMeNumberResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to delete an existing follow-me entry
(number) associated with the account. It requires an ID number returned,
for example, by the add_followme_number method.
arrange_followme_numbers
Parameters: ArrangeFollowMeNumbersRequest
Return value: ArrangeFollowMeNumbersResponse
Realm: administrator, reseller, retail customer, account
This method arranges follow-me entries in a specified order.
Property
i_account
Type
int
Description
The unique ID of the account
GetAccountFollowMeResponse structure
Property
followme_info
followme_numbers
Type
Description
FollowMeInfo structure Follow-me settings
associated with the
account
array of
List of follow-me
FollowMeNumberInfo numbers associated
structures
with the account
UpdateAccountFollowMeRequest structure
Property
i_account
followme_info
Type
int
FollowMeInfo
structure
Description
The unique ID of the account
Follow-me settings associated
with the account
180
Porta
Switch
PortaBilling API
UpdateAccountFollowMeResponse structure
Property
i_follow_me
Type
int
Description
The unique ID of the
follow-me database
record
FollowMeInfo structure
Property
i_account *
i_follow_me **
mode
sequence
timeout
max_forwards
Type
Description
int
The unique ID of the account
database record
int
The unique ID of the follow-me
database record
string (default Deprecated: See Using Service
is Never)
Feature Methods to Change
FollowMe Settings in the Appendix
string (default Order of use of numbers:
is Order)
Order as listed
Random random order
Simultaneous all at once
int (between 0 Timeout, in seconds
and 999)
int
For follow-me or advanced call
forwarding, you must also provide a
value for the Maximum Forwards
parameter, so as to limit the number
of concurrently active forwarding
destinations allowed. Please note that
you do not have to limit the total
number of phone numbers entered,
but rather the number of phone
numbers active at any given moment
of time. For instance, a user may have
a list of 20 numbers, each active in its
own time period, some temporarily
turned off, and so on. When call
forwarding is done, PortaBilling will
compute a list of numbers which may
be used at that moment, and choose
only the first N in the list, where N is
the number specified here.
FollowMeNumberInfo structure
Property
i_account *
Type
int
Description
The accounts unique ID
181
Porta
Switch
PortaBilling API
i_follow_me **
int
i_follow_me_number **
int
name
string, 32
chars max
int
(between
0 and 90;
default 15)
string, 32
chars max
string, 255
chars max
string,
64K chars
max
string
(Y/N)
int
timeout
redirect_number
period
period_description
active
i_follow_order **
domain
string, 1
char
keep_original_cld
string
(Y/N)
keep_original_cli
string
(Y/N/I)
182
Porta
Switch
PortaBilling API
use_tcp
string
max_sim_calls
int
(between
1 and
65535)
AddFollowMeNumberRequest structure
Property
number_info
Type
Description
FollowMeNumberInfo Follow-me number to be
structure
added to accounts follow-me
entries
UpdateFollowMeNumberRequest structure
Property
i_follow_me_number
number_info
Type
Description
int
ID of follow-me
number database
record to be updated
FollowMeNumberInfo Follow-me number
structure
to be added to
accounts follow-me
entries
AddUpdateFollowMeNumberResponse structure
Property
i_follow_me_number
Type
Description
ID of follow-me number
database record
int
DeleteFollowMeNumberRequest structure
Property
i_follow_me_number
Type
int
Description
ID of follow-me number
database record to be deleted
DeleteFollowMeNumberResponse structure
Property
success
Type
int
Description
1 in case of success
0 in case of failure
183
Porta
Switch
PortaBilling API
ArrangeFollowMeNumbersRequest structure
Property
i_account
numbers
Type
int
array of int
Description
The unique ID of the account
List of i_follow_me_number
values in the desired order; this
may be partial, i.e. it is possible
to swap the first two numbers,
providing two values only
ArrangeFollowMeNumbersResponse structure
Property
success
Type
int
Description
1 in case of success
0 in case of failure
Parameters: GetCallBarringOptionsRequest
Return value: GetCallBarringOptionsResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to retrieve all available options for
account call barring and check their status.
update_call_barring_options
Parameters: UpdateCallBarringOptionsRequest
Return value: UpdateCallBarringOptionsResponse
Realm: administrator, reseller
This method allows an API user to update options for account call
barring, i.e. enable or disable the corresponding items.
Property
i_cp_condition
Type
int
name
string
rule_description string
state
string
Description
The unique ID of call barring
rule
Call barring rule name
User-friendly description of this
rule
Y if enabled, N if disabled
184
Porta
Switch
PortaBilling API
GetCallBarringOptionsRequest structure
Property
i_account
Type
Description
The unique ID of the
account
int
GetCallBarringOptionsResponse structure
Property
options
Type
Description
array of
Call barring options
CallBarringRuleInfo
structures
UpdateCallBarringOptionsRequest structure
Property
i_account
Type
int
options
array of
CallBarringRuleInfo
structures
Description
The unique ID of the
account
Call barring options
UpdateCallBarringOptionsResponse
Property
success
Type
int
Description
1 in case of success,
0 in case of failure
Parameters: AddCPConditionRequest
Return value: AddCPConditionResponse
Realm: administrator, reseller
This method allows an API user to add a call screening condition.
update_cp_condition
Parameters: UpdateCPConditionRequest
Return value: UpdateCPConditionResponse
Realm: administrator, reseller
This method allows an API user to update an existing call screening
condition.
185
Porta
Switch
PortaBilling API
get_cp_condition_list
Parameters: GetCPConditionListRequest
Return value: GetCPConditionListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to retrieve the list of call screening
conditions defined for a given customer.
add_cp_rule
Parameters: AddCPRuleRequest
Return value: AddCPRuleResponse
Realm: administrator, reseller
This method allows an API user to create a new call screening rule.
delete_cp_rule
Parameters: DeleteCPRuleRequest
Return value: DeleteCPRuleResponse
Realm: administrator, reseller
This method allows an API user to delete an existing call screening rule.
update_cp_rule
Parameters: UpdateCPRuleRequest
Return value: UpdateCPRuleResponse
Realm: administrator, reseller
This method allows an API user to update an existing call screening rule.
get_cp_rule_list
Parameters: GetCPRuleListRequest
Return value: GetCPRuleListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to retrieve the information about defined
call screening rules.
arrange_cp_rules
Parameters: ArrangeCPRulesRequest
Return value: ArrangeCPRulesResponse
Realm: administrator, reseller
This method allows an API user to redefine the order in which call
screening rules are applied.
186
Porta
Switch
PortaBilling API
Property
i_account
int
i_cp_condition
int
type
string
name
numbers
string
Array of
CPConditionNumberInfo
structures
CPConditionTimeWindow
Info structure
string
time_window
is_used
Type
Description
The unique ID of the
account
The unique ID of the
call screening
condition record
One of the following:
ToNumber
FromNumber
TimeWindow
Name of condition
Used by ToNumber
and FromNumber
condition types
Used by TimeWindow
condition type
Read-only whether
the condition is used
in a rule (Y / N)
CPConditionTimeWindowInfo structure
Property
period
description
Type
Description
Time::Period string
Description of period
string
string
CPConditionNumberInfo structure
Property
number
onnet
Type
Description
Phone number
Whether the number is
onnet (Y / N)
string
string
CPRuleInfo structure
Property
Type
i_cp_rule
int
i_account
int
from_number_i_cp_condition
int
Description
The unique ID of
the call screening
condition record
The unique ID of
the account
The unique ID of
187
Porta
Switch
PortaBilling API
to_number_i_cp_condition
int
time_window_i_cp_condition
int
order_number
int
is_active
string
action
int
the FromNumber
condition
The unique ID of
the ToNumber
condition
The unique ID of
the TimeWindow
condition
Read-only ordinal
number for this rule
in the rule set
Whether rule is
enabled (Y / N)
Action (for how to
make the correct
value, see the Service
Features example in
the Appendix)
AddCPConditionRequest structure
Property
cp_condition_info
Type
CPConditionInfo
structure
Description
Call screening condition
structure
AddCPConditionResponse structure
Property
i_cp_condition
Type
int
Description
The unique ID of the
call screening condition
record
UpdateCPConditionRequest structure
Property
cp_condition_info
Type
CPConditionInfo
structure
Description
Call screening condition
structure
UpdateCPConditionResponse structure
Property
i_cp_condition
Type
int
Description
The unique ID of the
call screening condition
rule
GetCPConditionListRequest structure
Property
i_account
Type
int
Description
The unique ID of the
188
Porta
Switch
type
PortaBilling API
account
One of the following:
FromNumber
ToNumber
TimeWindow
string
GetCPConditionListResponse structure
Property
cp_condition_list
Type
Array of
CPConditionInfo
structures
Description
Array of
CPConditionInfo
structures
AddCPRuleRequest structure
Property
cp_rule_info
Type
CPRuleInfo
structure
Description
Call screening rule info
structure
Note: i_account is a
mandatory field
AddCPRuleResponse structure
Property
i_cp_rule
Type
int
Description
The unique ID of the
call screening rule
record
DeleteCPRuleRequest structure
Property
i_cp_rule
Type
int
Description
The unique ID of the
call screening rule
record
DeleteCPRuleResponse structure
Property
success
Type
int
Description
One of the following:
1 success
0 failed
UpdateCPRuleRequest structure
Property
cp_rule_info
Type
CPRuleInfo
structure
Description
Call screening rule info
structure
Note: i_account will be
ignored
189
Porta
Switch
PortaBilling API
UpdateCPRuleResponse structure
Property
i_cp_rule
Type
int
Description
The unique ID of the
call screening rule
record
GetCPRuleListRequest structure
Property
i_account
Type
int
offset
int
limit
int
get_total
int
Description
The unique ID of the
account
Number of rows to
retrieve
Number of rows to skip
at the beginning of the
list
Get total number of the
retrieved rate data
records
GetCPRuleListResponse structure
Property
cp_condition_list
total
Type
Description
Array of
Array of CPRuleInfo structures
CPRuleInfo
structures
int
Total number of records
ArrangeCPRulesRequest structure
Property
i_account
int
Type
rules
Array of int
Description
The unique ID of the
account
Array of IDs of
CPRuleInfo structures
ArrangeCPRulesResponse structure
Property
success
Type
int
Description
One of the following:
1 success
0 failed
190
Porta
Switch
PortaBilling API
Parameters: GetAccountCustomFieldsValuesRequest
Return value: GetAccountCustomFieldsValuesResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of accounts custom fields.
update_custom_fields_values
Parameters: UpdateAccountCustomFieldsValuesRequest
Return value: UpdateAccountCustomFieldsValuesResponse
Realm: administrator, reseller
This method allows an API user to modify customers custom fields.
get_custom_fields_schema
Parameters: GetAccountCustomFieldsSchemaRequest
Return value: GetAccountCustomFieldsSchemaResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of accounts custom fields
with information about their types and allowed values.
Property
i_account
Type
int
Description
The unique ID of the
account record
GetAccountCustomFieldsValuesResponse structure
Property
custom_fields_values
Type
Array of
CustomFieldsValues
Info structures
Description
List of Custom Fields
values for the given
account
CustomFieldsValuesInfo structure
Property
name
text_value
Type
string
string
Description
Custom Field name
Custom Field value
191
Porta
Switch
db_value
PortaBilling API
string
UpdateAccountCustomFieldsValuesRequest structure
Property
i_account
custom_fields_values
Type
Description
int
The unique ID of the
account record
Array of
List of Custom Fields
CustomFieldsValues values for the given
Info structures
account
UpdateAccountCustomFieldsValuesResponse structure
Property
i_account
custom_fields_values
Type
int
Array of
CustomFieldsValues
Info structures
Description
The unique ID of the
account record
List of Custom Fields
values for the given
account
GetAccountCustomFieldsSchemaRequest structure
Property
i_account
Type
int
Description
The unique ID of the
account record. If not
provided, the ID of the
entity that is logged in
will be used
GetAccountCustomFieldsSchemaResponse structure
Property
custom_fields
Type
Array of
CustomFieldsInfo
Description
List of Custom Fields
with information for
the given account
CustomFieldsValuesInfo structure
192
Porta
Switch
PortaBilling API
Parameters: GetPhoneBookRecordRequest
Return value: GetPhoneBookRecordResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to obtain the accounts Phonebook
record.
get_phonebook_list
Parameters: GetPhoneBookListRequest
Return value: GetPhoneBookListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to obtain the list of the accounts
Phonebook records.
add_phonebook_record
Parameters: AddUpdatePhoneBookRecordRequest
Return value: AddUpdatePhoneBookRecordResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to add a record to the accounts
Phonebook.
update_phonebook_record
Parameters: AddUpdatePhoneBookRecordRequest
Return value: AddUpdatePhoneBookRecordResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to update a record in the accounts
Phonebook.
delete_phonebook_record
Parameters: DeletePhoneBookRecordRequest
Return value: DeletePhoneBookRecordResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to delete a record from the accounts
Phonebook.
193
Porta
Switch
PortaBilling API
Property
Type
Description
i_account_phonebook int
The unique ID of the Phonebooks
record
GetPhoneBookRecordResponse structure
Property
Type
phonebook_rec_info PhoneBookRecInfo
structure
Description
Phonebook record
data
PhoneBookRecInfo structure
Property
Type
Description
i_account_phonebook int
The unique ID of a Phonebook record
(used only for updating an existing
record)
i_account
int
The unique ID of an account record
(used only for adding a new record)
phone_number
string Contact phone number
phone_type
string Type of phone record (work, home,
mobile, other)
name
string Contact name
dial_id
string Abbreviated dial assigned
lock_type
string Lock type of Phonebook record (None,
Number, Full); default is None
unlock_time
string Time when Phonebook record will be
unlocked
favorite_rating
string Flag that indicates whether a phone
record is a privileged record or not (Y,
N); default is N
GetPhoneBookListRequest structure
Property
Type
Description
offset
int
Starting position for a
Phonebook list
limit
int
Limit of Phonebook records (the
maximum quantity of Phonebook
records)
phone_number_pattern string Phone Number Pattern (default is %)
i_account
int
ID of the owner account
194
Porta
Switch
PortaBilling API
GetPhoneBookListResponse structure
Property
phonebook_rec_list
Type
Array of
PhoneBookRecInfo
structures
Description
List of Phonebook
records
AddUpdatePhoneBookRecordRequest structure
Property
phonebook_rec_info
Type
Description
PhoneBookRecInfo Phonebook record data
structure
AddUpdatePhoneBookRecordResponse structure
Property
i_account_phonebook
Type
int
Description
The unique ID of the
Phonebooks record
DeletePhoneBookRecordRequest structure
Property
i_account_phonebook
Type
int
Description
The unique ID of the
PhoneBooks record
DeletePhoneBookRecordResponse structure
Property
Type
success
int
Description
One of the following:
1 success
0 failed
Parameters: UpdateAccountsBatchRequest
Return value: UpdateAccountsBatchResponse
Realm: administrator, reseller
This method allows an API user to update accounts of a particular batch.
Type Reference
UpdateAccountsBatchRequest structure
Property
i_batch
Type
int
batch
string
Description
The unique ID of batch
record
The batch name
195
Porta
Switch
PortaBilling API
control_number
string
activation_date
date
expiration_date
date
life_time
int
credit
float
charge
float
reapply_subscriptions
int
activate
int
terminate
int
blocked
string
redirect_number
unified_messaging
string
string
ivr_language
i_distributor
i_time_zone
string
int
int
i_customer_site
int
i_product
int
addon_products
Array of Int
Comma-separated integer
control numbers and/or
ranges of integer control
numbers. For example: 3,59,12
The date from which
accounts are usable
The date from which
accounts will become
unusable
Accounts will expire on the
first usage time + lifetime
days
The amount to credit
accounts
The amount to charge
accounts
Product subscriptions will
be reapplied for accounts
Indicates that accounts
should be activated. Only
for debit accounts
and vouchers
Indicates that accounts
should be terminated
Indicates whether accounts
should be blocked
or unblocked
Associated number
Enable / disable or set
as defined by the product the
UM service feature
Preferred IVR language
The unique ID of Distributor
The unique ID of Time
Zone record
The unique ID of Customer
Site record
The unique ID of Product
record
The list of effective add-on
products for the given
accounts
UpdateAccountsBatchResponse structure
Property
Type
Description
196
Porta
Switch
success
PortaBilling API
int
Parameters: GenerateAccountsRequest
Return value: GenerateAccountsResponse
Realm: administrator, reseller
This method allows an API user to generate batch of accounts.
Type Reference
GenerateAccountsRequest structure
Property
i_customer
int
Type
opening_balance
float
credit_limit
float
billing_model
int
inactive
string
blocked
string
batch
string
i_customer_site
int
i_product
int
addon_products
Array Of Int
Description
The unique ID of the
customer record
The initial balance of the
account
The accounts credit limit
value. Only for credit
accounts; default: 0
One of the following:
-1 Debit.
0 Recharge Voucher.
1 Credit
Shows whether account will
be inactive after creation.
Only for Debit accounts
and Recharge vouchers. The
default value is: Y
Shows whether account will
be blocked after creation;
default: N
Name of an existing batch
or a new one
The unique ID of a customer
site record
The unique ID of the product
record
The list of effective add-on
products for the given
197
Porta
Switch
PortaBilling API
i_time_zone
int
language
out_date_format
string
string
out_time_format
string
out_date_time_format
string
in_date_format
string
in_time_format
string
ecommerce_enabled
string
i_distributor
int
activation_date
date
expiration_date
date
life_time
int
inactivity_expire_time
int
gen_amount
int
gen_method
string
gen_id_prefix
string
gen_id_length
int
gen_start_id
string
accounts
The unique ID of the time
zone record
The accounts language
Output format for the date
indication
Output format for the time
indication
Output format for full date /
time indication
Input format for the date
indication
Input format for the time
indication
Allow the accounts owners
to make online payments
or set up periodical payments
on the account self-care
interface
The unique ID of the
distributor. Only for Debit
accounts and Recharge
vouchers
The date when the account
becomes usable
The date when the account
becomes unusable
Accounts will expire on the
first usage time + lifetime
days
Specifies the number of days
the account remains active
after its last use or recharge.
Amount of accounts
to generate
The accounts generation
method:
R Random
S Sequential
D DID Inventory
Account ID prefix. Only
for the Random method
Account ID length. Only
for the Random method
Account start ID. Only
for the Sequential method
198
Porta
Switch
PortaBilling API
gen_i_do_batch
int
gen_start_did
string
gen_h323_method
string
gen_h323_length
int
gen_credentials_method
string
i_account_balance_cont
rol_type
int
GenerateAccountsReponse structure
Property
success
Type
int
Description
Returns 1 if accounts
generation procedure
has been placed
Methods
get_node_list
Parameters: GetNodeListRequest
Return value: GetNodeListResponse
Realm: administrator
This method allows an API user to get the list of nodes.
199
Porta
Switch
PortaBilling API
get_node_info
Parameters: GetNodeInfoRequest
Return value: GetNodeInfoResponse
Realm: administrator
This method allows an API user to get a node record from the database.
Type Reference
GetNodeListRequest structure
Property
node_list
Type
Array of
NodeInfo
structure
Description
Set of node data records
NodeInfo structure
Property
i_node
ip
h323_id
Type
int
string
string
name
radius_client
string
string
radius_key
string
i_node_type
rtpp_level
int
int
pod_server
string
Description
The unique ID of the node
The IP address of the node
For a VoIP node, this
is equivalent to a hostname
for an internet server (e.g.
mail1.cyberdyne.com), i.e.
a descriptive, humanreadable name used
for identification purposes
The logical name of the node
Shows if the node
can provide accounting
records to the Radius server.
Possible values: Y, N
This is the authentication
key for all Radius interactions
Unique ID of the node type
Describes the NAT traversal
capabilities of this node
This enables the eventtriggered interaction with
the RFC 3576-based service
controlling the network
sessions on the NAS.
200
Porta
Switch
PortaBilling API
Possible values: Y,
N
GetNodeInfoRequest structure
Property
i_node
Type
int
Description
Unique ID of the node
GetNodeInfoResponse structure
Property
node_info
Type
Array of
NodeInfo
structure
Description
Set of node data records
Methods
get_vendor_batch_list
Parameters: GetVendorBatchListRequest
Return value: GetVendorBatchListResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to get the list
of DID vendor batches filtered by various parameters. The DID
inventory must be accessible to the user making the request. Only those
batches containing DID numbers owned by the user will be returned.
get_number_list
Parameters: GetDIDNumberListRequest
Return value: GetDIDNumberListResponse
Realm: administrator, reseller
This method allows an API user to get the list of active DID numbers
filtered by various parameters.
get_number_info
Parameters: GetDIDNumberInfoRequest
Return value: GetDIDNumberInfoResponse
Realm: administrator, reseller
201
Porta
Switch
PortaBilling API
This method allows an API user to get a DID number record from the
database.
reserve_number
Parameters: ReserveDIDNumberRequest
Return value: ReserveDIDNumberResponse
Realm: administrator, reseller
This method allows an API user to reserve a DID number for future use.
The reserved field will be filled with the current date and time.
Note: before the reservation, this method checks that the number was not
already reserved during the specified interval.
release_number
Parameters: ReleaseDIDNumberRequest
Return value: ReleaseDIDNumberResponse
Realm: administrator, reseller
This method allows an API user to release a previously reserved DID
number.
release_did_from_customer
Parameters: ReleaseDIDFromCustomerRequest
Return value: ReleaseDIDFromCustomerResponse
Realm: administrator, reseller, retail customer
This method allows an API user to release a DID number previously
assigned to a customer.
delete_number
Parameters: DeleteDIDNumberRequest
Return value: DeleteDIDNumberResponse
Realm: administrator, reseller
This method allows an API user to delete a DID number from the DID
inventory.
get_customer_numbers
Parameters: GetCustomerDIDNumbersRequest
Return value: GetCustomerDIDNumbersResponse
Realm: administrator, reseller, retail customer, account
202
Porta
Switch
PortaBilling API
This method allows an API user to obtain the list of DID numbers
owned by him. An administrator can obtain the list of DID numbers
owned by a retail customer (but not a reseller).
assign_did_to_account
Parameters: AssignDIDToAccountRequest
Return value: AssignDIDToAccountResponse
Realm: administrator, reseller, retail customer
This method allows an API user to assign a DID number to a customers
account.
cancel_did_assignment
Parameters: CancelDIDAssignmentRequest
Return value: CancelDIDAssignmentResponse
Realm: administrator, reseller, retail customer
This method allows an API user to remove a previously assigned DID
number from a customers account.
assign_did_to_customer
Parameters: AssignDIDToCustomerRequest
Return value: AssignDIDToCustomerResponse
Realm: administrator, reseller, retail customer
This method allows an API user to assign a DID number to a customer.
assign_did_to_reseller
Parameters: AssignDIDToResellerRequest
Return value: AssignDIDToResellerResponse
Realm: administrator
This method allows an API user (administrator) to assign a DID number
to a reseller.
release_did_from_reseller
Parameters: ReleaseDIDFromResellerRequest
Return value: ReleaseDIDFromResellerResponse
Realm: administrator
This method allows an API user (administrator) to release a previously
assigned DID number from a reseller.
203
Porta
Switch
PortaBilling API
Type Reference
GetVendorBatchListRequest structure
Property
country
Type
string
area_code
string
area_code_description string
get_used
int
owner_batch
int
reserve_term
int
limit
offset
int
int
Description
ISO 3166 two-letter country
code
Search pattern for area code
Search pattern for area code
description
Indicates whether to show
batches not containing any
free numbers: 1 (show), 0 (do
not show)
The unique ID of owner
batch record; the list will
include only those vendor
batches containing DID
numbers included in this
particular owner batch
Number of seconds to check
for reserved status; the list
will include only those
vendor batches containing
DID numbers reserved more
than reserve_term seconds
ago (or were not reserved at
all)
Number of rows to retrieve
Number of rows to skip at
the beginning of the list
GetVendorBatchListResponse structure
Property
vendor_batch_list
Type
Description
array of
Set of vendor batch
VendorBatchInfo records
structures
VendorBatchInfo structure
Property
i_dv_batch
Type
int
name
country
string
string
area_code
string
Description
The unique ID of vendor batch
record
Name of vendor batch
ISO 3166 two-letter country
code
Area code
204
Porta
Switch
PortaBilling API
area_code_description string
GetDIDNumberListRequest structure
Property
number
owner_batch
Type
string
int
country
string
area_code
string
area_code_description string
reserve_term
int
usage
string
limit
offset
int
int
Description
Search pattern for DID number
ID of owner batch record for
looking up numbers
ISO 3166 two-letter country
code
Search pattern for area code
Search pattern for area code
description
Number of seconds to check
for reserved status; the list will
include only those DID
numbers that were reserved
more than reserve_term
seconds ago (or were not
reserved at all)
U used (assigned to an
account)
F not used
A all (default value)
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
GetDIDNumberListResponse structure
Property
number_list
Type
Description
array of
Set of DID number records
DIDNumberInfo
structures
DIDNumberInfo structure
Property
i_did_number
int
Type
number
description
owner_batch_name
string
string
string
vendor_batch_name
string
Description
The unique ID of the DID
number record
DID number
DID number description
Name of owner batch this
number belongs to
Name of vendor batch this
number belongs to
205
Porta
Switch
reserved
reserved_stamp
released
PortaBilling API
dateTime, ISO
format
dateTime,
Unix
timestamp
dateTime, ISO
format
assigned
dateTime, ISO
format
i_account
int
GetDIDNumberInfoRequest structure
Property
number
Type
string
Description
DID number
GetDIDNumberInfoResponse structure
Property
number_info
Type
Description
DIDNumberInfo Data for account; see
structure
DIDNumberInfo above
ReserveDIDNumberRequest structure
Property
number
reserve_term
Type
string
int
Description
DID number to reserve
Interval in seconds that is
used to check that the
number was not already
reserved during this interval.
And in such a way prevent
the reservation of numbers
that were reserved less than
specified time ago
ReserveDIDNumberResponse structure
Property
success
timestamp
Type
int
string (Unix
timestamp)
Description
1 success
0 failed
Time stamp of reservation
206
Porta
Switch
PortaBilling API
ReleaseDIDNumberRequest structure
Property
number
timestamp
Type
string
string (Unix
timestamp)
Description
DID number to release
Time stamp of previous
reservation to be checked
ReleaseDIDNumberResponse structure
Property
success
Type
int
Description
1 success
0 failed
ReleaseDIDFromCustomerRequest structure
Property
i_customer
Type
int
Description
The unique ID of the
customer record
ReleaseDIDFromCustomerResponse structure
Property
success
Type
int
Description
1 success
0 failed
DeleteDIDNumberRequest structure
Property
i_did_number
Type
int
Description
DID number to delete
DeleteDIDNumberResponse structure
Property
success
Type
int
Description
1 success
0 failed
GetCustomerDIDNumbersRequest structure
Property
Type
offset
int
limit
i_customer
int
int
i_account
int
Description
Number of rows to skip at
the beginning of the list
Number of rows to retrieve
The unique ID of a retail
customer record
The unique ID of an account
record
GetCustomerDIDNumbersResponse structure
Property
Type
Description
207
Porta
Switch
PortaBilling API
number_list Array of
CustomerDIDNumberInfo
structures
total
int
List of
CustomerDIDNumberInfo
records
Total number of records
CustomerDIDNumberInfo structure
Property
i_did_number
int
Type
did_number
i_customer
string
int
is_provisioned
int
area_name
country_name
i_account
string
string
int
i_master_account
int
master_account_id
string
extension_id
extension_name
pricing
string
string
DIDPricing
structure
Description
The unique ID of the DID
number record
DID number
The unique ID of a customer
record to which the DID
number belongs
Indicates whether this
number is provisioned from
an online DID provider
Area name
Country name
The unique ID of the
account created for this DID
number
The unique ID of the
account this DID number is
assigned to
ID (PIN) of the account this
DID number is assigned to
ID of the extension
Name of the extension
DID number costs info
AssignDIDToAccountRequest structure
Property
i_customer
Type
int
i_did_number
int
i_master_account
int
Description
The unique ID of a customer
record to which the account
belongs
The unique ID of the DID
number record
The unique ID of the
account this DID number is
assigned to
AssignDIDToAccountResponse structure
Property
success
Type
int
Description
1 success
208
Porta
Switch
PortaBilling API
0 failed
CancelDIDAssignmentRequest structure
Property
i_customer
int
Type
i_did_number
int
Description
The unique ID of a customer
record to which the account
belongs
The unique ID of the DID
number record
CancelDIDAssignmentResponse structure
Property
success
Type
int
Description
1 success
0 failed
AssignDIDToCustomerRequest structure
Property
i_customer
int
Type
i_did_number
int
Description
The unique ID of the
customer record to which the
account belongs
The unique DID Number
identifier
AssignDIDToCustomerResponse structure
Property
success
Type
int
Description
1 DID was assigned, 0
DID was not assigned
AssignDIDToResellerRequest structure
Property
i_customer
int
Type
i_did_number
int
Description
The unique ID of the reseller
record
The unique DID Number
identifier
AssignDIDToResellerResponse structure
Property
success
Type
int
Description
1 DID was assigned, 0
DID was not assigned
209
Porta
Switch
PortaBilling API
ReleaseDIDFromResellerRequest structure
Property
i_did_number
Type
int
Description
The unique DID Number
identifier
ReleaseDIDFromResellerResponse structure
Property
success
Type
int
Description
1 in case of success,
0 if failed
Methods
get_provider_info
Parameters: GetProviderInfoRequest
Return value: GetProviderInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get the DID provider information
(e.g., his currency, etc.).
get_countries_list
Parameters: GetDIDCountriesListRequest
Return value: GetDIDCountriesListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve the list of countries where a
number can be allocated from via the DID provider.
210
Porta
Switch
PortaBilling API
Get_areas_list
Parameters: GetDIDAreasListRequest
Return value: GetDIDAreasListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve the list of areas in a specified
country where a number can be allocated from via the DID provider.
Get_numbers_list
Parameters: GetDIDNumbersListRequest
Return value: GetDIDNumbersListResponse
Realm: administrator, reseller, retail customer
This method allows an API user to retrieve the list of DID numbers for a
specified country and area available for allocating from the DID provider.
Note that not all DID providers may provide the list of numbers, so you
may find out whether the DID provider supports this from the
is_numbers_list_available field of the get_provider_info method.
Provision_number
Parameters: ProvisionDIDRequest
Return value: ProvisionDIDResponse
Realm: administrator, reseller, retail customer
This method allows an API user to allocate a DID number from the
provider.
Cancel_provision
Parameters: CancelDIDProvisionRequest
Return value: CancelDIDProvisionResponse
Realm: administrator, reseller, retail customer
This method allows an API user to release a DID number allocated earlier
from the provider.
Type Reference
GetProviderInfoRequest structure
Property
did_provider_info
Type
CustomerDID
ProviderIdent
structure
Description
Parameters used to find a DID
provider configured in
PortaBilling
211
Porta
Switch
PortaBilling API
GetProviderInfoResponse structure
Property
provider_info
Type
DIDProviderInfo
structure
Description
DID provider info
GetDIDCountriesListRequest structure
Property
did_provider_info
Type
CustomerDID
ProviderIdent
structure
Description
Parameters used to find a DID
provider configured in
PortaBilling
GetDIDCountriesListResponse structure
Property
countries_list
Type
Array of
DIDCountryInfo
structures
Description
List of country data records
GetDIDAreasListRequest structure
Property
did_provider_info
req_params
Type
CustomerDID
ProviderIdent
structure
DIDRequestP
arameters
structure
Description
Parameters used to find a DID
provider configured in
PortaBilling
Parameters which have been
received by the
get_countries_list method
GetDIDAreasListResponse structure
Property
areas_list
Type
Array of
DIDAreaInfo
structures
Description
List of area data records
GetDIDNumbersListRequest structure
Property
did_provider_info
req_params
Type
CustomerDID
ProviderIdent
structure
DIDRequestP
arameters
structure
Description
Parameters used to find a DID
provider configured in
PortaBilling
Parameters which have been
received by the
get_countries_list method
212
Porta
Switch
PortaBilling API
GetDIDNumbersListResponse structure
Property
numbers_list
Type
Description
Array of
List of DID number
DIDNumberListInfo records
structures
CustomerDIDProviderIdent structure
int
int
Type
reseller_batch
int
Description
The unique ID of the customer
The unique ID of the DID
Owner Batch assigned to a
customer
The unique ID of the DID
Owner Batch assigned to a
reseller
DIDRequestParameters structure
Property
country_id
Type
int
country_prefix
country_iso
city_prefix
area_prefix
number
country_name
area_name
string
string
string
string
string
string
string
Description
The unique ID of the country
record
Country prefix
Country ISO code
City prefix
Area prefix
DID number
Country name
Area name
DIDNumberListInfo structure
Property
id
number
req_params
pricing
Type
Description
The consecutive
number in the list
string
DID number
DIDRequestParameters Parameters which will
structure
be obtained while
allocating a DID
number
DIDPricing structure
DID number costs
info
int
213
Porta
Switch
PortaBilling API
DIDPricing structure
Property
admin_costs
Type
DIDCostsInfo
structure
reseller_costs
DIDCostsInfo
structure
customer_costs
DIDCostsInfo
structure
Description
Shows the costs associated
with the DID number and
applied to PortaBilling owner
(available for administrator
users only)
Shows the DID number
price for a reseller (available
for administrator and reseller
users only)
Shows the DID number
price for a customer
DIDCostsInfo structure
Property
activation
float
Type
periodic
float
iso_4217
string
Description
A fee applied for a DID
number allocation
A periodic fee applied for the
DID number usage
ISO 4217 code of the
currency in which the fee is
applied
DIDAreaInfo structure
Property
id
name
prefix
req_params
pricing
Type
Description
int
The consecutive area
number in the list
string
Area name
string
Area prefix
DIDRequestParameters Parameters which
structure
should be passed back
while checking
available numbers list
DIDPricing structure
DID number costs
info
DIDProviderInfo structure
Property
Type
is_numbers_list_available int
provider_currency
string
Description
The flag which indicates
whether the DID provider
allows to choose a particular
number from the provided list
The DID provider currency
214
Porta
Switch
PortaBilling API
ProvisionDIDRequest structure
Property
did_provider_info
req_params
Type
CustomerDID
ProviderIdent
structure
DIDRequestP
arameters
structure
Description
Parameters used to find a DID
provider configured in
PortaBilling
Parameters which should be
passed to a DID provider while
ordering a DID number
ProvisionDIDResponse structure
Property
did_order_info
Type
Description
DIDNumberOrderInfo Information about the
structure
DID number order
DIDNumberOrderInfo structure
Property
is_success
Type
int
fault_code
fault_string
did_number
i_did_number
string
string
string
int
country_name
area_name
order_id
did_status
pricing
string
string
string
string
DIDPricing
structure
Description
A flag that informs if the order
request has been successfully
processed
Error code
Error description
Provisioned DID number
Provisioned number ID in the
DID inventory
Country name
Area name
Order ID on DID provider side
DID number status
DID number costs info
DIDCountryInfo structure
Property
id
name
prefix
req_params
Type
Description
The consecutive
country number in the
list
string
Country name
string
Country prefix
DIDRequestParameters The list of the
structure
parameters that should
be passed back while
checking available
areas list
int
215
Porta
Switch
PortaBilling API
CancelDIDProvisionRequest structure
Property
did_provider_info
i_did_number
Type
CustomerDID
ProviderIdent
structure
int
Description
Parameters used to find a DID
provider configured in
PortaBilling
Provisioned number ID in the
DID inventory
CancelDIDProvisionResponse structure
Property
is_canceled
Type
int
Description
Indicates whether the number
has been released
Methods
get_ua_list
Parameters: GetUAListRequest
Return value: GetUAListResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to get the list
of UA devices (IP phones) in the IP phone inventory, filtered by various
parameters.
Add_ua
Parameters: AddUARequest
Return value: AddUAResponse
Realm: administrator, reseller
This method allows an API user to add a new UA device (IP phone) to
the IP phone inventory.
Delete_ua
Parameters: DeleteUARequest
Return value: DeleteUAResponse
Realm: administrator, reseller
216
Porta
Switch
PortaBilling API
Type Reference
GetUAListRequest structure
Property
name
type
profile
description
mac
inventory_id
usage
Type
string
string
string
string
string
string
string
limit
offset
int
int
Description
Search pattern for UA name
Search pattern for UA type
Search pattern for UA profile
Search pattern for UA description
Search pattern for UA MAC address
Search pattern for UA inventory ID
U used (at least one port)
C completely used (all ports)
F not used
A any state (default value)
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
GetUAListResponse structure
Property
ua_list
Type
array of UAInfo
structures
Description
Set of UA records
AddUARequest structure
Property
ua_info
Type
UAInfo structure
Description
UA record
AddUAResponse structure
Property
i_ua
Type
int
Description
ID of UA record
DeleteUARequest structure
Property
i_ua
Type
int
Description
ID of UA record
DeleteUAResponse structure
Property
success
Type
int
Description
1 if operation is
successful, 0 if not
217
Porta
Switch
PortaBilling API
UAInfo structure
Property
i_ua
name
type
i_ua_type
description
mac
inventory_id
profile
port
ascii_key
i_customer
Type
int
string
string
int
string
string
string
string
string
string
int
ua_profile_id
used
notepad
opc_key
string
string
string
string
Description
ID of UA record
UA name
UA type
ID of UA type
UA description
UA MAC address
UA inventory ID
UA Provisioning Profile
UA port used by this account
ASCII Key
ID of customer record (if managed by
reseller)
ID of UA profile
Flag that indicates UA usage
UA notepad
The Opc key
Methods
generate_ua_profile
Parameters: GenerateUaProfileRequest
Return value: GenerateUaProfileResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to generate a
UA (IP device, SIP phone, etc.) profile.
Type Reference
GenerateUaProfileRequest structure
Property
i_ua
Type
int
i_account
int
phone_type
string
Description
The unique ID of a UA record; refers to the
UA table
The unique ID of an account record for
which the profile will be generated
Type of the phone for which profile should
218
Porta
Switch
get_url
PortaBilling API
int
GenerateUaProfileResponse structure
Property
remote_url
Type
string
profile_string_list
Array of
strings
string
filename
Description
The URL for a new generated UA
profile ( server name + file name )
The UA profile content
The name for the new generated
UA profile
Parameters: GetProductListRequest
Return value: GetProductListResponse
Realm: administrator, reseller
This method allows an API user to get the list of products.
get_product_info
Parameters: GetProductInfoRequest
Return value: GetProductInfoResponse
Realm: administrator, reseller
This method allows an API user to get a product record from the
database.
add_product
Parameters: AddProductRequest
Return value: AddProductResponse
Realm: administrator
This method allows an API user to add a product.
219
Porta
Switch
PortaBilling API
update_product
Parameters: UpdateProductRequest
Return value: UpdateProductResponse
Realm: administrator, reseller
This method allows an API user to update an existing product.
delete_product
Parameters: DeleteProductRequest
Return value: DeleteProductResponse
Realm: administrator
This method allows an API user to delete an existing product.
validate_addons_combination
Parameters: ValidateAddonsCombinationRequest
Return value: ValidateAddonsCombinationResponse
Realm: administrator, reseller, customer, account, cc staff
This method allows an API user to validate a combination of add-on
products. Every add-on product has a list of allowable main products that
are compatible with it, and can be assigned to an account together with
this main product.
get_allowed_addons
Parameters: GetAllowedAddonsRequest
Return value: GetAllowedAddonsResponse
Realm: administrator, reseller, cc staff
This method that allows to get a list of allowable add-on products that are
compatible with a main product.
get_priorities_list
Parameters: GetProductPrioritiesListRequest
Return value: GetProductPrioritiesListResponse
Realm: administrator, reseller, cc staff
This method that allows to get the list of product priorities.
220
Porta
Switch
PortaBilling API
Property
i_product
int
Type
default_i_acl
int
subscription_host
breakage
string
float
maintenance_fee
float
info_url
string
i_vd_plan
int
validation_module
name
description
maintenance_effective
_from
subscription_http_ref
erer
maintenance_period
string
string
string
date
continue_uri
hidden
i_customer
iso_4217
string
string
int
string
addon_priority
int
string
string
Description
The unique ID of the product
record
Which ACL should be assigned to
new accounts created with this
product
Self-explanatory
Used in Account Management to
obtain a summary of depleted
(practically unusable) accounts
Amount to charge any account
using this product according to
the schedule defined by the
maintenance period
URL to an external website
describing product features
ID of an assigned volume
discount plan
Self-explanatory
Product name
Product description
Defines when maintenance fee
starts to be applied
Self-explanatory
Defines how often to apply
maintenance fee
Self-explanatory
Self-explanatory
Managed by
ISO4217 code for product
currency
In order to differentiate the addon products there is also a
precedence level parameter
for each add-on product. If there
are more than one add-on
products assigned to an account
they will be sorted according to
the specified precedence level.
221
Porta
Switch
PortaBilling API
service_flag_locks
string
notepad
included_services
fraud_protection
string
Array of
ProductIn
cludedServ
ices
Array of
AllowedPr
oducts
string
addon_effective_from
dateTime
addon_effective_to
dateTime
allowed_products
Allowed values:
0 Main Product
10 Low
15 Medium Low
20 Medium
25 Medium High
30 High
Specifies whether values for each
service feature are allowed to be
changed by administrator and end
user.
Product noteapad
The list of services allowed to be
used with the product
The list of main products allowed
to be used in combination with
the add-on product
The product overdraft protection
mode:
None No protection When
the locking of funds is requested,
this will be done separately for
each session, and will not affect
other sessions; so, effectively,
there will be no locked funds.
This method provides backward
compatibility with Fraud
Protection Off mode in previous
releases. For obvious reasons, it is
not recommended for general use.
Debit Debit accounts only
Fund locking is done only for
debit accounts.
All All accounts Fund locking
is done for all account types
The date when the add-on
product was added to an account
(became effective)
The date from which the add-on
product is no longer effective for
an account (e.g. the administrator
removed the add-on product
from the account properties).
Note: This date is assumed to be
222
Porta
Switch
volume_discount_pla
n_name
topup_addon
is_used
end_user_name
end_user_description
managed_by_user
included_services
allowed_products
fraud_protection
PortaBilling API
string
string
Possible values:
Y an add-on product
N the main product
int
Specifies whether the product is
used or not
string
A clear product name to be
shown to end users on their Selfcare interfaces (e.g. the internal
product name is Phone Book
while the name visible to end
users is Telefonbuch)
string
A clear product name description
to be shown to end users on their
Self-care interfaces
string
Possible values:
Y the add-on product
N the main product
array of int Defines which service types are
available for all accounts that this
product is assigned to
array of int Every add-on product has a list of
allowable main products that are
compatible with it. Specify the
main products with which this
add-on can be assigned to an
account
string
Possible values:
None When the locking
of funds is requested, this
will be done separately for
each session, and will not
affect other sessions; so,
effectively, there will be
no locked funds. For
obvious reasons, it is not
recommended for general
use.
All Fund locking is done
for all account types.
223
Porta
Switch
PortaBilling API
addon_effective_from
dateTime
addon_effective_to
dateTime
i_product_group
int
product_group_name
int
GetProductListRequest structure
Property
i_customer
Type
int
iso_4217
name
offset
string
string
int
limit
int
Description
ID of customer (reseller)
record; if specified, the
product list will be filtered
by the corresponding
reseller
Product currency
Product name
Number of rows to skip at
the beginning of the list
Number of rows to retrieve
GetProductListResponse structure
Property
product_list
Type
Array of ProductInfo
structures
Description
Set of product data records
GetProductInfoRequest structure
Property
i_product
Type
int
name
string
Description
The unique ID of
the product record
Name of product, or part of
the name. Use % sign as
wildcard
224
Porta
Switch
PortaBilling API
GetProductInfoResponse structure
Property
product_info
Type
Description
ProductInfo Complete information
structure
about the product; for
more information, see
above
AddProductRequest structure
Property
product_info
Type
ProductInfo
structure
detailed_response
int
Description
Complete information
about the product; for
more information, see
below
Flag which shows
whether added record
should be returned in
response or not.
AddProductResponse structure
Property
i_product
Type
int
product_info
Array of
ProductInfo
Description
The unique ID of
the product record
Complete information
about the product; for
more information, see
below
UpdateProductRequest structure
Property
product_info
detailed_response
Type
Description
ProductInfo structure Complete information
about the product; for
more information, see
below
int
Flag which shows whether
added record should be
returned in response or
not.
UpdateProductResponse structure
Property
i_product
Type
int
Description
The unique ID of
the product record
225
Porta
Switch
PortaBilling API
product_info
Array of ProductInfo
Complete information
about the product; for
more information, see
below
DeleteProductRequest structure
Property
i_product
Type
Description
The unique ID of
the product record
int
DeleteProductResponse structure
Property
Type
success
int
Description
1 in case of success, 0 in
case of failure
ValidateAddonsCombinationRequest structure
Property
i_product
int
Type
assigned_addons
array of int
Description
The unique ID of the main product
record
The list of add-on products that you
want to assign to an account and
the combination of which should be
validated
ValidateAddonsCombinationResponse structure
Property
addons_combination_val
idation_result
Type
AddonsValidationResults
structure
Description
Validation
information
AddonsValidationResults structure
Property
disallowed_products
service_features_confl
icts
Type
array of
DisallowedProduc
ts structures
array of
ServiceFeaturesCo
nflicts structures
Description
Validation information
Detected conflicts in
Service Features between
the main and add-on
products
226
Porta
Switch
PortaBilling API
DisallowedProducts structure
Property
i_product
Type
int
Description
The unique ID of a product record which
cant be assigned to an account together
with the main product
ServiceFeaturesConflicts structure
Property
sf_name
addon_precedence
conflicting_addons
Type
string
string
Description
Service feature name
In order to differentiate the add-on
products there is also a
precedence level parameter for
each add-on product. If there are
more than one add-on products
assigned to an account they will be
sorted according to the specified
precedence level
array of
List of add-on products with
Conflicting conflicts
AddOns
structures
ConflictingAddOns structure
Property
i_product
Type
int
product_name
is_sf_enabled
string
int
Description
The unique ID of
a product record
Product name
Specifies whether
service features have
been enabled.
GetAllowedAddonsRequest structure
Property
i_product
Type
int
Description
The unique ID of a main product
record
GetAllowedAddonsResponse structure
Property
product_list
Type
array of
ProductInfo
structures
Description
A list of products that are allowed
with the specified main product
227
Porta
Switch
PortaBilling API
GetProductPrioritiesListRequest structure
Property
priorities_list
Type
Description
Array of
The list of product priority
ProductPriorityInfo levels
structure
ProductPriorityInfo structure
Property
name
string
Type
value
int
Description
The name of the product
priority level: Low, Medium
or High
The product priority value:
10 for the Low product
priority level;
20 for the Medium product
priority level;
30 for the High product
priority level
Parameters: GetServiceAndRatingListRequest
Return value: GetServiceAndRatingListResponse
Realm: administrator, reseller
This method allows an API user to get the list of a products rating
entries. Rating entry is the main component of a product definition. It
specifies where your customers are allowed to use a service and how they
should be charged for it.
get_service_and_rating_info
Parameters: GetServiceAndRatingInfoRequest
Return value: GetServiceAndRatingInfoResponse
Realm: administrator, reseller
This method allows an API user to get a products rating entry record
from the database.
228
Porta
Switch
PortaBilling API
add_service_and_rating
Parameters: AddServiceAndRatingRequest
Return value: AddServiceAndRatingResponse
Realm: administrator
This method allows an API user to add a rating entry into a product to
define where users of this product can use the service, and how they will
be charged for it.
update_service_and_rating
Parameters: UpdateServiceAndRatingRequest
Return value: UpdateServiceAndRatingResponse
Realm: administrator, reseller
This method allows an API user to update an existing rating entry in a
product.
delete_service_and_rating
Parameters: DeleteServiceAndRatingRequest
Return value: DeleteServiceAndRatingResponse
Realm: administrator
This method allows an API user to delete an existing rating entry from a
product.
Property
Type
i_accessibility
int
i_product*
int
i_tariff
int
i_tariff_reseller
int
tariff_name**
string
reseller_tariff_name** string
i_node
int
Description
The unique ID of the rating entry
record in the database
The unique ID of the product record
The unique ID of a tariff record with
retail rates applied to accounts with
this product
The unique ID of a tariff record with
wholesale rates upplied to a reseller (in
products managed by a reseller)
The retail tariff name
The wholesale tariff name (in products
managed by a reseller)
The unique ID of a node on which the
service is used
229
Porta
Switch
PortaBilling API
cld
string
i_oli
int
i_service_type*
int
max_auth_funds
float
230
Porta
Switch
check_funds
PortaBilling API
string (Y,
N, B or
D)
Min_session_funds
float
max_session_funds
float
231
Porta
Switch
PortaBilling API
Alert_overuse_reject
string (Y,
N)
I_rate_match_mode
int
allow_suspended_
consumption
string
routing_list**
Array of
ServiceA
ndRating
RoutingI
nfo
structures
ServiceAndRatingRoutingInfo structure
Property
Type
i_acc_routing_tariff
int
i_routing_plan
int
Description
The unique ID for a routing plan and a
tariff assigned to it (tariff per routing
plan bundle)
The unique ID for a routing plan;
refers to the Routing_Plans table
232
Porta
Switch
PortaBilling API
i_accessibility
int
i_tariff
int
i_tariff_reseller
int
routing_plan_name
tariff_name
string
string
reseller_tariff_name
string
GetServiceAndRatingListRequest structure
Property
Type
i_product
int
show_routing_list
int
offset
int
limit
int
Description
The unique ID of
the product record
Indicates whether a list of
tariff per routing plan
bundles that belong to this
product will be shown
Number of rows to skip at
the beginning of the list
Number of rows to retrieve
GetServiceAndRatingListResponse structure
Property
service_and_rating_list
Type
Array of
ServiceAndRatingInfo
structures
Description
Set of rating entry
data records
GetServiceAndRatingInfoRequest structure
Property
i_accessibility
Type
int
Description
The unique ID of the rating
entry record
233
Porta
Switch
PortaBilling API
GetServiceAndRatingInfoResponse structure
Property
service_and_rating_info
Type
ServiceAndRatingInfo
structure
Description
Complete
information
about the rating
entry; for more
information, see
above
AddServiceAndRatingRequest structure
Property
service_and_rating_info
detailed_response
Type
Description
ServiceAndRatingInfo Complete
structure
information about
the rating entry
record to be added;
for more
information, see
above
int
Flag which shows
whether added
record should be
returned in
response or not.
AddServiceAndRatingResponse structure
Property
Type
i_accessibility
int
service_and_rating_info
ServiceAndRatingI
nfo structure
Description
The unique ID of the
rating entry record
that was added
Complete information
about the rating entry;
for more information,
see above
UpdateServiceAndRatingRequest structure
Property
Type
service_and_rating_info ServiceAndRatingI
nfo structure
Description
Complete information
about the rating entry
record to be updated;
for more information,
see above
234
Porta
Switch
PortaBilling API
detailed_response
int
UpdateServiceAndRatingResponse structure
Property
i_accessibility
Type
int
Description
The unique ID of the rating entry
record that was updated
DeleteServiceAndRatingRequest structure
Property
i_accessibility
Type
int
Description
The unique ID of the rating entry
record to be deleted
DeleteServiceAndRatingResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
Parameters: AddProductSubscriptionRequest
Return value: AddProductSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to add a subscription to the product.
delete_subscription
Parameters: DeleteProductSubscriptionRequest
Return value: DeleteProductSubscriptionResponse
Realm: administrator, reseller
This method allows an API user to delete a subscription from the
product.
get_subscriptions
Parameters: GetProductSubscriptionsRequest
Return value: GetProductSubscriptionsResponse
Realm: administrator, reseller
235
Porta
Switch
PortaBilling API
This method allows an API user to get the subscription included in this
product.
reapply_subscriptions
Parameters: ReapplyProductSubscriptionsRequest
Return value: ReapplyProductSubscriptionsResponse
Realm: administrator, reseller
This method allows an API user to to update the subscription for existing
accounts with this product.
If you change the subscription plan for a given product, this will not
affect existing accounts with this product. This basically allows you to sell
the same product over an extended period of time, simply changing the
subscription plan within the product according to current promotional
offers, without affecting any old customers. If you wish to update the
subscription for existing accounts with this product, you must explicitly
request it by using this method.
Property
subscription_info
Type
object
Detailed_response
none
Description
Note: i_product_subscription will
be ignored; i_subscription
and i_product are mandatory fields.
Shows whether added record should
be returned in response or not.
AddProductSubscriptionResponse structure
Property
i_product_subscripti
on
subscription_info
Type
int
Array of
ProductS
ubscripti
onInfo
Description
The ID of created product
subscription record
The product subscription info
ProductSubscriptionInfo structure
Property
i_product_subscripti
on**
i_product
Type
int
int
Description
The unique ID of the product
subscription record
The unique ID of the product record
236
Porta
Switch
PortaBilling API
i_subscription**
int
name**
description**
invoice_description
string
string
string
iso_4217**
activation_mode**
string
int
Activation_fee**
float
minimum_period**
int
cancel_penalty**
float
charge_model**
int
Rounding**
int
advance_periods**
int
periodic_fees**
Subscripti
onPeriodi
cFeeList
DeleteProductSubscriptionRequest structure
Property
i_product_subscripti
on
Type
int
Description
The ID of product subscription record
DeleteProductSubscriptionResponse structure
Property
success
Type
int
Description
Returns 1 if subscription deleted and 0
if subscription cannot be deleted
237
Porta
Switch
PortaBilling API
GetProductSubscriptionsRequest structure
Property
i_product
With_fees
Type
int
int
Description
The ID of product record.
Indicates whether the periodic fees
for the subscription should
be returned
GetProductSubscriptionsRespomse structure
Property
subscriptions
Type
Array of
ProductS
ubscripti
onInfo
Description
Set of product subscription data
records
ReapplyProductSubscriptionsRequest structure
Property
i_product
Type
int
Description
The ID of product record
ReapplyProductSubscriptionsResponse structure
Property
success
Type
int
Description
Returns 1 in case of success, 0 in case
of failure
Parameters: GetProductGroupListRequest
Return value: GetProductGroupListResponse
Realm: administrator, reseller
This method allows an API user to create a product group to provide
customers with effective add-on management tools.
add_group
Parameters: AddUpdateProductGroupRequest
Return value: AddUpdateProductGroupResponse
Realm: administrator, reseller
This method allows an API user to create a product group to provide
customers with effective add-on management tools.
238
Porta
Switch
PortaBilling API
update_group
Parameters: AddUpdateProductGroupRequest
Return value: AddUpdateProductGroupResponse
Realm: administrator, reseller
This method allows an API user to update a product group.
delete_group
Parameters: DeleteProductGroupRequest
Return value: DeleteProductGroupResponse
Realm: administrator, reseller
This method allows an API user to delete a product group.
Property
Type
limit
int
offset
int
Description
The number of rows to
retrieve
The number of rows to skip at
the beginning of the list
GetProductGroupListResponse structure
Property
groups
total
Type
array of
ProductG
roupInfo
structures
int
Description
The list of product groups
ProductGroupInfo structure
Property
i_product_group
i_customer
Type
int
int
name
is_used
string
int
Description
The unique ID of the product group
The unique ID of the customer to
which the product group belongs
The name of the product group
Shows whether the product group is
used by some product
AddUpdateProductGroupRequest structure
Property
Type
Description
239
Porta
Switch
PortaBilling API
group_info
ProductGroupInfo
structure
detailed_response
int
AddUpdateProductGroupResponse structure
Property
i_product_group
Type
int
Description
The unique ID of the created/updated
product group
DeleteProductGroupRequest structure
Property
i_product_group
Type
Description
The unique ID of the
created/updated product
group
int
DeleteProductGroupResponse structure
Property
success
Type
int
Description
Returns 1 in case of success, 0 in case
of failure
Methods
get_subscription_list
Parameters: GetSubscriptionListRequest
Return value: GetSubscriptionListResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to get a list of
subscriptions.
Type Reference
GetSubscriptionListRequest structure
Property
iso_4217
Type
string
Description
Currency for the subscription
240
Porta
Switch
i_customer
PortaBilling API
int
managed_by_admin enum[Y,N]
with_fees
int
Get_total
int
limit
offset
int
int
GetSubscriptionListResponse structure
Property
subscriptions
total
Type
Description
Array of
List of subscriptions.
SubscriptionInfo
int
The number of the retrieved
subscription data records
SubscriptionInfo structure
Property
i_subscription**
Type
int
name**
string
invoice_description string
iso_4217
string
i_customer
int
description**
string
activation_mode**
int
Activation_fee**
float
minimum_period** int
Description
The unique ID of the
subscription plan
The name of the subscription
plan
The subscription plan name that
is visible to the end user
The currency for the
subscription plan
The ID of the reseller
who manages the subscription
The subscription plan
description
If the subscription is assigned
to an account, this parameter
specifies the date upon which
the subscription charges will
apply. Possible values: 1 at the
given start date, 2 upon
the accounts first usage.
A one-time fee applied when
the subscription is activated
Time interval (in months)
241
Porta
Switch
PortaBilling API
cancel_penalty**
float
charge_model**
int
rounding**
int
advance_periods**
int
periodic_fees**
SubscriptionPer
iodicFeeList
Methods
add_rate
Parameters: AddRateRequest
Return value: AddRateResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to add a new
rate for a destination.
update_rate
Parameters: UpdateRateRequest
Return value: UpdateRateResponse
Realm: administrator, reseller
242
Porta
Switch
PortaBilling API
Parameters: DeleteRateRequest
Return value: DeleteRateResponse
Realm: administrator, reseller
This method allows an API user to delete an existing rate for a
destination.
add_rate_group
Parameters: AddRateGroupRequest
Return value: AddRateGroupResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to add a new
rate for every destination in a destination group.
update_rate_group
Parameters: UpdateRateGroupRequest
Return value: UpdateRateGroupResponse
Realm: administrator, reseller
This method allows an API user to update the existing rate for every
destination in a destination group.
get_rate_info
Parameters: GetRateInfoRequest
Return value: GetRateInfoResponse
Realm: administrator, reseller
This method allows an API user to get information about a rate.
get_rate_list
Parameters: GetRateListRequest
Return value: GetRateListResponse
Realm: administrator, reseller
This method allows an API user to retrieve the list of rates.
243
Porta
Switch
PortaBilling API
Type Reference
AddRateRequest structure
Property
rate_info
Type
RateInfo
Description
Rate data record
AddRateResponse structure
Property
i_rate
Type
int
Description
The unique ID of the rate record created
AddRateGroupRequest structure
Property
i_dest_group
rate_info
Type
Description
int
The unique ID of the destination group
RateInfo Rate data record
structure
AddRateGroupResponse structure
Property
i_rate_list
Type
Array of Int
Description
List of ID of the rates created
UpdateRateRequest structure
Property
rate_info
Type
RateInfo
structure
Description
Rate data record
UpdateRateResponse structure
Property
i_rate
Type
int
Description
ID of the modified rate record
DeleteRateRequest structure
Property
i_rate
Type
int
Description
The unique ID of the rate record to
be deleted
DeleteRateResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if not
UpdateRateGroupRequest structure
Property
Type
Description
244
Porta
Switch
i_dest_group
rate_info
PortaBilling API
int
RateInfo
structure
UpdateRateGroupResponse structure
Property
i_rate_list
Type
Array of Int
Description
List of ID of the modified rates
RateInfo structure
Property
i_tariff
int
Type
i_dest
int
i_rate
int
i_offpeak
int
interval_1
interval_n
price_1
price_n
op_interval_1
int
int
float
float
int
op_interval_n
int
op_price_1
float
op_price_n
float
effective_from
dateTime
inactive_from
dateTime
effective_immediately string
hidden
string
discontinued
forbidden
string
string
Description
The unique ID of the tariff
record
The unique ID of the destination
record
The unique ID of the rate record
(mandatory for update
operations)
The unique ID of the off-peak
record
First billing interval
Next billing interval
Price for first interval
Price for next interval
First billing interval for off-peak
time
Next billing interval for off-peak
time
Price for first interval for offpeak time
Price for next interval for offpeak time
Defines when the rate starts to be
applied
Defines when the rate stops to be
applied
Defines that the rate starts to be
applied immediately (if value is
Y effective_from field is
ignored)
Indicates that the rate is excessive
and may be omitted when making
the list of rates
Indicates that rate is discontinued
Indicates that no calls are
authorized for the particular
245
Porta
Switch
PortaBilling API
preference
huntstop
int
string
formula
string
route_category
op_route_category
int
int
op_preference
int
op_huntstop
string
i_rate_formula
reverse_rating
int
string
special_price_1
special_price_n
i_dest_group
float
float
int
destination
Routing priority
Indicates whether huntstop is set
or not
Indicates if this rate uses a call
rating formula
ID of route category
ID of route category for off-peak
period
Routing priority for off-peak
period
Indicates whether huntstop for
off-peak period is set or not
Indicates whether rate is marked
reverse or not
Special price for first interval
Special price for next interval
ID of the destination group
GetRateInfoRequest structure
Property
i_rate
Type
int
Description
The unique ID of the rate
record
GetRateInfoResponse structure
Property
rate_info
Type
RateInfo structure
Description
Complete information
about the rate; for more
information, see RateInfo
GetRateListRequest structure
Property
offset
int
Type
limit
int
i_tariff
int
Description
Number of rows to skip
at the beginning of the
list
Number of rows to
retrieve
The unique ID of the
tariff; refers to Tariffs
table
246
Porta
Switch
PortaBilling API
effective_from
string
type
string
destination
get_total
order_by
order_direction
extended_info
complex_ordering
Default: prefix
string
The pattern of the
destination prefix
int
Get total number of the
retrieved rate data
records
string
Allows to sort the
resulting rate list by a
specific field
string
Specifies whether to sort
the records in a
descending or ascending
order
int
Specifies whether to get
extended information
like destination group for
the rates
array of
Orders the retrieved rate
ComplexOrderingInfo data records by multiple
structures
fields. Note that either
order_by or
complex_ordering option
has effect and the
order_by option has
higher priority
GetRateListResponse structure
Property
rate_list
total
Type
Array of RateInfo
structures
int
Description
Set of rate data records
The number of the
retrieved rate data records
247
Porta
Switch
PortaBilling API
ComplexOrderingInfo structure
Property
Type
field
string
direction
string
Description
Specifies the name of a field
to order by
Specifies order direction
Possible vaues:
ASC
DESC
Methods
get_representative_info
Parameters: GetRepresentativeInfoRequest
Return value: GetRepresentativeInfoResponse
Realm: administrator, reseller
This method allows an API user (administrator or reseller) to get a
representative record from the database.
get_representative_list
Parameters: GetRepresentativeListRequest
Return value: GetRepresentativeListResponse
Realm: administrator, reseller
This method allows an API user to get a list of representative records.
Type Reference
GetRepresentativeInfoRequest structure
Property
i_rep
int
Type
name
string
Description
The unique ID of the representative
record
Name of the representative on the
PortaBilling interface, unique in the
environment
248
Porta
Switch
PortaBilling API
GetRepresentativeInfoResponse structure
Property
Type
Description
representative_info RepresentativeInfo Complete information
about a representative
GetRepresentativeListRequest structure
Property
offset
int
Type
limit
int
name
string
i_customer
int
Description
Starting position for the
representative list
Limit of representatives
(maximum quantity
of representatives)
Refers to the name of the
representative
ID of the reseller
who manages
the representative
GetRepresentativeListResponse structure
Property
representative_list
Type
Description
array of
List of representatives
RepresentativeInfo
structures
RepresentativeInfo structure
Property
Type
i_rep
int
refnum
initials
name
string
string
string
iso_4217
string
i_acl
int
i_time_zone
int
i_lang
string
companyname
string
Description
The unique ID of the
representative record
Reference number (custom field)
Initials of the representative
Name of the representative on
the PortaBilling interface,
unique in the environment
ISO4217 code for currency in
which the representative is billed
ID for representatives access
level; refers to Access_Levels
table
ID for representatives time zone;
refers to Time_Zones table
Code for representatives web
language; refers to
Locale_Language table
Representatives company name
249
Porta
Switch
PortaBilling API
salutation
firstname
midinit
lastname
baddr1
baddr2
string
string
string
string
string
string
baddr3
baddr4
baddr5
city
state
zip
string
string
string
string
string
string
country
string
faxnum
cont1
phone1
cont2
phone2
email
login
string
string
string
string
string
string
string
password
string
tax_id
out_date_format
string
string
out_time_format
string
out_date_time_format string
in_date_format
in_time_format
i_customer
string
string
int
hidden
string
Representatives salutation
Representatives first name
Representatives middle initial(s)
Representatives last name
1st line of representatives address
2nd line of representatives
address
3rd line of representatives address
4th line of representatives address
5th line of representatives address
City of representatives address
Province or state
Postal (zip) code of the
representatives address
Country of the representatives
address
Fax number
Main contact person
Main phone number
Alternative contact person
Alternative phone number
Email address
The representatives login for
self-care web interface
The representatives password for
self-care web interface
Tax ID
Output format for date indication
on customers self-care interface
Output format for time
indication
Output format for full date /
time indication
Input format for date indication
Input format for time indication
ID of the reseller who manages
this representative
Hidden
250
Porta
Switch
PortaBilling API
Methods
get_invoice_info
Parameters: GetInvoiceInfoRequest
Return value: GetInvoiceInfoResponse
Realm: administrator, reseller, retail customer
This method allows an API user to get an invoice record from the
database.
get_invoice_list
Parameters: GetInvoiceListRequest
Return value: GetInvoiceListResponse
Realm: administrator, reseller
This method allows an API user to get the list of invoice records.
generate_out_of_turn_invoice
Parameters: GenerateOutOfTurnInvoiceRequest
Return value: GenerateOutOfTurnInvoiceResponse
Realm: administrator
This method allows an administrator to generate an out-of-turn invoice
(with some transactions included.)
get_template_list
Parameters: GetInvoiceTemplateListRequest
Return value: GetInvoiceTemplateListResponse
Realm: administrator
This method allows an API user to get the list of invoice template
records.
Type Reference
GetInvoiceInfoRequest structure
Property
i_invoice
invoice_number
Type
int
int
get_pdf
int
Description
The unique ID of the invoice record
Invoice Number unique identifier
of the invoice
Specifies whether to return the
invoice in the PDF format
251
Porta
Switch
PortaBilling API
GetInvoiceInfoResponse structure
Property
invoice_info
Type
InvoiceInfo
structure
Description
Information about the invoice. Also
returns the invoice in the PDF format
if that was requested
GetInvoiceListRequest structure
Property
offset
limit
Type
int
int
invoice_number
int
i_customer
int
i_parent
int
Description
Starting position for the invoice list
Limit of invoices (maximum quantity
of invoices)
Refers to Invoice Number unique
identifier of the invoice
The unique ID of the customer
the invoice belongs to
The unique ID of the reseller (to
get invoices for all subcustomers of
this reseller)
GetInvoiceListResponse structure
Property
invoice_list
Type
array of
InvoiceInfo
structure
Description
List of invoices
InvoiceInfo structure
Property
i_invoice
invoice_number
i_customer
issue_date
period_from
period_to
i_payment_term
amount_net
amount_due
Type
Description
int
The unique ID of the invoice
record
int
Invoice Number unique
identifier of the invoice
int
Refers to customer record to
which the invoice belongs
date, ISO
Date when the invoice was
format
generated
dateTime, ISO Start date of the billing period
format
dateTime, ISO End date of the billing period
format
int
Refers to the description of the
payment term
float
Sum of all charges in this period
minus credits/refunds
float
Amount the customer is supposed
252
Porta
Switch
PortaBilling API
closed
string
previous_balance
float
payments
subscriptions
manual_charges
float
float
float
taxes
float
calls
new_style
float
int
due_date
date, ISO
format
int
float
i_invoice_status
amount_paid
last_notific_date
last_resend_date
last_recollect_date
last_warning_date
date, ISO
format
date, ISO
format
date, ISO
format
date, ISO
format
date, ISO
format
tax_method
i_billing_processor
prior_balance
prior_balance_paid
customer_name
int
int
float
float
string
253
Porta
Switch
PortaBilling API
invoice_status
i_parent
string
int
Invoice status
The unique ID of the reseller (for
subcustomer)
GenerateOutOfTurnInvoiceRequest structure
Property
i_customer
xdr_list
Type
Description
Refers to the record of a
customer for which an out-ofturn invoice will be generated
Array of
The array of xDR IDs that
OutOfTurnXDRInfo will be included into an outstructures
of-turn invoice (xDRs must
be marked to be included into
an out-of-turn invoice)
int
GenerateOutOfTurnInvoiceResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if not
OutOfTurnXDRInfo structure
Property
Type
int
string
i_xdr
owner_type
Description
The unique ID of the xDR record
An xDR owner entity.
One of the following:
Customer
Account
GetInvoiceTemplateListRequest structure
Property
limit
offset
Type
int
int
Description
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
GetInvoiceTemplateListResponse structure
Property
template_list
Type
Description
Array of
The list of the retrieved
InvoiceTemplateInfo invoice templates
structure
254
Porta
Switch
total
PortaBilling API
int
InvoiceTemplateInfo structure
Property
i_template
Type
int
i_customer
i_customer_class
int
int
i_media_type
int
i_template_type
int
type_name
is_default
string
string
is_system
int
name
raw_flags
string
string
managed_by
string
Description
media_name
used
string
string
int
Description
The unique ID of the invoice
template
The unique ID of the customer
The unique ID of the customer
class
The unique ID of media type
record
The unique ID of the template
type
The name of the template type
Shows whether the
invoice template is default or not
Shows whether the
invoice template is system or not
Template name
Shows the values for multipage,
tax included and with services
options, which can be one of the
following:
Y enabled
N disabled
Shows whether the template is
managed by administrator or it is
assigned to a reseller. If the
template is assigned to reseller,
then the name of the reseller is
shown here.
Template description
Name of the template media type
Shows whether invoice template
is used or not
255
Porta
Switch
PortaBilling API
Methods
add_customer_class
Parameters: AddUpdateCustomerClassRequest
Return value: AddUpdateCustomerClassResponse
Realm: administrator, reseller
This method allows an API user to add a customer class record.
delete_customer_class
Parameters: DeleteCustomerClassRequest
Return value: DeleteCustomerClassResponse
Realm: administrator, reseller
This method allows an API user to delete a customer class record.
update_customer_class
Parameters: AddUpdateCustomerClassRequest
Return value: AddUpdateCustomerClassResponse
Realm: administrator, reseller
This method allows an API user to update a customer class record.
get_customer_class_list
Parameters: GetCustomerClassListRequest
Return value: GetCustomerClassListResponse
Realm: administrator, reseller
This method allows an API user to get the list of customer class records.
get_default_customer_class
Parameters: GetDefaultCustomerClassRequest
Return value: GetDefaultCustomerClassResponse
Realm: administrator, reseller
This method allows an API user to get information about the default
customer class records.
get_customer_class_info
Parameters: GetCustomerClassInfoRequest
Return value: GetCustomerClassInfoResponse
Realm: administrator, reseller
256
Porta
Switch
PortaBilling API
This method allows an API user to get information about the customer
class records.
Type Reference
AddUpdateCustomerClassRequest structure
Property
Type
Description
customer_class_info Array of
Complete information
CustomerClassInfo about customer class
structure
records
AddUpdateCustomerClassResponse structure
Property
i_customer_class
Type
int
Description
The unique ID of the
customer class record
DeleteCustomerClassRequest structure
Property
i_customer_class
Type
int
Description
The unique ID of the
customer class record
DeleteCustomerClassResponse structure
Property
success
Type
int
Description
1 if operation is successful,
0 if not
GetCustomerClassListRequest structure
Property
i_customer
int
Type
search
string
Description
ID of the reseller who manages
the customer class
Search pattern in the name
and description of a customer
class
GetCustomerClassListResponse structure
Property
Type
Description
customer_class_list array of
List of customer classes
CustomerClassInfo
structures
257
Porta
Switch
PortaBilling API
GetDefaultCustomerClassRequest structure
Property
i_customer
Type
Description
ID of the reseller managing
the customer class (undefined
in case of Managed
By Administrator only)
int
GetDefaultCustomerClassResponse structure
Property
Type
Description
customer_class_info CustomerClassInfo Complete information
structure
about customer class
records
CustomerClassInfo structure
Property
i_customer_class
Type
int
name
string
i_customer
int
description
string
i_template
int
i_payment_term
int
grace_period
int
notific_days
resend_days
recollect_days
warning_days
suspension_days
string
string
string
int
int
Description
The unique ID of the
customer class record
The name of the customer
class on the PortaBilling
interface, unique in the
environment
The unique ID of the
reseller who manages the
customer class
The customer class
description
ID for customers invoice
template; refers to
Templates table
Refers to the description of
the payment term
Invoice grace period, i.e.
how many days after invoice
generation payment is
expected
Invoice notification intervals
Invoice re-send intervals
Re-collect intervals
Warning intervals
In how many days after the
due date the customers
services will be suspended if
the invoice is still unpaid
258
Porta
Switch
PortaBilling API
closing_days
int
bp_charge_cc
string
i_billing_processor
int
tax_info
send_invoices
string
string
send_statistics
string
default_class
string
collection_threshold
float
iso_4217
review_invoices
string
string
review_term_days
int
bp_closure_delay_days int
managed_by
string
GetCustomerClassInfoRequest structure
Property
i_customer_class
Type
int
Description
The unique ID of the
customer class record
259
Porta
Switch
PortaBilling API
GetCustomerClassInfoResponse structure
Property
Type
Description
customer_class_info CustomerClassInfo Complete information
structure
about customer class
records
Methods
get_discount_plan_info
Parameters: GetDiscountPlanInfoRequest
Return value: GetDiscountPlanInfoResponse
Realm: administrator, reseller
This method allows an API user to get detailed information about a
volume discount plan by using its ID.
get_discount_plan_list
Parameters: GetDiscountPlanListRequest
Return value: GetDiscountPlanListResponse
Realm: administrator, reseller
This method allows an API user to retrieve detailed information about
volume discount plans by their name patterns or owner ID.
add_discount_plan
Parameters: AddDiscountPlanRequest
Return value: AddDiscountPlanResponse
Realm: administrator, reseller
This method allows an API user to add a volume discount plan.
update_discount_plan
Parameters: UpdateDiscountPlanRequest
Return value: UpdateDiscountPlanResponse
Realm: administrator, reseller
This method allows an API user to update a volume discount plan.
260
Porta
Switch
PortaBilling API
delete_discount_plan
Parameters: DeleteDiscountPlanRequest
Return value: DeleteDiscountPlanResponse
Realm: administrator, reseller
This method allows an API user to delete a volume discount plan.
get_discount_Info
Parameters: GetDiscountInfoRequest
Return value: GetDiscountInfoResponse
Realm: administrator, reseller
This method allows an API user to get the information about a discount
(for a destination group) in the specified volume discount plan.
get_discount_list
Parameters: GetDiscountListRequest
Return value: GetDiscountListResponse
Realm: administrator, reseller
This method allows an API user to get the information about discounts
(per destination group) in the specified volume discount plan.
add_discount
Parameters: AddDiscountRequest
Return value: AddDiscountResponse
Realm: administrator, reseller
This method allows an API user to add a new discount (for a destination
group).
update_discount
Parameters: updateDiscountRequest
Return value: updateDiscountResponse
Realm: administrator, reseller
This method allows an API user to update a discount (for a destination
group).
delete_discount
Parameters: deleteDiscountRequest
Return value: deleteDiscountResponse
Realm: administrator, reseller
261
Porta
Switch
PortaBilling API
Parameters: GetVDThresholdListRequest
Return value: GetVDThresholdListResponse
Realm: administrator, reseller
This method allows an API user to get the information about thresholds
(discount scheme) for the specified discount record.
get_vd_threshold_info
Parameters: GetVDThresholdInfoRequest
Return value: GetVDThresholdInfoResponse
Realm: administrator, reseller
This method allows an API user to get the information about a threshold
(discount scheme) for the specified discount record.
add_vd_threshold
Parameters: AddVDThresholdRequest
Return value: AddVDThresholdResponse
Realm: administrator, reseller
This method allows an API user to add a threshold to a discount record.
update_vd_threshold
Parameters: UpdateVDThresholdRequest
Return value: UpdateVDThresholdResponse
Realm: administrator, reseller
This method allows an API user to update a threshold in a discount
record.
delete_vd_threshold
Parameters: DeleteVDThresholdRequest
Return value: DeleteVDThresholdResponse
Realm: administrator, reseller
This method allows an API user to delete a threshold from a discount
record.
262
Porta
Switch
PortaBilling API
Type Reference
DiscountInfo structure
Property
i_vd_dg
int
i_vd_plan
int
i_service
dg_name
service_name
rate_unit
string
string
string
exclusive
string
peak_level
max_peak_level
usage_period
Type
int
int
int
Description
The unique ID of the volume
discount record (volume
discount destination group
record)
The unique ID of the volume
discount plan
default 3 (Voice calls)
Destination group name
Name of the service
Units (e.g. USD, messages,
minutes)
Specifies whether an account
should be granted exclusive
free calls
Possible values: Y/N, default
N
Specifies whether this volume
discount will be applied during
peak or off-peak periods
If the off-peak period is not
defined, then peak period will
be used.
Possible values:
0 Peak
1 Off-Peak
2 2nd Off-Peak
Together with the peak_level
property, specifies the period
when this discount should be
used. This property defines the
maximum level (Peak, OffPeak, 2nd Off-Peak) for this
discount
Possible values:
0 Peak
1 Off-Peak
2 2nd Off-Peak
This specifies how often the
263
Porta
Switch
PortaBilling API
volume discount is reset.
Leave this empty for One
time (never reset)
restart
prorate
string
string
align_billing
string
i_dest_group
int
threshold_type
string
rollover_periods
int
Possible values:
Empty One time A
volume discount is
applied one time only
1 Daily A volume
discount is applied
every day
2 Weekly A
volume discount is
applied every week
3 Bi-weekly A
volume discount is
applied every two
weeks
4 Monthly A
volume discount is
applied every month
Specifies whether a new
discount will be applied after
the previous one finishes
Possible values: Y/N, default
N
Prorates the thresholds when
the discount cant be applied
from the beginning
Possible values: Y/N
Possible values: Y/N, default
N
The unique ID of the
Destination Group
Discount type
Possible values:
Charged Amount
Charged Time
The number of periods when
the rolled over quota will be
effective
Possible values: 0/1/2/3,
default 0
264
Porta
Switch
PortaBilling API
VDThresholdInfo structure
Property
i_vd_threshold
Type
int
i_vd_dg
int
notify_if_exceeded
string
alter_service
threshold_value
string
string
discount
xdr_split
float
string
warning_threshold
float
Description
The unique ID of the volume
discount threshold record
ID of the volume discount
record (volume discount
destination group record)
Flag which indicates the status
of notification if threshold
is exceeded
Alter service value
The threshold value is
measured either in currency
units or time units (minutes),
according to the type of
discount. The nill flag sets the
threshold to unlimited (this
level of discount is provided
until the end of its usage
period)
Discount value (in percent %)
Flag that shows whether
the threshold record is marked
as splitting (Split xDRs)
This option allows you to
define an additional threshold.
When that threshold is
reached, an email or SMS
notification is sent to your
customers informing them
that the volume of services
consumed is approaching the
discount threshold.
GetDiscountPlanInfoRequest structure
Property
i_vd_plan
Type
int
Description
The unique ID of a volume
discount plan
GetDiscountPlanInfoResponse structure
Property
Type
discount_plan_info DiscountPlanInfo
structure
Description
Complete information
about a volume discount
plan
265
Porta
Switch
PortaBilling API
DiscountPlanInfo structure
Property
i_vd_plan
Type
int
i_customer
int
managed_by
string
i_dest_group_set
int
dest_group_set_name string
iso_4217
string
destination_lookup
description
string
string
name
reset_period
string
string
Description
The unique ID of a volume
discount plan
The unique ID of the customer to
whom the volume discount plan
record is assigned
The name of the customer who
manages the volume discount
plan
The unique ID of the destination
group set associated with this
volume discount plan
The destination group set name
The volume discount plan
currency
Destination lookup strategy
A description of this volume
discount plan
The volume discount plan name
The discount plan lifetime period
GetDiscountPlanListRequest structure
Property
name
Type
string
i_customer
int
iso_4217
get_total
string
int
limit
offset
int
int
Description
Name pattern of a volume
discount plan
The unique ID of the customer
who the volume discount plan is
assigned to. Specify 0 to retrieve
volume discount plans managed
by the administrator, leave blank
to get all volume discount plans
Volume discount plan currency
Get total number of the retrieved
volume discount plans
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
GetDiscountPlanListResponse structure
Property
discount_plan_list
total
Type
Array of
DiscountPlanInfo
structures
int
Description
List of volume discount
plans
The number of the
266
Porta
Switch
PortaBilling API
retrieved volume discount
plans
AddDiscountPlanRequest structure
Property
Type
Description
discount_plan_info DiscountPlanInfo Complete information about
structure
a new volume discount plan
AddDiscountPlanResponse structure
Property
i_vd_plan
Type
int
Description
The unique ID of the volume
discount plan
UpdateDiscountPlanRequest structure
Property
Type
Description
discount_plan_info DiscountPlanInfo Complete information about
structure
a volume discount plan to be
updated
UpdateDiscountPlanResponse structure
Property
i_vd_plan
Type
int
Description
The unique ID of the volume
discount plan
DeleteDiscountPlanRequest structure
Property
i_vd_plan
Type
int
Description
The unique ID of the volume
discount plan to be deleted
DeleteDiscountPlanResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if
not
GetDiscountInfoRequest structure
Property
i_vd_dg
Type
int
Description
The unique ID of the discount
for a specific destination group
GetDiscountInfoResponse structure
Property
discount_info
Type
DiscountInfo
Description
Complete information
267
Porta
Switch
PortaBilling API
structure
GetDiscountListRequest structure
Property
i_vd_plan
service_name
dg_name
peak_level
Type
int
string
string
int
Description
ID of the volume discount plan
Service name pattern
Destination group name pattern
ID of the peak level: 0 (peak
period), 1 (off-peak period), 2
(2nd off-peak period)
GetDiscountListResponse structure
Property
discount_list
Type
Array of
DiscountInfo
structures
Description
Array of the volume
discount plan structures
AddDiscountRequest structure
Property
discount_info
Type
Description
DiscountInfo Complete information about the
structure
discount for a specific destination
group
AddDiscountResponse structure
Property
i_vd_dg
Type
int
Description
The unique ID of the discount for
a specific destination group
UpdateDiscountRequest structure
Property
discount_info
Type
Description
DiscountInfo Complete information about the
structure
discount for a specific destination
group
UpdateDiscountResponse structure
Property
i_vd_dg
Type
int
Description
The unique ID of the discount for
a specific destination group
DeleteDiscountRequest structure
Property
Type
Description
268
Porta
Switch
i_vd_dg
PortaBilling API
int
DeleteDiscountResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if
not
GetVDThresholdListRequest structure
Property
i_vd_dg
Type
int
Description
The unique ID of the discount
for a specific destination group
GetVDThresholdListResponse structure
Property
threshold_list
Type
Array of
VDThresholdInfo
structures
Description
The list of thresholds for a
specific discount
GetVDThresholdInfoRequest structure
Property
i_vd_threshold
Type
int
Description
The unique ID of a threshold for
a specific discount
GetVDThresholdInfoResponse structure
Property
vd_threshold
Type
VDThresholdInfo
structure
Description
Complete information
about a threshold for a
specific discount
AddVDThresholdRequest structure
Property
vd_threshold_info
Type
Description
VDThresholdInfo Complete information about
structure
a threshold for a specific
discount
AddVDThresholdResponse structure
Property
i_vd_threshold
Type
int
Description
The unique ID of the
threshold added for a
specific discount
269
Porta
Switch
PortaBilling API
UpdateVDThresholdRequest structure
Property
vd_threshold_info
Type
Description
VDThresholdInfo Complete information about
structure
a threshold to be updated for
a specific discount
UpdateVDThresholdResponse structure
Property
i_vd_threshold
Type
Description
The unique ID of
the volume discount
threshold object
int
DeleteVDThresholdRequest structure
Property
i_vd_threshold
Type
Description
The unique ID of a
threshold to be deleted
from a specific discount
int
DeleteVDThresholdResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if not
Methods
get_brand_pane_zip
Parameters: GetBrandPaneRequest
Return value: GetBrandPaneResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the brandpane template and css
files. The brandpane-related files are returned in a MIME attachment.
270
Porta
Switch
PortaBilling API
Type Reference
GetBrandPaneRequest structure
Property
env
string
Type
realm
string
Description
This property represents
environments. It must be default
(for an unspecified environment)
or the i_env number
Realm name as in the
configuration (admin, accounts,
cc_staff, customer, vendor,
representative, etc.)
GetBrandPaneResponse structure
Property
Type
Description
html_file_name string A path (relative to /home/porta-admin
directory) to the brandpanes template
HTML file named brandpane.tmpl (e.g.
/brandpane/env_3/accounts/brandpane.tmpl)
css_file_name
Methods
get_dialing_rules_list
Parameters: GetDialingRulesListRequest
Return value: GetDialingRulesListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of dialing rules.
get_dialing_rule_info
Parameters: GetDialingRuleInfoRequest
Return value: GetDialingRuleInfoResponse
Realm: administrator, reseller, retail customer, account
271
Porta
Switch
PortaBilling API
This method allows an API user to get the dialing rule data.
add_dialing_rule
Parameters: AddUpdateDialingRuleRequest
Return value: AddUpdateDialingRuleResponse
Realm: administrator
This method allows an API user to add a dialing rule.
update_dialing_rule
Parameters: AddUpdateDialingRuleRequest
Return value: AddUpdateDialingRuleResponse
Realm: administrator
This method allows an API user to update a dialing rule.
delete_dialing_rule
Parameters: DeleteDialingRuleRequest
Return value: DeleteDialingRuleResponse
Realm: administrator
This method allows an API user to delete a dialing rule.
test_translation_rule
Parameters: TestTranslationRuleRequest
Return value: TestTranslationRuleResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to test a specific dialing rule (provided as
a translation rule string) and a number.
Type Reference
GetDialingRulesListRequest structure
Property
offset
Type
int
limit
name_pattern
int
string
with_tech_prefix int
Description
Number of rows to skip at the beginning
of the list
Number of rows to retrieve
A pattern for the dialing rule name to
search by
For administrators the response may
contain a special Tech Prefix dialing
rule
272
Porta
Switch
PortaBilling API
GetDialingRulesListResponse structure
Property
dialing_rules_list
Type
Array of
DialingRuleInfo
structures
Description
List of dialing rules
DialingRuleInfo structure
Property
i_dialing_rule
Type
int
name
rule
string
DialingRuleOptio
nsInfo
description
string
tr_rule_from_local string
tr_rule_to_local
string
restricted
string (Y, N)
owner_type
string
i_owner
int
Description
The unique ID of the
dialing rule record
The dialing rule name
The structure of dialing rule
options
The dialing rule description
Translation rule from local
format
Translation rule to local
format
Specifies whether only the
administrator is allowed to
assign this dialing rule
The type of dialing rule
owner. One of the
following:
Customer
CustomerSite
Account
The unique ID of the
dialing rule owner record
DialingRuleOptionsInfo structure
Property
cc
ac
ia
op
dp
ip
em
ex
nex
Type
Description
string
Country code
string
Area code(s)
int (0, 1) 1 Always Dial the Area Code as a Part of
the Number
string
Prefix for accessing the outside phone
network
string
Prefix for domestic calls, but outside of area
code
string
International dialing prefix
string
Emergency numbers; comma-separated list
string
Exceptions; comma-separated list
string
National exceptions; comma-separated list
273
Porta
Switch
nl
ct
cs
csdr
css
csp
csps
csl
PortaBilling API
int
Local Dialing Number Length
int (0, 1) 1 Convert ANI (CLI) for incoming calls
into this dialing format
int (0, 1) 1 Enable carrier selection (routing plan
selection) for customer
int (0, 1) 1 Apply the customer ialing rules to a
number follows after the selection code
int (0, 1) 1 Strip selection code after selection
Routing Plan
string
Pattern or a list of selection codes allowed for
the customer
string
Specify ! in this field to reject authorization
if there is no selection code set in the default
routing plan
string
Local carrier code for stripping selection code
from CLD
GetDialingRuleInfoRequest structure
Property
i_dialing_rule
owner_type
Type
int
string
i_owner
int
Description
The unique ID of the dialing rule record
The type of dialing rule owner. One of
the following:
Customer
CustomerSite
Account
The unique ID of the dialing rule owner
record
GetDialingRuleInfoResponse structure
Property
dialing_rule_info
Type
DialingRuleInfo
structure
Description
The complete information
about a dialing rule
AddUpdateDialingRuleRequest structure
Property
Type
Description
dialing_rule_info DialingRuleInfo The complete information about
structure
a dialing rule
AddUpdateDialingRuleResponse structure
Property
i_dialing_rule
Type
int
Description
The unique ID of the
dialing rule record
274
Porta
Switch
PortaBilling API
DeleteDialingRuleRequest structure
Property
i_dialing_rule
Type
int
Description
The unique ID of the dialing rule
record
DeleteDialingRuleResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if not
TestTranslationRuleRequest structure
Property
rule
Type
string
string
string
Description
A translation rule to test, e.g.
local_to_e164($_,{cc=>'1',ia=>'0',
dp=>'1',ip=>'011',em=>'911',ex=>'411',cs=>'0'});
A number to test on
TestTranslationRuleResponse structure
Property
translated_string
Type
string
Description
A string with the result of the
translation
Methods
get_route_list
Parameters: GetRouteListRequest
Return value: GetRouteListResponse
Realm: administrator
This method allows an API user to test a dialplan for a specific telephone
number or certain destinations at any moment in time.
get_routing_plan_list
Parameters: GetRoutingPlanListRequest
Return value: GetRoutingPlanListResponse
Realm: administrator
This method allows an API user to get the list of routing plans.
275
Porta
Switch
PortaBilling API
get_routing_plan_info
Parameters: GetRoutingPlanInfoRequest
Return value: GetRoutingPlanInfoResponse
Realm: administrator
This method allows an API user to get a routing plan record from the
database.
add_routing_plan
Parameters: AddUpdateRoutingPlanRequest
Return value: AddUpdateRoutingPlanResponse
Realm: administrator
This method allows an API user to create a new routing plan using the
supplied data.
update_routing_plan
Parameters: AddUpdateRoutingPlanRequest
Return value: AddUpdateRoutingPlanResponse
Realm: administrator
This method allows an API user to update a routing plan using the
supplied data.
delete_routing_plan
Parameters: DeleteRoutingPlanRequest
Return value: DeleteRoutingPlanResponse
Realm: administrator
This method allows an API user to delete a routing plan record from the
database.
get_rp_connection_list
Parameters: GetRPConnectionListRequest
Return value: GetRPConnectionListResponse
Realm: administrator
This method allows an API user to get a list of custom routing records
from the database.
get_rp_connection_info
Parameters: GetRPConnectionInfoRequest
Return value: GetRPConnectionInfoResponse
Realm: administrator
276
Porta
Switch
PortaBilling API
This method allows an API user to get a custom routing record from the
database.
add_rp_connection
Parameters: AddUpdateRPConnectionRequest
Return value: AddUpdateRPConnectionResponse
Realm: administrator
This method allows an API user to define custom routing per destination
group.
Note that it can be defined only for routing plans with the Override
Routes option enabled (override_routes_enabled = Y).
update_rp_connection
Parameters: AddUpdateRPConnectionRequest
Return value: AddUpdateRPConnectionResponse
Realm: administrator
This method allows an API user to change custom routing per destination
group.
delete_rp_connection
Parameters: DeleteRPConnectionRequest
Return value: DeleteRPConnectionResponse
Realm: administrator
This method allows an API user to remove custom routing per
destination group.
Type Reference
GetRouteListRequest structure
Property
Type
number
string
i_routing_plan
int
i_node
int
Description
Type either a full number or a prefix into
this field to see the resulting list of routes
for this number
The unique ID of a routing plan to be
used for a dialplan test. The system will
offer a different set of routes depending
on the routing plan. Skip this property in
a request to test dialplan for all available
routes
The unique ID of a node record. You
277
Porta
Switch
PortaBilling API
apply_penalties
effective_time
GetRouteListInfoResponse structure
Property
route_list
Type
Array of RouteInfo
structures
Description
List of routes
RouteInfo structure
Property
Type
appcode
string
cld
string
t_cld
string
cost
float
huntstop
string
prefernce
int
route_category_name
string
currency
string
destination
string
destination_country
string
destination_description string
h323
string
sip
string
Description
The number of an IVR application
if you test routing to this
IVR application
Originally called number
Translated called station ID (DNIS),
as it will be sent to the vendor using
this specific route.
Next interval price for the given
destination (per minute)
If one of the routes has huntstop
enabled, then all routes with a lower
route category or preference will be
ignored
Routing preference for this
destination
Routing category name
The currency used to provide call
cost value
Matching destination from the
corresponding tariff
The country where the tested
destination is located
Destination description
Shows whether the route supports
an H323 protocol
Shows whether the route supports a
SIP protocol
278
Porta
Switch
PortaBilling API
i_connection
int
i_rate
i_tariff
int
int
i_vendor
int
i_route_category
int
node_name
connection_name
string
string
penalty
string
remote_ip
string
tariff_name
string
tech_prefix
string
translation_rule
string
vendor_name
string
GetRoutingPlanListRequest structure
Property
name
Type
string
Description
The name of a routing plan
GetRoutingPlanListResponse structure
Property
Type
routing_plan_list Array of
RoutingPlanInfo
structures
Description
A list of routing plans
GetRoutingPlanInfoRequest structure
Property
i_routing_plan
Type
int
Description
The unique ID of the routing plan record
GetRoutingPlanInfoResponse structure
Property
Type
RoutingPlanInfo
routing_plan_info
structure
Description
Complete information about
the routing plan
AddUpdateRoutingPlanRequest structure
Property
Type
Description
routing_plan_info RoutingPlanInfo Complete information about
279
Porta
Switch
PortaBilling API
structure
AddUpdateRoutingPlanResponse structure
Property
i_routing_plan
Type
Description
The unique ID of the created routing
plan record
int
DeleteRoutingPlanRequest structure
Property
i_routing_plan
Type
Description
The unique ID of the created
routing plan record
int
DeleteRoutingPlanResponse structure
Property
success
Type
Description
1 if operation is successful, 0 if not
int
RoutingPlanInfo structure
Property
i_routing_plan
Type
int
name
description
string
string
profit_guarantee
string
Description
The unique ID of the routing
plan record
The name of the routing plan
The description of the routing
plan
Enables choosing only the routes
which guarantee profit.
When calculating a routing list for
a customer with this routing plan,
compares the price used to charge
the customer with the termination
cost of each vendor. If the
vendors costs are higher than the
customers rate, excludes the
vendor from the list (see the note
below)
280
Porta
Switch
PortaBilling API
profit_monitor
string
profit_min_abs
float
profit_min_rel
float
profit_combination
string
profit_dispersion
float
selection_code
string
281
Porta
Switch
PortaBilling API
utilization_cost_diff_limit
float
override_routes_enabled * string
categories_enabled *
string
i_dest_group_set *
int
no_delete **
int
GetRPConnectionListRequest structure
Property
i_routing_plan
Type
int
Description
The unique ID of the
routing plan record
GetRPConnectionListResponse structure
Property
Type
Array of
rp_connection_list RPConnectionInfo
structures
Description
A list of custom routing
records
GetRPConnectionInfoRequest structure
Property
i_rp_connection
Type
int
Description
The unique ID of a custom
routing record
282
Porta
Switch
PortaBilling API
GetRPConnectionInfoResponse structure
Property
Type
rp_connection_info
RPConnectionInfo
structure
Description
Complete information
about custom routing
configured for a
particular destination
group
AddUpdateRPConnectionRequest structure
Property
Type
Description
Complete information
RPConnectionInfo about custom routing
rp_connection_info
structure
configured for a particular
destination group
AddUpdateRPConnectionResponse structure
Property
i_rp_connection
Type
int
Description
The unique ID of the
added / updated custom
routing
RPConnectionInfo structure
Property
i_rp_connection
Type
int
i_routing_plan *
int
i_dest_group *
int
i_connection
int
hunt_order
int
hunt_order_exclusive
string
(Y, N)
Description
The unique ID of the custom
routing configured for a particular
destination group
The unique ID of the routing
plan record
The unique ID of the destination
group record
The unique ID of the connection
record. The nill flag sets LCR
Specifies the place of this
connection in the list of
connections created to route the
call according to this sequence
before (or instead of) applying
normal LCR routing
Specifies whether this entry in the
override list is a percentage-share
connection pool, where each
connection has a chance to be the
first route proportionate to the
assigned percentage value
283
Porta
Switch
PortaBilling API
weight
int
DeleteRPConnectionRequest structure
Property
i_rp_connection
Type
int
Description
The unique ID of the custom routing
configured for a particular destination
group
DeleteRPConnectionResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if not
Methods
get_service_features_list
Parameters: GetServiceFeaturesListRequest
Return value: GetServiceFeaturesListResponse
Realm: administrator
This method allows an administrator to get the list of service features.
284
Porta
Switch
PortaBilling API
Type Reference
GetServiceFeaturesListRequest structure
Property
level
Type
string
Description
One of the following:
Customers show customers
service features
Accounts show accounts service
features
Customer Sites show service
features defined in customer sites
Products show service features
defined in products
All show all service features in the
system
Flag that indicates whether the service
feature attributes will be shown: 1
(show), 0 (do not show)
show_attributes int
GetServiceFeaturesListResponse structure
Property
Type
Description
service_features_list ServiceFeaturesList Complete information
structure
about the service
features
ServiceFeaturesList structure
Property
Accounts
Customers
Products
CustomerSites
Type
Array of
ServiceFeatureDetails
structures
Array of
ServiceFeatureDetails
structures
Array of
ServiceFeatureDetails
structures
Array of
ServiceFeatureDetails
structures
Description
List of accounts service
features
List of customers service
features
List of service features
defined in products
List of service features
defined in customer sites
ServiceFeatureDetails structure
Property
feature_name
Type
string
Description
Service feature name
285
Porta
Switch
PortaBilling API
default_flag
string
i_service_feature
string
flag_pos
int
attributes_list
Array of
ServiceFeature
AttributeDetail
s structures
ServiceFeatureAttributeDetails structure
Property
i_sattribute
Type
int
name
string
default_value
string
multivalue
string
Description
The unique ID of the
service feature attribute
Service feature attribute
name
Service feature attribute
default value
Indicates whether multiple
value entries are allowed
Methods
get_service_list
Parameters: GetServiceListRequest
Return value: GetServiceListResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of services.
get_service_type_list
Parameters: GetServiceTypeListRequest
Return value: GetServiceTypeListResponse
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
286
Porta
Switch
PortaBilling API
Parameters: GetServiceTypeInfoRequest
Return value: GetServiceTypeInfoResponse
Realm: administrator, reseller
This method allows an API user to get a service type record from the
database.
Type Reference
GetServiceListRequest structure
Property
offset
Type
int
limit
name
get_total
int
string
string
Description
Number of rows to skip at the
beginning of the list
Number of rows to retrieve
Name pattern of a service
Get total number of the retrieved
services
GetServiceListResponse structure
Property
service_list
total
Type
Array of
ServiceInfo
structures
int
Description
List of services
The number of the retrieved
services
ServiceInfo structure
Property
i_service
name
unit
Type
int
string
string
rate_unit
string
ratio
int
i_service_type
int
Description
The unique ID of the service record
Service name
A customer-visible name for the units
in which service use is measured
A customer-visible name for the units
used to calculate service charges
If billing units are different from base
units, this parameter defines how many
base units make up one billing unit
The unique ID of the related service type
287
Porta
Switch
PortaBilling API
rating_base
string
i_st_charge_unit
int
GetServiceTypeListRequest structure
Property
service_type_list
Type
Array of
ServiceTypeInfo
structure
Description
Set of service type records
ServiceTypeInfo structure
Property
i_service_type
int
Type
name
string
usage_rating
string
Description
The unique ID of
the service type
The logical name of the
service type
Shows whether usage
charging is applicable or not
for this service type.
Possible values: Y, N
GetServiceTypeInfoRequest structure
Property
i_service_type
Type
int
Description
Unique ID of the Service
Type
GetServiceTypeInfoResponse structure
Property
Type
service_type_info Array of
ServiceTypeInfo
Description
Set of service type records
288
Porta
Switch
PortaBilling API
Methods
get_oli_list
Parameters: GetOliListRequest
Return value: GetOliListResponse
Realm: administrator
This method allows an API user to get the list of OLI.
get_oli_info
Parameters: GetOliInfoRequest
Return value: GetOliInfoResponse
Realm: administrator
This method allows an API user to get an OLI record from the database.
GetOliListRequest structure
Property
oli_list
Type
Array of OliInfo
Description
List of OLI records
OliInfo Structure
Property
i_oli
int
Type
oli
description
int
string
Description
The unique ID of the OLI
record.
The OLI value.
The OLI description.
GetOliInfoRequest Structure
Property
i_oli
Type
int
Description
The unique ID of the OLI
record
GetOliInfoResponse Structure
Property
oli_info
Type
Array of OliInfo
Description
TheOLI info
289
Porta
Switch
PortaBilling API
Methods
manage_active_call_recording
Parameters: ManageActiveCallRecordingRequest
Return value: ManageActiveCallRecordingResponse
Realm: administrator, retail customer, account
This method allows an API user to start or stop recording during the call.
get_active_calls_list
Parameters: GetActiveCallsRequest
Return value: GetActiveCallsResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get the list of active calls for a
customer or an account.
add_disconnect_queue_record
Parameters: AddDisconnectQueueRecordRequest
Return value: AddDisconnectQueueRecordResponse
Realm: administrator
This method allows an administrator to disconnect an Internet session (by
adding a record to the disconnect queue).
ManageActiveCallRecordingRequest structure
Property
call_id
command
Type
string
string
Description
The unique ID of the call
Allows to start or stop call recording.
One of the following:
stop
start
ManageActiveCallRecordingResponse structure
Property
cli_status
Type
string
Description
Call recording action status for the caller.
One of the following:
FAILED an error has occured
290
Porta
Switch
cld_status
PortaBilling API
while attempting to enable or disable
call recording
DENIED call recording isnt
allowed according to billing
configuration
OK call recording processed
successfully
Call recording action status for the callee.
One of the following:
FAILED an error has occured
while attempting to enable or disable
call recording
DENIED call recording feature
isnt allowed according to billing
configuration
OK call recording action processed
successfully
string
GetActiveCallsRequest structure
Property
i_account
i_customer
limit
offset
Type
Description
The unique ID of the account
The unique ID of the customer
Number of rows to retrieve
Number of rows to skip at the
beginning of the list
int
int
int
int
GetActiveCallsResponse structure
Property
active_calls_list
Type
Array of
ActiveCallInfo
Description
List of active calls
ActiveCallInfo structure
Property
call_id
id
CLI
CLD
connect_time
call_origin
Type
string
string
string
string
dateTime
string
leg_origin
string
leg_type
string
Description
The unique ID of the call
Call owner's account ID
Calling Line Identification
Called Line Identification
Call connect time
This is a deprecated equivalent to
leg_origin
In conjunction with the leg_type
property determines a leg for the
accounting record
In conjunction with the leg_origin
291
Porta
Switch
PortaBilling API
subscriber_ip
string
AddDisconnectQueueRecordRequest structure
Property
Type
account_id
string
i_node
int
session_id
string
i_service_type
int
param1
string
at_time
dateTime
tx_expire
dateTime
Description
The unique ID of an account to
disconnect
The unique ID of a node on
which the service is used (must
have POD Server enabled)
The unique ID of a session
to disconnect
The unique ID of the related
service type. Default: 6
(NETACCESS)
A formatted string with
disconnector parameters
Time when the session will be
disconnected. Default: current
time
Time when the record will expire
(if the session is not disconnected
by this time, it will not be
disconnected)
AddDisconnectQueueRecordResponse structure
Property
i_pod
Type
int
Description
The unique ID of the
disconnect request. Refers to
the DisconnectQuery table
Methods
get_my_permissions_for_objects
Parameters: GetMyAclForObjectsRequest
Return value: GetMyAclForObjectsResponse
Realm: administrator, reseller, retail customer, account
292
Porta
Switch
PortaBilling API
This method allows an API user to get the list of ACL objects for which
the permissions were collected.
get_acl_list
Parameters: GetAclListRequest
Return value: GetAclListResponse
Realm: administrator, reseller
This method allows an API user to get the list of ACL.
Type Reference
GetMyAclForObjectsRequest structure
Property
objects
Type
Array of strings
Description
List of ACL objects for
which the permissions will
be collected (e.g. selfcare,
WebForms, etc.)
GetMyAclForObjectsResponse structure
Property
access_level
Type
AccessLevelInfo
structure
Description
The information about the
access level
AccessLevelInfo structure
Property
subsystem
objects
parents
Type
string
Array of
ObjectPermissions
structures
Array of
AccessLevelInfo
structures
Description
The name of the subsystem
which the current objects
belong to
Objects for which permissions
have been retrieved
A list of access levels that
which are parents to the
current objects
ObjectPermissions structure
Property
object
attributes
Type
Description
string
ACL object for which the
permissions were collected
Array of
List of permissions for this
AttributePermissions object
structures
293
Porta
Switch
PortaBilling API
AttributePermission structure
Property
attribute
permissions
Type
string
string
Description
Attribute name
String representation of
attribute permissions in the
CRUD format:
create = 1
read = 0
update = 1
delete = 0
GetAclListRequest structure
Property
name
type
Type
string
enum
subsystem string
group**
string
offset
int
limit
int
Description
Search ACL by name.
Type of ACL to search. Possible
values: Component, User,
Customer,
CC Staff, Account, Vendor,
Representative, Reseller,
Distributor.
The name of subsystem
ACL belongs to.
The name of ACL group
to search.
Number of rows to skip at the
beginning of the list.
Number of rows to retrieve.
GetAclListResponse structure
Property
acl_list
total
Type
Array of AclInfo
int
Description
The list of ACL records.
The total number of found
ACLs
AclInfo structure
Property
i_acl**
int
name
string
subsystem string
group**
type
Type
string
enum[Component,User,
Customer,CC
Staff,Account,Vendor,Re
Description
Unique ID of the ACL.
ACL by name.
Name of subsystem
ACL belongs to.
Name of ACL group.
Type of ACL.
294
Porta
Switch
PortaBilling API
presentative,Reseller,Dist
ributor]
Methods
register_transaction
Parameters: RegisterTransactionRequest
Return value: RegisterTransactionResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to initiate an internal transaction in
PortaBilling. Mainly used for making payments via processors with
external authentication (the ones such as WorldPay Junior,
Moneybookers, PayPal, PayNearMe and Luottokunta which require a user
to go to their web page to get authenticated and confirm the transaction.)
get_payment_methods_for_owner
Parameters: GetPaymentMethodsForOwnerRequest
Return value: GetPaymentMethodsForOwnerResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to obtain a list of avalilable payment
methods and processors for a given entitys currency.
get_payment_transaction_by_id
Parameters: GetPaymentTransactionRequest
Return value: GetPaymentTransactionResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user to get info about a transaction by its ID.
Type Reference
RegisterTransactionRequest structure
Property
amount
Type
float
Description
Paid amount (Should be equal to
295
Porta
Switch
PortaBilling API
owner_type
string,
(Customer/
Account)
i_owner
int
i_payment_method int
RegisterTransactionResponse structure
Property
transaction
Type
Description
TransactionInfo Complete information about
structure
the entered transaction
TransactionInfo structure
Property
amount
cdrid
Type
float
string
details
i_account
string
int
i_customer
int
i_env
int
i_merchant_account
int
i_online_payment_processor int
i_payment_method
int
i_payment_transaction
int
unique_transaction_id
string
Description
Amount paid
xDR ID created for the
transaction
Transaction description
The unique Account ID
for the transaction
The unique Customer ID
for the transaction
The Unique environment
ID for the transaction
The unique Payment
System ID for the
transaction
The unique Payment
Processor ID for the
transaction
The unique Payment
Method ID for the
transaction
The unique ID of the
transaction
UUID based universally
unique transaction ID.
Should be used as
i_payment_transaction for
296
Porta
Switch
PortaBilling API
iso_4217
string
payment_method_info
string
result_code
string
result_message
string
status
test_mode
string
string,
(Y/N)
recurring
string,
(Y/N)
timestamp
x_transaction_id
dateTime
string
secret
string
transactions via
PayNearMe processor
Currency used in the
transaction
Comment on transaction's
Payment Method
Result code of the
Transaction
Result message of the
Transaction
Status of the Transaction
Indicates whether the
Payment Processor is in
test mode
Indicates whether
Recurring Payments are
enabled
The transaction timestamp
The external transaction
unique ID
A secret code for the
transaction
GetPaymentMethodsForOwnerRequest structure
Property
owner_type
Type
string,
(Customer/
Account)
i_owner
int
Description
A symbolic title of the entity.
Used to get results for another
entity. If owner_type
and i_owner are not specified,
then the logged in entity ID is
used
The unique ID of the entity (e.g.
i_account, i_customer). Used to
get results for another entity
GetPaymentMethodsForOwnerResponse structure
Property
payment_methods
Type
Array of
PaymentSystemInfo
structures
Description
The list of avalilable
payment methods and
processors for a given
entitys currency
PaymentSystemInfo structure
Property
Type
Description
297
Porta
Switch
payment_method
PortaBilling API
string
i_payment_method
int
min_allowed_payment
float
ext_auth
string
processor
string
merchant_account_name
string
i_online_payment_processor int
web_link
string
handler
string
callback
string
login
url_suffix
string
string
icon_url
string
refnum
test_mode
string
string
recurring
string
remote_cc_storage
string
298
Porta
Switch
PortaBilling API
GetPaymentTransactionRequest structure
Property
Type
i_payment_transaction int
Description
The unique ID of a payment
transaction
GetPaymentTransactionResponse structure
Property
transaction
Type
TransactionInfo
structure
Description
Complete information about
the entered transaction
Parameters: GetVendorListRequest
Return value: GetVendorListResponse
Realm: administrator
This method allows an API user to obtain a list of vendors that satisfy
search criteria.
add_vendor
Parameters: AddVendorRequest
Return value: AddVendorResponse
Realm: administrator
This method allows an API user to create a new vendor record using the
supplied data.
update_vendor
Parameters: UpdateVendorRequest
Return value: UpdateVendorResponse
Realm: administrator
This method allows an API user to update an existing vendor record
using the supplied data.
299
Porta
Switch
PortaBilling API
get_vendor_info
Parameters: GetVendorInfoRequest
Return value: GetVendorInfoResponse
Realm: administrator
This method allows an API user to get a vendor record from the database.
delete_vendor
Parameters: DeleteVendorRequest
Return value: DeleteVendorResponse
Realm: administrator
This method allows an API user to delete an existing vendor, provided it
has no connections or CDRs.
make_transaction
Parameters: MakeVendorTransactionRequest
Return value: MakeVendorTransactionResponse
Realm: administrator
This method allows an administrator to correct a vendors balance.
Property
refnum
Type
string
name
string
balance
i_acl
float
int
i_time_zone
int
tz**
string
i_lang
string
Description
Reference number (custom
field)
The name of the vendor.
Unique in the billing
environment
Vendors balance
The unique ID of the vendors
access level; refers to the
Access_Levels table
The unique ID of the vendors
time zone; refers to the
Time_Zones table
Name of the vendors time
zone; refers to the Time_Zones
table
Code of the vendors web
300
Porta
Switch
PortaBilling API
companyname
salutation
firstname
midinit
lastname
baddr1
baddr2
string
string
string
string
string
string
string
baddr3
baddr4
baddr5
city
state
zip
country
note
faxnum
cont1
phone1
cont2
phone2
email
bcc
login
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
password
string
send_statistics
string
out_date_format
string
out_time_format
string
out_date_time_format string
in_date_format
in_time_format
string
string
301
Porta
Switch
PortaBilling API
iso_4217
string
billed_to
date
i_billing_period
int
i_vendor
int
i_customer
int
offset_threshold
int
GetVendorListRequest structure
Property
name
Type
string
Description
Search pattern for vendor
302
Porta
Switch
search
limit
offset
PortaBilling API
string
int
int
GetVendorListResponse structure
Property
vendor_list
Type
Array of
VendorInfo
structures
Description
The list of found vendors
AddVendorRequest structure
Property
vendor_info
Type
VendorInfo
structure
Description
Vendor data
AddVendorResponse structure
Property
i_vendor
Type
int
Description
The unique ID of the created
vendor
UpdateVendorRequest structure
Property
vendor_info
Type
VendorInfo
structure
Description
Vendor data
303
Porta
Switch
PortaBilling API
UpdateVendorResponse structure
Property
i_vendor
Type
int
Description
The unique ID of the created
vendor
GetVendorInfoRequest structure
Property
i_vendor
Type
int
Description
The unique ID of the vendor
record
GetVendorInfoResponse structure
Property
vendor_info
Type
VendorInfo
structure
Description
Vendor data
DeleteVendorRequest structure
Property
i_vendor
Type
int
Description
The unique ID of vendor record
DeleteVendorResponse structure
Property
success
Type
int
Description
1 if operation is successful, 0 if
not
MakeVendorTransactionRequest structure
Property
i_vendor
Type
int
action
string
amount
float
Description
The unique ID of vendor
record
Same as those available on
the Balance Adjustments
tab of the Vendor edit
interface.
One of the following:
Manual charge
Manual credit
Manual payment
Amount by which the
vendors balance will
increase / decrease. The
number of digits depends
on the maximum number
of decimal places allowed
by the currency
304
Porta
Switch
PortaBilling API
visible_comment
internal_comment
i_service
int
A comment on this
transaction, visible to the
vendor in the xDR
browser
An internal comment on
this transaction; not
visible in the xDR
browser, and accessible
only directly from the
database
The unique ID of the
Service record; refers to
the Services table
A date associated with the
manual charge/credit
transaction. For example,
you can specify a date for
a manual credit
transaction for when a
vendor was credited
date_inside_billing date
_period
MakeVendorTransactionResponse structure
Property
balance
i_xdr
Type
float (with 5
decimal
places)
int
Description
Vendors modified balance
The unique ID of the xdr
record
Parameters: GetConnectionListRequest
Return value: GetConnectionListResponse
Realm: administrator
This method allows an API user to obtain a list of connections that satisfy
search criteria.
get_connection_info
Parameters: GetConnectionInfoRequest
Return value: GetConnectionInfoResponse
Realm: administrator
305
Porta
Switch
PortaBilling API
This method allows an API user to get a connection record from the
database.
add_connection
Parameters: AddConnectionRequest
Return value: AddConnectionResponse
Realm: administrator
This method allows an API user to create a new vendor connection
record using the supplied data.
update_connection
Parameters: UpdateConnectionRequest
Return value: UpdateConnectionResponse
Realm: administrator
This method allows an API user to update an existing vendor connection
record using the supplied data.
delete_connection
Parameters: DeleteConnectionRequest
Return value: DeleteConnectionResponse
Realm: administrator
This method allows an API user to delete an existing vendor connection,
provided it has no CDRs.
Property
i_connection
Type
int
i_vendor
int
description
i_node
string
int
i_tariff
int
port
int
Description
The unique ID of the vendor
connection record
The unique ID of the vendor
record
Connection description
Name of the node used for this
connection
The tariff used to calculate the
cost of terminating calls via this
connection
Only on PSTN-related
connections. The specified port
306
Porta
Switch
PortaBilling API
for PSTN origination or
termination
CLD
string
remote_ip
string
capacity
int
i_vendor_acc
int
i_oli
int
rtpp_level
int
i_service_type
int
i_criteria
int
sip_specific_settings
string
307
Porta
Switch
PortaBilling API
cli_trust
string
gateway_id
string
utilization_routing
string
utilization_balthreshold
int
i_service_policy
int
cld_prefix
string
i_rate_match_mode
int
i_dial_rule_cld
int
i_dial_rule_cli
int
active
string
308
Porta
Switch
PortaBilling API
(Y/N) active
int
The unique ID of the type
record of this connection
i_connection_type
GetConnectionListRequest structure
Property
i_vendor
int
Type
search
string
offset
int
limit
int
Description
The unique ID of the vendor
record.
Pattern that allows to search by
vendors personal information
(name, companyname, firstname,
lastname, baddr1, baddr2, city, zip,
cont1, cont2, phone1, phone2,
email, note).
Use the following wildcard symbols:
The percentage ( % )
wildcard allows you to
match any string of zero or
more characters;
The underscore ( _ )
wildcard allows you to
match any single character
Number of rows to skip at the
beginning of the list.
Number of rows to retrieve.
GetConnectionListResponse structure
Property
connection_list
Type
Description
Array of
The list of found vendor
ConnectionInfo connections.
structures
GetConnectionInfoRequest structure
Property
i_connection
Type
int
Description
The unique ID of the vendor
connection record.
GetConnectionInfoResponse structure
Property
connection_info
Type
Description
ConnectionInfo Vendor connection data.
structure
309
Porta
Switch
PortaBilling API
AddConnectionRequest structure
Property
connection_info
Type
Description
ConnectionInfo Vendor connection data.
structure
AddConnectionResponse structure
Property
i_connection
Type
int
Description
The unique ID of the vendor
connection record.
UpdateConnectionRequest structure
Property
connection_info
Type
Description
ConnectionInfo Vendor connection data.
structure
UpdateConnectionResponse structure
Property
i_connection
Type
int
Description
The unique ID of the vendor
connection record.
DeleteConnectionRequest structure
Property
i_connection
Type
int
Description
The unique ID of the vendor
connection record.
DeleteConnectionResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
Parameters: GetVendorAccountListRequest
Return value: GetVendorAccountListResponse
Realm: administrator
This method allows an API user to obtain a list of specific vendors
accounts used for digest authentication.
310
Porta
Switch
PortaBilling API
get_vendor_account_info
Parameters: GetVendorAccountInfoRequest
Return value: GetVendorAccountInfoResponse
Realm: administrator
This method allows an API user to get a vendor account record from the
database.
add_vendor_account
Parameters: AddVendorAccountRequest
Return value: AddVendorAccountResponse
Realm: administrator
A vendor account can be used for digest authentication to secure the
connection so that no one else can send traffic to the vendor, as this
would then be billed to your account. Using this API method you can
enter information about such accounts, so that they can be provided
automatically by PortaBilling to the SIP server.
update_vendor_account
Parameters: UpdateVendorAccountRequest
Return value: UpdateVendorAccountResponse
Realm: administrator
This method allows an API user to update a vendor account used for
digest authentication.
delete_vendor_account
Parameters: DeleteVendorAccountRequest
Return value: DeleteVendorAccountResponse
Realm: administrator
This method allows an API user to delete a vendor account used for
digest authentication.
Property
i_vendor_acc
Type
int
name
string
Description
The unique ID of the vendor
account record
A vendor account name
311
Porta
Switch
PortaBilling API
login
string
password
string
i_vendor
int
del
int
A username/login provided to
you by your termination partner,
which will be used to authorize
every outgoing call from your
network to this vendor
A password provided to you by
your termination partner, which
will be used to authorize every
outgoing call from your network
to this vendor
The unique ID of the vendor
record which this account belongs
to
Indicates whether this vendor
account can be deleted or not
GetVendorAccountListRequest structure
Property
i_vendor
Type
int
offset
int
limit
int
Description
The unique ID of the vendor
record this account belongs to
The number of rows to skip at the
beginning of the list
The number of rows to retrieve
GetVendorAccountListResponse structure
Property
vendor_account_list
Type
Description
Array of
A set of vendor account
VendorAccountInfo data records
structures
GetVendorAccountInfoRequest structure
Property
i_vendor_acc
Type
int
Description
The unique ID of the vendor
account record
GetVendorAccountInfoResponse structure
Property
Type
Description
vendor_account_info VendorAccountInfo Vendor account data
structure
AddVendorAccountRequest structure
Property
Type
Description
vendor_account_info VendorAccountInfo Vendor account data
structure
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
312
Porta
Switch
PortaBilling API
AddVendorAccountResponse structure
Property
i_vendor_acc
Type
int
Description
The unique ID of the vendor
account record
UpdateVendorAccountRequest structure
Property
Type
Description
vendor_account_info VendorAccountInfo Vendor account data
structure
UpdateVendorAccountResponse structure
Property
i_vendor_acc
Type
int
Description
The unique ID of the vendor
account record
DeleteVendorAccountRequest structure
Property
i_vendor_acc
Type
int
Description
The unique ID of the vendor
account record
DeleteVendorAccountResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
Methods
get_transfer_info
Parameters: GetTransferInfoRequest
Return value: GetTransferInfoResponse
Realm: administrator, account
This method allows an API user to get a transaction status.
make_transfer
Parameters: MakeTransferRequest
313
Porta
Switch
PortaBilling API
Parameters: GetDestinationInfoRequest
Return value: GetDestinationInfoResponse
Realm: administrator, account
This method allows an API user to get a predefined set of allowed values
for the specified mobile network (configured by PortaSwitch
administrator in a special mapping tariff).
Type Reference
GetTransferInfoRequest structure
Property
i_account
transaction_id
Type
int
int
Description
The unique ID of the account
The unique ID of the remittance
transaction
GetTransferInfoResponse structure
Property
error_code
Type
int
Description
Error codes:
1001 Empty price list for the
destination requested from the
remittance processor API.
1002 Empty price list was formed
on the PortaBilling side. Check your
configuration and account or customer
balance.
1003 Account or customer status
is blocked or inactive.
1004 Error in the remittance
processor back-end
1005 A remittance processor was not
configured for the Account's or
Customer's currency.
9999 Another Internal error
1..100 Errors from the remittance
processor back-end (internal processing
314
Porta
Switch
PortaBilling API
error_description
country
operator
string
string
string
operator_id
int
input_currency
output_currency
destination
price_list
string
string
string
Array of
PriceLi
stInfo
structur
e
error).
101..999 Errors from external
remittance processor API.
A brief error description
The country of the payment receiver
The mobile operator of the payment
receiver
The unique ID of the destination mobile
network
The accounts currency
The currency in the destination country
The destination number
The list of a predefined set of allowed
values for the mobile network
PriceListInfo structure
Property
product
Type
string
price
string
Description
The amount to be added to the balance of
the mobile recipient for this remittance
transaction
The total charge applied to the account
for this remittance transaction
MakeTransferRequest structure
Property
i_account
destination
product
Type
int
string
string
output_currency
operator_id
string
int
Description
The unique ID of the account
The destination number
The amount to be added to the balance of
the mobile recipient for this remittance
transaction
The currency in the destination country
The unique ID of the destination mobile
network
MakeTransferResponse structure
Property
error_code
Type
int
Description
Error codes:
1001 Empty price list for the
destination requested from the remittance
processor API.
1002 Empty price list was formed
on the PortaBilling side. Check your
315
Porta
Switch
error_description
transaction_id
PortaBilling API
string
int
GetDestinationInfoRequest structure
Property
i_account
destination
operator_id
Type
int
string
int
Description
The unique ID of the account
The destination number
The unique ID of the destination mobile
network
GetDestinationInfoResponse structure
Property
error_code
Type
int
error_description
country
operator
string
string
string
operator_id
int
input_currency
output_currency
string
string
destination
price_list
string
Array of
PriceList
Info
structure
Description
Error codes (see their description
above)
A brief error description
The country of the payment receiver
The mobile operator of the payment
receiver
The unique ID of the destination
mobile network
The accounts currency
The currency in the destination
country
The destination number
The list of a predefined set of allowed
values for the mobile network
316
Porta
Switch
PortaBilling API
Methods
get_authz_rule_list
Parameters: GetAuthzRuleListRequest
Return value: GetAuthzRuleListResponse
Realm: administrator
This method allows an API user to get a list of authentication rules that
show how PortaSIP servers handle incoming calls. An authentication
rule combines an authorization method and call parameters.
add_authz_rule
Parameters: AddUpdateAuthzRuleRequest
Return value: AddUpdateAuthzRuleResponse
Realm: administrator
This method allows an API user to define manual authentication rules
allowing PortaSIP servers to handle incoming calls in the desired
manner.
update_authz_rule
Parameters: AddUpdateAuthzRuleRequest
Return value: AddUpdateAuthzRuleResponse
Realm: administrator
This method allows an API user to update manual authentication rules to
change how PortaSIP servers handle incoming calls.
delete_authz_rule
Parameters: DeleteAuthzRuleRequest
Return value: DeleteAuthzRuleResponse
Realm: administrator
This method allows an API user to delete authentication rules.
317
Porta
Switch
PortaBilling API
Type Reference
GetAuthzRuleListRequest structure
Property
auto_link_type
Type
string
Description
Entity for which to show
the rules:
Not set all rules
Empty manual rules
Accounts
autogenerated rules
for accounts
Connections
autogenerated rules
for connections
GetAuthzRuleListResponse structure
Property
authz_rule_list
Type
array of
AuthzRul
eInfo
structures
Description
A list of authentication rules found
AddUpdateAuthzRuleRequest structure
Property
Type
override_autogenerated int
authz_rule_info
Description
Specifies whether to override
existing autogenerated rules:
1 if an
autogenerated rule
for this IP address
already exists
override it by the new
manual rule,
0 if an
autogenerated rule
for this IP address
already exists throw
SOAP fault duplicate
ip pattern
AuthzRuleInfo Authentication rule data
structure
318
Porta
Switch
PortaBilling API
AddUpdateAuthzRuleResponse structure
Property
i_authz_rule
Type
int
Description
The unique ID of the created
authentication rule
AuthzRuleInfo structure
Property
Type
i_authz_rule
int
order_number
int
ip_pattern
string
cli_patternn
string
cld_patternn
string
i_authz_type
int
auto_link_type
string
auto_link_id
int
i_service_policyn
int
Description
The unique ID of the authentication
rule record
Authentication rule sequence number
Remote IP from which a call request
is received. This field can contain an
IP address or an IPv4 network prefix
in CIDR notation (e.g.
192.168.99.0/24)
CLI (ANI) pattern. This field can
contain:
Digits
the * and # symbols, and
% wildcard for any
number of symbols, and
_ or x equivalent
wildcards for one symbol.
If this field is empty in the rule, no
filtering by CLI (ANI) is done
CLD (DNIS) pattern that can contain
the same symbols as in the field
above. If this field is empty in the
rule, no filtering by CLD (DNIS) is
done
The unique ID of the authentication
method type record
Entity for which to show the rules:
Not set all rules
Empty manual rules
Accounts autogenerated
rules for accounts
Connections autogenerated
rules for connections
The unique ID of the entity for which
the rule has been auto-generated
The unique ID of the Service Policies
record
319
Porta
Switch
PortaBilling API
DeleteAuthzRuleRequest structure
Property
i_authz_rule
Type
Description
The unique ID of the authentication
rule record to delete
int
DeleteAuthzRuleResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of failure
320
Porta
Switch
3. PortaSIP Media
Server API
321
Porta
Switch
Security
Connection to the API interface is provided via HTTPS. Authentication is
done using authentication pairs (login-password). Each request to the API
should contain the auth_info structure as the header attribute. Note that
we strongly recommend using the session_id property (which must be
received during the authorization via the login request) in the auth_info
structure for all session requests. Otherwise, if you use login-password
authentication pairs for every request, new sessions will be created and
cause additional load to the database.
Error Handling
SOAP faults are used to carry error information within a SOAP message.
If the actual response has a SOAP fault element as the body entry, then an
error has occurred. In this case, the accuracy of any other fields in the
response cannot be guaranteed, and you should only use the fault subelements to identify the error. Currently, these sub-elements are as
follows:
faultcode is intended for use by the client software and provides
an algorithmic mechanism for identifying a fault;
faultstring provides a human-readable explanation of a fault,
and is not intended for algorithmic processing.
322
Porta
Switch
Replace <service> with the API service that contains the required
method (e.g. specify the SMPreferences service to manage voice mailbox
preferences.)
Replace <method> with the required API method (e.g. specify
set_folder_preferences method in order to change mailbox folder
preferences.)
Here is an example of the URL the POST request to be sent to:
https://demo.portaone.com:8443/rest/SMPreferences/set_folder_preferences/
For HTTP requests you must include the following parameters (in JSON
format) in the POST request body:
auth_info The mandatory authentication information (see the
Security section);
params A set of method parameters (in JSON format) that
depend on a method structure. Note that method parameters and
their structures are the same as those in the SOAP;
Error Handling
If the server returns the 500 Internal Server Error status code in the
HTTP response, then the response body contains a JSON object which
includes two elements (keys) that carry error information:
faultcode, that is intended for use by the client software and
provides an algorithmic mechanism for identifying the fault;
faultstring, that provides a human readable explanation of the
fault, and is not intended for algorithmic processing.
WSDL
Each PortaSIP Media Server has its own set of WSDL documents
available for download from the web server. Assuming the name of the
PortaSIP Media Server is pum-server.yourdomain.com, these
documents can be downloaded from:
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=Session.xsd
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=Types.xsd
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=Voicemail.xsd
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=SMPreferences.xsd
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=DialDirectory.xsd
323
Porta
Switch
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=AutoAttendant.xsd
https://pumserver.yourdomain.com:8443/soap/wsdl.fcgi?get=Conference.xsd
All requests to PortaSIP Media Server API are handled via an SSL
connection. By default, PortaSIP Media Server installations contain a
self-signed certificate that provides the means to encrypt data. However,
since this certificates authenticity cannot be validated, you may
experience some problems when connecting to an SSL site. In that case, it
may be necessary to obtain a certificate from a genuine certificate
authority. Another option is to generate your own certificate authority and
have certificates deployed to all API clients. However, this goes beyond
the scope of the present document.
Notation conventions
https://pum-server.yourdomain.com/UM/SOAP/Session
Methods
login
Parameters: LoginRequest
Return value: LoginResponse
Checks the validity of login and password and returns session_id
on success. An API fault is generated on failure.
324
Porta
Switch
logout
Parameters: LogoutRequest
Return value: LogoutResponse
Terminates the session. You should call logout() to terminate the session
properly.
Type Reference
LoginRequest structure
Property
login
domain
password
Type
string, 32 char
max
string
string, 16 chars
max
Description
Account ID specified on web
interface
PortaUM Email Domain that
corresponds to the billing
environment that the account
belongs to
Password specified on web
interface
LoginResponse structure
Property
session_id
Type
string, 32 chars
max
Description
ID of newly opened session
LogoutRequest structure
Property
-
Type
-
Description
-
LogoutResponse structure
Property
success
Type
int
Description
1 in case of success, 0 in case of
failure
325
Porta
Switch
create a session and pass session_id in auth_info, or pass all the required
credentials (login/domain/password) in every API request.
auth_info structure
Property
login
Type
string, 32 chars max
domain
string
password
or alternatively:
session_id
string, 32 chars max
Description
Account ID specified on web
interface
PortaUM Email Domain that
corresponds to the billing
environment
Password specified on web
interface
The unique ID of previously
opened API session
https://pum-server.yourdomain.com/UM/SOAP/Voicemail
Methods
get_vm_settings
Parameters: GetVMSettingsRequest
Return value: GetVMSettingsResponse
This method allows an API user (account) to get general voicemail
settings from the PortaSIP Media Server database.
set_vm_settings
Parameters: SetVMSettingsRequest
Return value: SetVMSettingsResponse
This method allows an API user (account) to set general voicemail
settings in the PortaSIP Media Server database.
get_vm_greeting
Parameters: GetVMGreetingRequest
Return value: GetVMGreetingResponse
This method allows an API user (account) to get the sound prompt for a
specified greeting from the PortaSIP Media Server database. The sound
file is returned in a MIME attachment.
326
Porta
Switch
set_vm_greeting
Parameters: SetVMGreetingRequest
Return value: SetVMGreetingResponse
This method allows an API user (account) to set the sound prompt for a
specified greeting type. The sound file is sent in a MIME attachment.
Type Reference
GetVMSettingsRequest structure
Property
vm_settings
Type
VMSettings
Description
Complete information about
general voicemail settings
SetVMSettingsRequest structure
Type
VMSettings
Description
Complete information about
general voicemail settings
SetVMSettingsResponse structure
Property
vm_settings_saved int
Type
Description
1 in case of success
VMSettings structure
Property
password
Type
string
password_ask
string
prompt_levels
string
Description
Password for accessing
voicemail via IVR
yes ask for password
when accessing
voicemail via IVR;
no dont ask for
password when
accessing voicemail via
IVR
PortaSIP Media Server offers
three voice prompt settings in
each supported language:
327
Porta
Switch
announce_dt
string
auto_play
string
greetings
string
fax_file
string
ext_email
ext_email_action
ext_email_vm_fmt string
enable_disa
string (Yes/No)
disa_password
string
standard
extended
rapid
Announce the date and time
when each voicemail was sent.
Values:
yes
no
Auto-play new voicemail(s)
when a call to voicemail is
established. Values:
yes
no
Type of greeting for users
wishing to leave a voicemail.
Values:
standard
extended
personal;
name
Format for received faxes:
multi_png
multi_tiff
pdf
tiff
External email for forwarding,
copying, and notifying
Action for external email:
none
forward
notify
copy
fwd_as_attachment
Voice message audio format:
au
mp3 (default)
wav
Enable DISA functionality for
customers voicemail
Password for using DISA
functionality
GetVMGreetingRequest structure
Property
Type
Description
328
Porta
Switch
greeting_type
Values:
standard
extended
personal
name
GetVMGreetingResponse structure
Property
filename
Type
string
Description
Filename of greeting attached to
SOAP response in a MIME
attachment
SetVMGreetingRequest structure
Property
greeting_info
Type
GreetingInfo
structure
Description
Complete information about
general greetings settings
GreetingInfo structure
Property
greeting_type
Type
string
filename
string
Description
Values:
standard
extended
personal
name
Filename of greeting attached to
SOAP request in a MIME
attachment
SetVMGreetingResponse structure
Property
success
Type
int
Description
1 in case of success
329
Porta
Switch
Methods
get_folder_preferences
Parameters: GetFolderPreferencesRequest
Return value: GetFolderPreferencesResponse
This method allows an API user (account) to get the preferences of his
mailbox.
set_folder_preferences
Parameters: SetFolderPreferencesRequest
Return value: SetFolderPreferencesResponse
This method allows an API user (account) to set the preferences of his
mailbox.
get_display_preferences
Parameters: GetDisplayPreferencesRequest
Return value: GetDisplayPreferencesResponse
This method allows an API user (account) to get the dispaly preferences
of his mailbox and messages.
set_display_preferences
Parameters: SetDisplayPreferencesRequest
Return value: SetDisplayPreferencesResponse
This method allows an API user (account) to set the dispaly preferences
of his mailbox and messages.
330
Porta
Switch
GetFolderPreferencesResponse structure
Property
folder_prefs
Type
Description
FolderPreferences Complete information about the
structure
folder preferences; for more
information, see below
FolderPreferences structure
Property
trash_folder
Type
string
draft_folder
string
unseen_type
int
unseen_notify
int
sent_folder
string
unseen_cumulative int
search_memory
int
Description
An IMAP folder where messages
are moved on deletion. The messages are
deleted completely if this field is set
to none
An IMAP folder where the user can save
a message in progress as a draft. The
messages arent saved if this field is set
to none
The Unread Message Notification Type:
1 Only Unseen
2 Unseen and Total
Enable Unread Message Notification:
1 No Notification
2 Only INBOX
3 All Folders
An IMAP folder messages are copied to
after they are sent. The messages arent
copied if this field is set to none
Enable the Cumulative Unread Message
Notification. This controls the behavior
of the message counter displayed next to
each folder in the folder list. When
enabled, if the folder contains sub-folders
and is collapsed, then the message count
includes all messages within all the subfolders of that folder.
Memory Search options. If the user
searches the mailbox, the search
can be saved for quick access later on.
This option defines how many mailbox
searches will be saved.
Allowed Values: 0 (disabled), 1, 2, 3, 4, 5,
6, 7, 8, 9
331
Porta
Switch
SetFolderPreferencesRequest structure
Property
folder_prefs
Type
Description
FolderPreferences Complete information about the
structure
folder preferences; for more
information, see below
SetFolderPreferencesResponse structure
Property
success
Type
Description
1 in case of success
int
GetDisplayPreferencesRequest structure
Property
Type
Description
GetDisplayPreferencesResponse structure
Property
display_prefs
Type
Description
DisplayPreferences Complete information about
structure
the display preferences; for
more information, see below
DisplayPreferences structure
Property
wrap_at
Type
int
truncate_sender
int
show_xmailer_default int
editor_height
int
mdn_user_support
int
truncate_subject
int
body_quote
string
include_self_reply_all
int
sig_first
int
Description
Defines how many characters to allow
before wrapping text
Specifies the lenght of the From / To
fields (0 for full)
When viewing a message, this displays
which email service or client the sender
used
Specifies the height of the Editor
Window
Specifies whether to enable the Mail
Delivery Notification
Specifies the lenght of the Subject
Field (0 for full)
Prefix each line of the original message
with this symbol when replying or
forwarding an email message
Specifies whether to include users
address in CC when he chooses Reply
All
Specifies whether to prepend signature
before Reply/Forward text
332
Porta
Switch
pf_cleandisplay
int
editor_size
int
show_html_default
int
page_selector_max
int
internal_date_sort
int
page_selector
int
addrsrch_fullname
string
show_num
int
show_images
int
SetDisplayPreferencesRequest structure
Property
display_prefs
Type
Description
DisplayPreferences Complete information about
structure
the display preferences; for
more information, see below
SetDisplayPreferencesResponse structure
Property
success
Type
int
Description
1 in case of success
333
Porta
Switch
https://pum-server.yourdomain.com/UM/SOAP/AutoAttendant
Methods
get_menu_list
Parameters: GetMenuListRequest
Return value: GetMenuListResponse
This method allows an API user (account) to get a list of all configured
auto attendant menus.
update_menu
Parameters: UpdateMenuRequest
Return value: UpdateMenuResponse
This method allows an API user (account) to update the settings of a
separate auto attendant menu.
create_menu
Parameters: CreateMenuRequest
Return value: CreateMenuResponse
This method allows an API user (account) to create an auto attendant
menu.
del_menu
Parameters: DelMenuRequest
Return value: DelMenuResponse
This method allows an API user (account) to delete an auto attendant
menu.
set_menu_prompt
Parameters: SetMenuPromptRequest
Return value: SetMenuPromptResponse
This method allows an API user (account) to set (record) separate promt
for selected auto attendant menu. The sound file is sent in a MIME
attachment to the API request.
334
Porta
Switch
get_menu_prompt
Parameters: GetMenuPromptRequest
Return value: GetMenuPromptResponse
This method allows an API user (account) to get a separate prompt from
the selected auto attendant menu. The sound file is sent in a MIME
attachment to the API request.
get_menu_transition_list
Parameters: GetMenuTransitionListRequest
Return value: GetMenuTransitionListResponse
This method allows an API user (account) to get a list of auto attendant
menu transitions.
set_menu_transition
Parameters: SetMenuTransitionRequest
Return value: SetMenuTransitionResponse
This method allows an API user (account) to set auto attendant menu
transitions. The transition prompt should be sent in a MIME attachment.
get_menu_transition_prompt
Parameters: GetMenuTransitionPromptRequest
Return value: GetMenuTransitionPromptResponse
This method allows an API user (account) to get an auto attendant menu
transition prompt. The prompt is sent in a MIME attachment.
Type Reference
GetMenuListRequest structure
Property
-
Type
-
Description
-
GetMenuListResponse structure
Property
menu_list
Type
array of
MenuInfo
structures
Description
List of auto attendant menus
335
Porta
Switch
UpdateMenuRequest structure
Property
menu_info
Type
MenuInfo
Description
Auto attendant menu data
UpdateMenuResponse structure
Property
i_menu
Type
int
Description
The unique ID of updated menu
record
CreateMenuRequest structure
Property
menu_info
Type
MenuInfo
Description
Auto attendant menu data
CreateMenuResponse structure
Property
i_menu
Type
int
Description
The unique ID of created menu
record
DelMenuRequest structure
Property
i_menu
Type
int
Description
The unique ID of deleted menu
record
DelMenuResponse structure
Property
i_menu
Type
int
Description
The unique ID of deleted menu
database record
MenuInfo structure
Property
i_menu*
Type
int
name
string, max 64
chars
period
period_desc
Description
The unique ID of menu record
(required for the update_menu
and del_menu methods)
The unique within one
account menu name; ROOT
name is reserved for the root
menu, which always exists
Period in special format (see
appendix)
Description of period in a form
understandable by end-users
336
Porta
Switch
msg_disabled_type string
msg_timeout_type
string
msg_intro_set
int
msg_menu_set
int
msg_disabled_set
int
msg_timeout_set
int
msg_intro_type
string
msg_menu_type
string
SetMenuPromptRequest structure
Property
i_menu
Type
int
prompt_type
string
prompt
string
Description
The unique ID of updated menu
record
Prompt type:
intro
menu
disabled
timeout
Filename of a prompt that is
being sent in a MIME attachment
to the API request
337
Porta
Switch
SetMenuPromptResponse structure
Property
i_menu
Type
int
Description
The unique ID of updated menu
record
GetMenuPromptRequest structure
Property
i_menu
prompt_type
Type
int
string
Description
The unique ID of menu record
Prompt type:
intro
menu
disabled
timeout
GetMenuPromptResponse structure
Property
prompt
Type
string
Description
Filename of a prompt that is
being sent in a MIME attachment
to the API response
GetMenuTransitionListRequest structure
Property
i_menu
Type
int
Description
The unique ID of menu record
GetMenuTransitionListResponse structure
Property
transition_list
Type
array of
TransitionInfo
structures
Description
Set of transitions for specified
auto-attendant menu
SetMenuTransitionRequest structure
Property
i_menu
Type
int
transition_info
TransitionInfo
Description
The unique ID of the menu
record
Properties of the menu transition
SetMenuTransitionResponse structure
Property
success
Type
int
Description
1 in case of success,
0 if failed
338
Porta
Switch
GetMenuTransitionPromptRequest structure
Property
i_menu
event
Type
int
string
Description
The unique ID of menu record
Transition event; see allowed
values in TransitionInfo
structure
GetMenuTransitionPromptResponse structure
Property
prompt
Type
string
Description
Filename of a prompt that is
being sent in a MIME attachment
to the API request
TransitionInfo structure
Property
event
string
action
string
target_i_menu
int
destination
string, max. 32
chars
int
max_size
Type
Description
Transition event. Values:
0, 1, 2, 3, 4, 5, 6,
7, 8, 9, *, #, Timeout,
Not Active, f.
Performed action. Values:
Disabled no action
Directory launch Dial
Directory IVR
Transfer transfer to
preconfigured number
specified in destination
field
TransferE164 transfer
to E164 number specified
in destination field
Voicemail launch
voicemail recording
Menu go to the auto
attendant menu specified
in target_i_menu
Extension transfer to
extension dialed by user;
DISA make a call
The unique ID of auto attendant
menu record
Destination for Transfer,
TransferE164 action
The maximum allowed number
of digits that a user can input as
339
Porta
Switch
play_prompt
string
prompt_set
prompt
int
string
https://pum-server.yourdomain.com/UM/SOAP/DialDirectory
Methods
get_dir_info
Parameters: GetDirInfoRequest
Return value: GetDirInfoResponse
This method allows an API user (account) to get a list of dial directory
entries and general dial directory settings.
update_dir_info
Parameters: UpdateDirInfoRequest
Return value: UpdateDirInfoResponse
This method allows an API user (account) to update general dial directory
settings.
get_dir_entry
Parameters: GetDirEntryRequest
Return value: GetDirEntryResponse
This method allows an API user (account) to get a dial directory entry
with prompt data sent via a MIME attachment to the API response.
del_dir_entry
Parameters: DelDirEntryRequest
Return value: DelDirEntryResponse
This method allows an API user (account) to delete an entry in the dial
directory.
340
Porta
Switch
update_dir_entry
Parameters: UpdateDirEntryRequest
Return value: UpdateDirEntryResponse
This method allows an API user (account) to update an entry in the dial
directory. The entry prompt for should be sent in a MIME attachment to
the API request.
create_dir_entry
Parameters: CreateDirEntryRequest
Return value: CreateDirEntryResponse
This method allows an API user (account) to create a new entry in the dial
directory. The entry prompt for should be sent in a MIME attachment to
the API request.
Type Reference
DirectoryInfo structure
Property
intro
string
Type
intro_custom
string
no_abbr_num
string
Description
Which intro prompt to play:
PortaSIP Media Server built-in
or user-recorded? Values:
standard
custom
Filename for user-recorded
prompt sent in a MIME
attachment
Values:
Y
N
DirEntryInfo structure
Property
i_entry
int
Type
active
string
Description
The unique ID of dial
directory entry
Is this dial directory entry
active? Values:
Y
N
Abbreviated number that can
be used instead of dial
directory entry matching via
lastname
341
Porta
Switch
number_to_dial
string, max 32
chars
string, max 25
chars
lastname
description
prompt_set
string, max 64
chars
int
prompt
string
Number to be dialed
Last name whose first 3 letters
are used to match the dial
directory entry (via standard
telephone keyboard mapping)
Directory entry description
1 if user-recorded prompt set,
otherwise 0
Filename for user-recorded
MOH sent in a MIME
attachment (only for
create_dir_entry,
update_dir_entry methods)
GetDirInfoRequest structure
Property
-
Type
-
Description
-
GetDirInfoResponse structure
Property
directory_info
dir_entry_list
Type
DirectoryInfo
array of
DirEntryInfo
structures
Description
Dial directory general settings
List of dial directory entries
UpdateDirInfoRequest structure
Property
directory_info
Type
DirectoryInfo
Description
Dial directory general settings
UpdateDirInfoResponse structure
Property
success
Type
int
Description
1 in case of success,
0 if failed
GetDirEntryRequest structure
Property
i_entry
Type
int
Description
The unique ID of dial directory
entry
GetDirEntryResponse structure
Property
Type
Description
342
Porta
Switch
dir_entry_info
DelDirEntryRequest structure
Property
i_entry
Type
int
Description
The unique ID of dial directory
entry
DelDirEntryResponse structure
Property
i_entry
Type
int
Description
The unique ID of dial directory
entry
UpdateDirEntryRequest structure
Property
dir_entry_info
Type
DirEntryInfo
Description
Information about dial directory
entry
UpdateDirEntryResponse structure
Property
i_entry
Type
int
Description
The unique ID of dial directory
entry
CreateDirEntryRequest structure
Property
dir_entry_info
Type
DirEntryInfo
Description
Information about dial directory
entry
CreateDirEntryResponse structure
Property
i_entry
Type
int
Description
The unique ID of dial directory
entry
Conference Configuration
SOAP URI: https://pum-server.yourdomain.com/UM/SOAP/Conference
Methods
get_conf_info
Parameters: GetConfInfoRequest
2000-2015 PortaOne, Inc. All rights Reserved. www.portaone.com
343
Porta
Switch
Parameters: GetConfListRequest
Return value: GetConfListResponse
Realm: account
This method allows an API user to obtain a list of all his conferences and
their settings.
create_conf
Parameters: CreateConfRequest
Return value: CreateConfResponse
Realm: account
This method allows an API user to create a new conference entity.
update_conf
Parameters: UpdateConfRequest
Return value: UpdateConfResponse
Realm: account
This method allows an API user (account) to update a conference entity.
del_conf
Parameters: DelConfRequest
Return value: DelConfResponse
Realm: account
This method allows an API user to delete a certain conference.
set_conf_prompt
Parameters: SetConfPromptRequest
Return value: SetConfPromptResponse
This method allows an API user (account) to set (record) separate
prompts for conferences. The sound file is sent in a MIME attachment to
the API request.
344
Porta
Switch
get_conf_prompt
Parameters: GetConfPromptRequest
Return value: GetConfPromptResponse
This method allows an API user (account) to get a prompt recorded for a
conference. The sound file is sent in a MIME attachment to the API
request.
get_conference_settings
Parameters: GetConferenceSettingsRequest
Return value: GetConferenceSettingsResponse
Realm: administrator, reseller, retail customer, account
This method allows an API user (account) to get a list of conference
room parameters.
Type Reference
ConfInfo structure
Property
i_conf
Type
int
name
pin_host
string
string
pin_user
string
max_call_duration
max_session_time
int
int
max_participants
wait_host
int
string
play_announce
string
play_moh
string
start_time
string
msg_intro_set
string
Description
The unique ID for a conference
entity
A conference name
PIN for administrator to log into
the conference
PIN for user to join the
conference
Maximum conference duration
Maximum session time (exclusive
with start / end time)
Maximal participants
Whether the administrator should
log in first. Allowed values: Y, N
Specifies whether announcements
should be played.
Allowed values: Y, N
Specifies whether MOH should
be played. Allowed values: Y, N
Specifies when the conference
will start (For permanent
conference use
max_session_time). Note that the
time is defined in UTC
1 if an Intro prompt recorded;
345
Porta
Switch
moh_set
string
video_conf
string
otherwise 0
1 if a MOH prompt recorded;
otherwise 0
Specifies whether video
conference is enabled. Allowed
values: Y, N
GetConfInfoRequest structure
Property
i_conf
name
Type
int
string
Description
The unique ID for the conference
The conference name
GetConfInfoResponse structure
Property
conf_info
Type
ConfInfo structure
Description
General conference settings
GetConfListRequest structure
Property
-
Type
-
Description
-
GetConfListResponse tructure
Property
conf_list
Type
array of
ConfInfo
structures
Description
List of conferences and their
settings
CreateConfRequest structure
Property
conf_info
Type
ConfInfo structure
Description
General conference settings
CreateConfResponse structure
Property
i_conf
Type
int
Description
The unique ID for a new
conference
UpdateConfRequest structure
Property
conf_info
Type
ConfInfo structure
Description
General conference settings
346
Porta
Switch
UpdateConfResponse structure
Property
i_conf
Type
int
Description
The unique ID for the updated
conference
DelConfRequest structure
Property
i_conf
Type
int
Description
The unique ID for the conference
to be deleted
DelConfResponse structure
Property
i_conf
Type
int
Description
The unique ID for deleted
conference
SetConfPromptRequest structure
Property
i_conf
Type
int
prompt_type
string
prompt
string
Description
The unique ID for a conference
record
Prompt type:
intro
moh
Filename for a prompt that is
being sent in a MIME attachment
to the API request
SetConfPromptResponse structure
Property
i_conf
Type
int
Description
The unique ID for the updated
conference record
GetConfPromptRequest structure
Property
i_conf
Type
int
prompt_type
string
Description
The unique ID for a conference
record
Prompt type:
intro
moh
GetConfPromptResponse structure
Property
Type
Description
347
Porta
Switch
prompt
GetConferenceSettingsRequest structure
Property
Type
conf_max_allowed_session_time int
conf_max_pin_len
int
conf_max_participants_num
int
Description
Shows the maximum
duration of a conference
Shows moderators and
users PIN number length
Shows the maximum
number of participants
allowed for a conference
348
Porta
Switch
Appendices
4. Appendices
349
Porta
Switch
Appendices
350
Porta
Switch
Appendices
=
=
=
=
=
=
=
=
=
=
=
'164.9.9.100'
'Async'
'10086610975'
'6045550193'
'Login-User'
'39AE126B CD4D11DB 958E0014 1C3F6886'
''
'PortaBilling_AccessCode:6045551600'
'transactionID:526267'
'0'
'ISDN 3/0:D:13'
Authentication Response
h323-credit-amount
h323-billing-model
h323-ivr-in
h323-ivr-in
h323-ivr-in
h323-ivr-in
h323-return-code
h323-currency
h323-preferred-lang
=
=
=
=
=
=
=
=
=
10.00
1
Tariff:PrepaidCard
PortaBilling_AccountBalance:10.00000
PortaBilling_ProductBreakage:0.00000
available-funds:10.00
0
CAD
en
Authorization Request
NAS-IP-Address
User-Name
Called-Station-Id
Calling-Station-Id
Service-Type
h323-conf-id
Password
h323-ivr-out
h323-ivr-out
h323-ivr-out
=
=
=
=
=
=
=
=
=
=
'164.9.9.100'
'10086610975'
'01182623634515'
'6045550193'
'Login-User'
'39AE126B CD4D11DB 958E0014 1C3F6886'
''
'PortaBilling_Seed:18879071672'
'PortaBilling_Original_CLD:6045551600'
'transactionID:526273'
Authorization Response
h323-billing-model
h323-ivr-in
h323-ivr-in
h323-ivr-in
h323-ivr-in
h323-ivr-in
h323-return-code
h323-currency
=
=
=
=
=
=
=
=
1
Tariff:PrepaidCard
PortaBilling_CompleteNumber:82623634515
PortaBilling_Auth_CLD:82623634515
PortaBilling_Auth_Reseller_CLD:82623634515
DURATION:30000
0
CAD
351
Porta
Switch
h323-credit-time
h323-preferred-lang
Appendices
= 30000
= en
=
=
=
=
=
=
=
=
=
=
=
=
=
=
'164.9.9.100'
'10086610975'
'82623634515'
'6045550193'
'Stop'
'Login-User'
'originate'
'VoIP'
'00:16:18.192 PST Fri Mar 9 2007'
'00:16:21.164 PST Fri Mar 9 2007'
'00:17:31.893 PST Fri Mar 9 2007'
'10'
'39AE126B CD4D11DB 958E0014 1C3F6886'
'4A65E46C-CD4D11DB-886EDEBF-
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
'164.9.9.100'
'Async'
'10086610975'
'6045551600'
'6045550193'
'Stop'
'Login-User'
'answer'
'Telephony'
'00:15:50.148 PST Fri Mar 9 2007'
'00:15:50.156 PST Fri Mar 9 2007'
'00:17:31.889 PST Fri Mar 9 2007'
'10'
'39AE126B CD4D11DB 958E0014 1C3F6886'
'39AE126B CD4D11DB 958E0014 1C3F6886'
'PortaBilling_Session:unlock'
'Tariff:Unknown'
'0'
'ISDN 3/0:D:13'
352
Porta
Switch
Appendices
h323-ivr-out = 'PortaBilling_Ignore_Password:YES'
h323-ivr-out =
'PortaSIP_Aux_Info:auth_life=164498/1/0;auth_cnt=1;CC_now=16449
8/1;pid=19218;request_type=routing'
NAS-Port = '5060'
Authorization Response
h323-return-code = 13
h323-ivr-in = PortaBilling_CompleteNumber:12125468754
h323-ivr-in = Product:PortaOne Internal
h323-ivr-in = Tariff:Internal
h323-ivr-in = PortaBilling_NodeId:193.38.81.217
h323-ivr-in = PortaBilling_AccessCode:OUTGOING
h323-ivr-in = PortaBilling_Seed:2567011031
h323-ivr-in = PortaBilling_RatePattern:12125468754
h323-ivr-in = PortaBilling_Authorize:base=session-time;avail=1;expires=1373028131
h323-billing-model = 0
PortaOne-Service-Features = moh=1;rec=2;rtpp-level=3
PortaOne-Calling-Party =
name=11380441234567;id=380441234567;display-id=380441234567
h323-currency = USD
h323-preferred-lang = en
Framed-Route = r=;g-hunt=seq
Framed-Route = P_=;g-hunt=skip;expires=300;patience=20
Framed-Route =
p__=65.174.119.133;auth=AA14CF3595B86BF7B1C7B0458626C288DD5B419
1C0B759A3
Framed-Route = p__=69.25.184.13;rtpp-level=3
Callback Session
First call leg authorization
NAS-IP-Address
= "142.179.71.220"
User-Name
= "00099900113"
Called-Station-Id
= "00099900113"
Calling-Station-Id
= "00099900113"
h323-conf-id
= "2F01F3F6 B89192B8 711B0000 1C7A0F2A "
Password
= "secret"
h323-remote-address
= "193.28.87.193"
h323-ivr-out
= "PortaBilling_OriginalCLD:555333"
h323-ivr-out
= "PortaBilling_AuthMethod:INVITE"
h323-ivr-out
= "PortaBilling_Seed:4094388346"
Message-Authenticator = '84C47B0BDC12887A60D2C5167C740A'
353
Porta
Switch
Appendices
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
142.179.71.220
"originate"
"VoIP"
"11:34:20.677 GMT Fri Feb 23 2007"
"00099900113"
"00099900113"
"000999002222"
"2F01F3F6 B89192B8 711B0000 1C7A0F2A"
"11111111 B89192B8 711B0000 1C7A0F2A"
"B89192B8-66BC43D89"
"11:34:30.677 GMT Fri Feb 23 2007"
"11:34:30.677 GMT Fri Feb 23 2007"
PortaBilling_Seed:4094388346
"10.28.87.193"
"PortaBilling_OriginalCLD:OUT"
0
"1C"
Stop
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
142.179.71.220
"originate"
"VoIP"
"11:34:35.677 GMT Fri Feb 23 2007"
"00099900113"
"00099900113"
"00099900222"
"2F01F3F6 B89192B8 711B0000 1C7A0F2A"
"11111111 B89192B8 711B0000 1C7A0F2A"
"B89192B8-66BC43D89"
"11:34:30.677 GMT Fri Feb 23 2007"
"11:36:32.677 GMT Fri Feb 23 2007"
"PortaBilling_Seed:4094388346"
"10.28.87.200"
"PortaBilling_OriginalCLD:OUT"
122
"0"
Stop
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
142.179.71.220
"originate"
"VoIP"
"11:33:38.677 GMT Fri Feb 23 2007"
"00099900113"
"00099900113"
"00099900113"
PortaBilling_CallbackHistory:START
PortaBilling_CallbackHistory:ATTEMPT
PortaBilling_CallbackHistory:ATTEMPT
PortaBilling_CallbackHistory:OK
"2F01F3F6 B89192B8 711B0000 1C7A0F2A"
"B89192B8-66BC43D89"
"11:34:18.677 GMT Fri Feb 23 2007"
"11:35:18.677 GMT Fri Feb 23 2007"
"PortaBilling_Seed:4094388346"
"10.28.87.200"
"PortaBilling_OriginalCLD:555333"
60
"0"
Stop
0
354
Porta
Switch
Appendices
Authentication response
h323-credit-amount
= 10.00
h323-billing-model
= 1
h323-ivr-in
= PortaBilling_AccessCode:01inbound
h323-ivr-in
= Tariff:T_SubService_1
h323-ivr-in
= PortaBilling_AccountBalance:10.00000
h323-ivr-in
= PortaBilling_ProductBreakage:0.00000
h323-ivr-in
= available-funds:10.00
h323-return-code
= 0
h323-currency
= USD
h323-preferred-lang
= en
Message-Authenticator = '1CD6D5B0BDC33987A60D5C6167B22517'
=
=
=
=
=
=
'127.0.0.102'
'02001'
'02001'
'01010101 00000000 00000000 00000012'
'test1234'
'PortaBilling_Original_CLD:01inbound'
=
=
=
=
=
=
=
=
60.00
PortaBilling_AccessCode:01inbound
Tariff:T_SubService_1
PortaBilling_RechargedAmount:50.00000
available-funds:60.00
0
USD
en
=
=
=
=
=
=
'192.168.100.50'
'0101'
'secret'
'JAZZ'
'A5D3B74C D26411DC 98D5001D 090C82FA'
Quantity
= 0
= Tariff:Music Account
= PortaBilling_CompleteNumber:JAZZ
355
Porta
Switch
Appendices
h323-ivr-in
=
h323-return-code
=
h323-currency
=
h323-preferred-lang =
Message-Authenticator
PortaBilling_Auth_CLD:JAZZ
13
USD
en
= '1D86D5B0BDC33987A60D5C6167B13D91'
=
=
=
=
=
=
=
=
=
1
Tariff:Music Account
DURATION:10
PortaBilling_CompleteNumber:JAZZ
PortaBilling_Auth_CLD:JAZZ
0
USD
10
en
Accounting Request
NAS-IP-Address
User-Name
Called-Station-Id
Acct-Status-Type
h323-call-origin
h323-call-type
h323-setup-time
h323-connect-time
h323-disconnect-time
h323-disconnect-cause
h323-conf-id
Acct-Session-Id
Acct-Session-Time
PortaOne-Service-Type
h323-ivr-out
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
'192.168.100.50'
'0101'
'JAZZ'
'Stop'
'originate'
'Telephony'
'07:18:35.965 GMT Mon Feb 6
'07:18:43.965 GMT Mon Feb 6
'08:11:38.965 GMT Mon Feb 6
'0'
'A5D3B74C D26411DC 98D5001D
'da6b76'
'3175'
Quantity
'Used-Service-Unit:1'
2008'
2008'
2008'
090C82FA'
356
Porta
Switch
Appendices
my $proxy_port = '443';
my $login = 'pb-root';
my $password = 'pb-root';
my $uri_base = 'http://portaone.com/Porta/SOAP';
my $proxy
= "$proxy_host:$proxy_port/soap/";
my %uris = (
'Session' => "$uri_base/Session",
'Account' => "$uri_base/Account",
'Customer' => "$uri_base/Customer",
);
sub fault_handler {
my ($soap, $res) = @_;
die "SOAP Fault: $!, " . (ref $res ? $res->faultstring
: $soap->transport->status)
;
}
my $session_service = SOAP::Lite
->uri($uris{'Session'})
->proxy($proxy)
->on_fault(\&fault_handler)
;
my $customer_service = SOAP::Lite
->uri($uris{'Customer'})
->proxy($proxy)
->on_fault(\&fault_handler)
;
my $account_service = SOAP::Lite
->uri($uris{'Account'})
->proxy($proxy)
->on_fault(\&fault_handler)
;
# required to support dateTime type
$session_service->serializer()
->xmlschema('http://www.w3.org/2001/XMLSchema');
$customer_service->serializer()
->xmlschema('http://www.w3.org/2001/XMLSchema');
$account_service->serializer()
->xmlschema('http://www.w3.org/2001/XMLSchema');
my $LoginResponse = $session_service->login($login, $password);
my $session_id = $LoginResponse->result();
print "Logged in with session $session_id\n";
my $header = SOAP::Header->name('auth_info')
->value({ session_id => $session_id })
;
eval {
my $GetCustomerInfoRequest = {
i_customer => 1
};
my $GetCustomerInfoResponse
= $customer_service->get_customer_info(
$header, $GetCustomerInfoRequest
)->result;
if (! $GetCustomerInfoResponse->{'customer_info'}) {
die "No customer found\n";
}
my $CustomerInfo = $GetCustomerInfoResponse->{'customer_info'};
print "Customer Name: $CustomerInfo->{'name'}\n"
357
Porta
Switch
Appendices
. "E-Mail: $CustomerInfo->{'email'}\n"
. "Balance: $CustomerInfo->{'balance'} "
. $CustomerInfo->{'iso_4217'} . "\n"
;
# listing accounts under this customer.
my $has_more_accounts = 1;
my $limit = 5;
my $offset = 0;
ACCOUNT_LIST:
while ($has_more_accounts) {
my $GetAccountListRequest = {
i_customer => 1,
limit
=> $limit,
offset
=> $offset
};
my $GetAccountListResponse
= $account_service->get_account_list(
$header, $GetAccountListRequest
)->result;
if (! $GetAccountListResponse->{'account_list'}) {
last ACCOUNT_LIST;
}
my $account_list = $GetAccountListResponse->{'account_list'};
if (@$account_list < $limit) {
$has_more_accounts = 0;
}
for my $AccountInfo (@$account_list) {
print " Account ID: $AccountInfo->{'id'}\n"
. "
Balance: $AccountInfo->{'balance'}"
. " $AccountInfo->{'iso_4217'}\n"
;
}
$offset += $limit;
}
};
if ($@) {
print "An error occured: $@\n";
}
# logging out is required
$session_service->logout($session_id);
exit 0;
358
Porta
Switch
Appendices
= 'server_name.com';
= qq{https://$soap_server/soap/};
my $session_client_uri = qq{https://$soap_server/Porta/SOAP/Session};
my $customer_client_uri= qq{https://$soap_server/Porta/SOAP/Customer};
# SOAP user.
# Put your user credentials here!
my $soap_user
= 'USER_LOGIN';
my $soap_passwd = 'USER_PASSOWRD';
# this one is supposed to keep session identifier
my $session_id
= undef;
my $login_response = $soap_session_client->login($soap_user,
$soap_passwd);
# Here we obtain session id.
# Again: to discover what is returned we refer to
# WSDL document located at the WEB server
#(https://<your_web_server_name>/wsdl/SessionAdminService.wsdl)
# and see that the data structure is returned with
# a single field: 'session_id'
#
359
Porta
Switch
Appendices
# <message name="LoginResponse">
# <part name="session_id" type="xsd:string"/>
# </message>
$session_id = $login_response->result();
#
#
#
#
my $soap_header = SOAP::Header->new();
$soap_header->name('auth_info')->value({'session_id' => $session_id});
trace("started new session (session id: $session_id)");
# Here we make new soap client which will handle
# customer-related requests/responses
my $soap_customer_client = SOAP::Lite->new();
$soap_customer_client->proxy($soap_proxy);
$soap_customer_client->uri($customer_client_uri);
# Here the support of additional data types is added
$soap_customer_client->serializer()>xmlschema('http://www.w3.org/2001/XMLSchema');
$soap_customer_client->on_fault(sub { return on_fault_handler(@_); } );
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
my $customer_info_request = {
'name' => 'retail-customer'
};
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
360
Porta
Switch
Appendices
#
<input message="tns:GetCustomerInfoRequest"/>
#
<output message="tns:GetCustomerInfoResponse"/>
# </operation>
#
# Finally, customer info response is described within Types.xsd
my $customer_info_response = $soap_customer_client->get_customer_info(
$soap_header,
$customer_info_request
);
my $customer_data = $customer_info_response->result();
my $customer_info = $customer_data->{'customer_info'};
# Here we just output some data about customer
print_customer_info($customer_info);
#
#
#
#
#
#
if ( ! $customer_info->{'email'} || $customer_info->{'email'} ne
'retail-customer@somewhere.com' ) {
$customer_info->{'email'} = 'retail-customer@somewhere.com';
}
else {
$customer_info->{'email'} = 'retail-customerrenamed@somewhere.com';
}
trace(sprintf("$/Changing customer's email address to '%s'$/",
$customer_info->{'email'}));
#
#
#
#
#
my $update_customer_response = $soap_customer_client->update_customer(
$soap_header,
{ 'customer_info' => $customer_info }
);
my $yet_another_customer_info_response = $soap_customer_client>get_customer_info(
$soap_header,
$customer_info_request
);
my $customer_data_updated = $customer_info_response->result();
my $customer_info_updated = $customer_data_updated->{'customer_info'};
print_customer_info($customer_info_updated);
# Subroutine which is in charge of handling SOAP errors
sub on_fault_handler {
my($soap, $res) = @_;
use Data::Dumper;
printf(STDERR "RES: %s$/", Dumper($res));
my $err = ref $res ? $res->faultstring() : $soap->transport>status();
die(sprintf("FATAL: %s, %s$/", $! ? $! : 'error', $err ? $err :
'unknown error'));
}
sub trace {
my($message) = @_;
361
Porta
Switch
Appendices
if ( defined($message) ) {
printf(STDERR "%s$/", $message);
}
}
sub print_customer_info {
my($customer_info) = @_;
if ( ref($customer_data) ne 'GetCustomerInfoResponse' ) {
die("Customer data structure is expected");
}
my %map_param_title = (
'name' => 'Customer',
'email' => 'E-mail'
);
printf(STDERR "Customer info:$/");
while ( my($param, $title) = each(%map_param_title) ) {
printf(STDERR "\t%-10s: %s$/",
defined($title) ? $title : '',
defined($customer_info->{$param}) ?
$customer_info->{$param} : '');
}
}
362
Porta
Switch
Appendices
# ==========PARAMETERS SECTION============
#
# ==== YOU SHOULD CONFIGURE PARAMETERS HERE ====
# ===== SET ALL PARAMETERS MARKED BY '!!!' =====
# SOAP server FQDN (actually WEB server's address or IP address)
# PUT your WEB server address here
# !!! SET SERVER NAME OR IP BELOW
my $soap_server
= 'server_name.com';
# SOAP user
# PUT your user credentials here
my $soap_user
= 'USER_NAME'; # !!! SET USER HERE
my $soap_passwd = 'PASSWORD'; # !!! SET USERS PASSWORD HERE
# Info about customer which will be added
my $customer_info = {
# !!! SET the name of the customer that will be created
name
=> 'NEW_CUSTOMER_NAME',
# !!! SET the currency that will be used for the customer
iso_4217 => 'USD',
# Actually you can add here other settings for customer
# according to wsdl document
# You can generate them or get by other SOAP requests....
};
# Info about accounts that will be added.
# !!! SET THE LIST OF ACCOUNT IDs
# in ('1','2',,'x') format
my @ids = ('0009991', '0009992', '0009993');
my $account_info = {
# !!! SET id of the product which will be used during
# accounts creation
i_product
=> 1,
# !!! SET account billing model:
# '1' - for credit, '-1' - for debit
billing_model
=> 1,
# !!! SET activation date for accounts
activation_date => '2011-11-01',
# Actually you can add here other settings for accounts
# according to wsdl document
};
# =======================================================
# =======================================================
# URL of soap service
my $soap_proxy
#
#
#
#
#
#
#
#
= qq{https://$soap_server/soap/};
363
Porta
Switch
Appendices
# /home/porta-admin/site_lib/Porta/SOAP/ and
# you will see there main modules for
# Session, Account, Customer clients and others
my $session_client_uri = qq{https://$soap_server/Porta/SOAP/Session};
my $customer_client_uri= qq{https://$soap_server/Porta/SOAP/Customer};
my $account_client_uri=qq{https://$soap_server/Porta/SOAP/Account};
# this one is supposed to keep session identifier
my $session_id
= undef;
my $login_response = $soap_session_client->login($soap_user,
$soap_passwd);
#
#
#
#
#
#
#
#
#
#
$session_id = $login_response->result();
# here we create SOAP header. We need it in order to notify SOAP server
# that we've been already authenticated (header contains
# session identifier taken from login response earlier)
my $soap_header = SOAP::Header->new();
$soap_header->name('auth_info')->value({'session_id' => $session_id});
trace("started new session (session id: $session_id)");
364
Porta
Switch
Appendices
# --- Add customer --# At first we are about to get customer information
#(whose name we are going to add) to check possibility of adding
my $customer_info_request = {
'name' => $customer_info->{name},
};
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
my $customer_info_response = $soap_customer_client->get_customer_info(
$soap_header,
$customer_info_request
);
# For example, we should stop script if customer with this name already
# exists
my $customer_data = $customer_info_response->result();
if ( $customer_data && $customer_data->{'customer_info'} ) {
365
Porta
Switch
Appendices
366
Porta
Switch
Appendices
my $add_account_response = $soap_account_client->add_account(
$soap_header,
{ 'account_info' => $account_info }
);
# Get the results and print some info
my $add_acc_resp_data = $add_account_response->result();
my $i_customer = $add_cust_resp_data->{i_customer};
if ( $add_acc_resp_data && $add_acc_resp_data->{i_account} ) {
printf(STDERR "Added account i_account=%s$/",
$add_acc_resp_data->{i_account});
} else {
# Actually there is an impossible situation when
# no i_account info in response, but still the error exists for this
case
printf(STDERR "Wrong answer from server while during an account
$/");
}
};
# subroutine which is in charge of handling SOAP errors
sub on_fault_handler {
my($soap, $res) = @_;
printf(STDERR "RES: %s$/", Dumper($res));
my $err = ref $res ? $res->faultstring() : $soap->transport>status();
die(sprintf("FATAL: %s, %s$/", $! ? $! : 'error', $err ? $err :
'unknown error'));
}
sub trace {
my($message) = @_;
if ( defined($message) ) {
printf(STDERR "%s$/", $message);
}
}
LWP::UserAgent;
HTTP::Request::Common qw{ POST };
JSON;
HTTP::Request::Common;
use Getopt::Long;
# If the server certificate is not trusted (e.g. it was not issued by a
trusted certificate authority), then ignore it.
367
Porta
Switch
Appendices
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
# Define your User Agent
# This is the object acting as a browser that
# makes requests and receives responses.
my $ua = LWP::UserAgent->new();
#=================================================================
#======================== LOGGING IN =============================
#=================================================================
# Forming the POST request for authentication.
# It must include users login and password.
my $request = POST(
'https://demo.your_domain.com:443/rest/Session/login/', [
params
=> '{"login":"demoroot", "password":"u7h79o1$"}',
]
);
# Sending the authentication request
my $response = $ua->request($request);
# Getting the authentication information (exiting if unauthorized)
my $auth_info = parse_and_print_response($response);
exit(1) if ( ! $auth_info );
# Receiving session_id
my $session_id = $auth_info->{session_id};
#=================================================================
#================ GETTING THE LIST OF ACCOUNTS ===================
#=================================================================
# To get the list of accounts forming the POST request to be sent
# to the following URL:
# https://<web-server-address>/rest/<service>/<method name>/
#
# The request must include:
# auth_info mandatory authentication information
# (using session_id which was received in the previous request);
#
# params a set of method parameters in JSON format.
$request = POST(
'https://demo.your_domain.com:443/rest/Account/get_account_list/',
[
auth_info => sprintf(' { "session_id": "%s" } ', $session_id),
params
=> ' { "limit":"10", "offset":"2"} '
]
);
# Sending the request
$response = $ua->request($request);
# Receiving the list of accounts
my $account_list = parse_and_print_response($response);
exit(1) if ( ! $account_list );
#=================================================================
#======================== LOGGING OUT ============================
#=================================================================
# Sending the logout request
$request = POST(
'https://demo.your_domain.com:443/rest/Session/logout/', [
params => sprintf(' { "session_id": "%s" } ', $session_id),
]
);
# sending request
$response = $ua->request($request);
368
Porta
Switch
Appendices
parse_and_print_response($response);
#=================================================================
#======================= HELP SUBROUTING =========================
#=================================================================
sub parse_and_print_response {
my $response = shift;
#
#
#
#
#
}
else {
print( STDERR ( Dumper( $response->status_line(), $response>decoded_content() ) ) );
}
return $content_data;
}
strict;
warnings;
SOAP::Lite; # +trace => 'debug';
Data::Dumper;
my $api_hostname = 'HOSTNAME';
my $api_login = 'api-user';
my $api_password = 'xxxxxxxxxxx';
# only for self-signed certificates
my $verify_hostname = 0;
my $soap = SOAP::Lite->new;
$soap->serializer()->xmlschema('http://www.w3.org/2001/XMLSchema');
$soap->proxy("https://$api_hostname/soap/");
$soap->transport->ssl_opts(verify_hostname => $verify_hostname);
# login
369
Porta
Switch
Appendices
$soap->uri("http://$api_hostname/Porta/SOAP/Session");
$soap->ns("http://$api_hostname/Porta/SOAP/Session" => 'ns1');
my $som = $soap->call('login',
SOAP::Data->name('user')->value($api_login),
SOAP::Data->name('password')->value($api_password),
);
if($som->fault) {
print Dumper($som);
exit;
}
my $session_id = $som->result();
printf "Started session %s\n", $session_id;
# get currency list
my $auth_info = SOAP::Data->type('AuthInfoStructure')>value({session_id => $session_id});
my $header = SOAP::Header->name('auth_info')->value($auth_info);
$soap->uri("http://$api_hostname/Porta/SOAP/Currency");
$som = $soap->call('get_currency_list', $header);
my $currency_list = $som->result->{currency_list};
foreach my $currency (@$currency_list) {
printf "%3s - %s - %.5f\n", $currency->{iso_4217}, $currency>{name}, $currency->{base_units};
}
strict;
warnings;
Data::Dumper;
LWP::UserAgent;
JSON;
my $api_hostname = 'HOSTNAME';
my $api_login = 'api-user';
my $api_password = 'xxxxxxxxxxx';
# only for self-signed certificates
my $verify_hostname = 0;
my $api_base = "https://$api_hostname/rest/";
my $ua = LWP::UserAgent->new(ssl_opts => {verify_hostname =>
$verify_hostname});
my %req = ( params => to_json({login => $api_login, password =>
$api_password}) );
my $reply = $ua->post($api_base . 'Session/login', \%req);
die $reply->as_string if(! $reply->is_success);
my $data = from_json($reply->content);
my $session_id = $data->{session_id};
printf "Started session %s\n", $session_id;
# get currency list
%req = (
auth_info => to_json({ session_id => $session_id }),
params => to_json({}),
);
$reply = $ua->post($api_base . 'Currency/get_currency_list', \%req);
die $reply->as_string if(! $reply->is_success);
$data = from_json($reply->content);
my $currency_list = $data->{currency_list};
foreach my $currency (@$currency_list) {
printf "%3s - %s - %.5f\n", $currency->{iso_4217}, $currency>{name}, $currency->{base_units};
}
370
Porta
Switch
Appendices
371
Porta
Switch
Appendices
//CURLOPT_VERBOSE => true,
CURLOPT_URL => $api_url . '/Session/login',
CURLOPT_SSL_VERIFYPEER => $verify_hostname,
CURLOPT_SSL_VERIFYHOST => $verify_hostname,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($post_data),
)
);
$reply = curl_exec($curl);
if(! $reply) {
echo curl_error($curl);
curl_close($curl);
exit;
}
$data = json_decode($reply);
$session_id = $data->{'session_id'};
echo "Started session ", $session_id, "\n";
// fetch available currency
$post_data = array(
'auth_info' => json_encode(array('session_id' => $session_id)),
'params' => json_encode( new stdClass() ),
);
curl_setopt_array($curl,
array(
CURLOPT_URL => $api_url .
'/Currency/get_currency_list',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($post_data),
)
);
$reply = curl_exec($curl);
if(! $reply) {
echo curl_error($curl);
curl_close($curl);
exit;
}
$data = json_decode($reply);
foreach ($data->currency_list as $currency) {
printf("%3s - %s - %.5f\n", $currency->iso_4217, $currency->name,
$currency->base_units);
}
curl_close($curl);
exit;
?>
372
Porta
Switch
Appendices
Type
int
int
string
string
Description
The unique ID of the xDR
The unique ID of the virtual billing
environment
The unique session ID
The session ID specific for the
xDRs service type
373
Porta
Switch
Appendices
CLI (cli)
string
CLD (cld)
string
setup_time
int
connect_time
dateTime
disconnect_time
dateTime
bill_time
disconnect_cause
dateTime
int
voice_quality
int
used_quantity
int
account_id
i_account
string
int
i_dest
int
i_dest_group
int
i_tariff
i_rate
charged_quantity
int
int
int
374
Porta
Switch
Appendices
charged_amount
float
history
string
peak_level
int
i_vendor
int
i_service
i_accessibility
int
int
i_customer
int
h323_incoming_conf_id
(parent_session_id)
string
rating_pattern
string
subscriber_ip
string
split_order
int
billing_model
int
i_invoice
int
revenue
float
375
Porta
Switch
Appendices
Service Feature
name
flag_value
attributes
name
Array of attributes
values
Array of values
name
flag_value
netaccess_static_ip
attributes
name
values
netmask
255.255.255.0
Attribute 1
Array of attributes
name
values
address
192.168.0.1
Attribute 2
376
Porta
Switch
Appendices
"values": [
null
]
},
{
"name": "display_number_check",
"values": [
"N"
]
},
{
"name": "display_name_override",
"values": [
"N"
]
},
{
"name": "account_group",
"values": [
null
]
}
]
},
{
"flag_value": "Y",
"name": "paging",
"attributes": [
{
"name": "paging_prefix",
"values": [
"555223"
]
}
]
},
{
"flag_value": "Y",
"name": "ip_centrex_care"
},
{
"flag_value": "N",
"name": "rtpp_level"
},
{
"flag_value": "N",
"name": "voice_vpn"
},
{
"flag_value": "N",
"name": "favourite_numbers"
},
{
"flag_value": "N",
"name": "call_recording"
},
{
"flag_value": "P",
"name": "clir",
"attributes": [
{
"name": "clir_rule",
"values": [
"s/^jkhbi7\\*3\\*3c/Y/ or s/^\\*77//;"
377
Porta
Switch
Appendices
]
}
]
},
{
},
{
"flag_value": "N",
"name": "cli_trust"
"flag_value": "Y",
"name": "distinctive_ring_vpn"
},
{
"flag_value": "N",
"name": "first_login_greeting"
},
{
},
{
},
{
"flag_value": "Y",
"name": "sim_calls_limit",
"attributes": [
{
"name": "max_calls",
"values": [
"7"
]
},
{
"name": "min_funds_reserve",
"values": [
null
]
}
]
"flag_value": "",
"name": "permitted_sip_proxies",
"attributes": [
{
"name": "proxies",
"values": [
null
]
}
]
"flag_value": "Y",
"name": "group_pickup",
"attributes": [
{
"name": "group_pickup_prefix",
"values": [
"9541"
]
}
]
},
{
"flag_value": "N",
"name": "call_parking",
"attributes": [
{
"name": "park_prefix",
378
Porta
Switch
Appendices
"values": [
null
]
},
{
"name": "release_prefix",
"values": [
null
]
}
]
}
{
"flag_value": "Y/N",
"name": "voice_dialing",
"attributes": [
{
"name": "translate_cli_out",
"values": [Y/N]
},
{
"name": "i_dial_rule",
"values": [i_dialing_rule]
},
{
"name": "translate_cli_in",
"values": [Y/N]
}
]
}
]
379
Porta
Switch
Appendices
{
"name": "account_group",
"values": [
null
]
}
},
{
]
"flag_value": "Y",
"name": "ip_centrex_care"
},
{
"flag_value": "Y",
"name": "session_hotlined",
"attributes": [
{
"name": "hotline_description",
"values": [
null
]
}
]
},
{
"flag_value": "^",
"name": "rtpp_level"
},
{
"flag_value": "N",
"name": "emergency"
},
{
"flag_value": "N",
"name": "netaccess_hotlining"
},
{
"flag_value": "N",
"name": "netaccess_static_ip",
"attributes": [
{
"name": "netmask",
"values": [
null
]
},
{
"name": "address",
"values": [
null
]
}
]
},
{
"flag_value": "Y",
"name": "clip"
},
{
"flag_value": "Y",
"name": "favourite_numbers",
"attributes": [
{
"name": "numbers",
380
Porta
Switch
Appendices
"values": [
"122",
"123",
"124",
"125"
]
]
},
{
"flag_value": "^",
"name": "call_recording"
},
{
"flag_value": "N",
"name": "call_wait_limit"
},
{
},
{
"flag_value": "7",
"name": "default_action"
"flag_value": "^",
"name": "clir",
"attributes": [
{
"name": "clir_rule",
"values": [
null
]
}
]
},
{
"flag_value": "Y",
"name": "call_barring"
},
{
"flag_value": "^",
"name": "cli_trust"
},
{
"flag_value": "Y",
"name": "call_processing"
},
{
"flag_value": "~",
"name": "wifi_speed_limit",
"attributes": [
{
"name": "tx_rate",
"values": [
null
]
},
{
"name": "rx_rate",
"values": [
null
]
}
]
},
{
381
Porta
Switch
Appendices
"flag_value": "^",
"name": "distinctive_ring_vpn"
},
{
"flag_value": "Y",
"name": "netaccess_sessions",
"attributes": [
{
"name": "max_sessions",
"values": [
"1"
]
}
]
},
{
"flag_value": "~",
"name": "netaccess_speed_limit",
"attributes": [
{
"name": "tx_rate",
"values": [
null
]
},
{
"name": "tx_policy",
"values": [
null
]
},
{
"name": "rx_policy",
"values": [
null
]
},
{
"name": "rx_rate",
"values": [
null
]
}
]
},
{
"flag_value": "N",
"name": "conf_enabled",
"attributes": [
{
"name": "max_participants",
"values": [
null
]
}
]
},
{
"flag_value": "Y/N",
"name": "voice_dialing",
"attributes": [
{
"name": "translate_cli_out",
"values": [Y/N]
382
Porta
Switch
Appendices
},
{
"name": "i_dial_rule",
"values": [i_dialing_rule]
},
{
"name": "translate_cli_in",
"values": [Y/N]
}
]
}
]
strict;
warnings;
SOAP::Lite;
Carp;
$FM_REJECT
$FM_RING
$FM_FORWARD
$FM_VOICEMAIL
my %fm_modes = (
$FM_REJECT
$FM_RING
$FM_FORWARD
$FM_VOICEMAIL
);
=
=
=
=
0;
0x1;
0x2;
0x4;
=>
=>
=>
=>
sub fm_decode {
my ($value) = @_;
my @response_set;
for my $fm_mode (sort keys %fm_modes) {
if ($fm_mode & $value) {
push(@response_set, $fm_modes{$fm_mode});
383
Porta
Switch
Appendices
}
}
my $result = join(', ', @response_set);
return $result;
}
sub fm_encode {
my (@values) = @_;
my $result = 0;
for my $value (@values) {
if (! exists $fm_modes{$value}) {
croak "Unknown Follow Me Mode: $value";
}
$result |= $value;
}
return $result;
}
sub fault_handler {
my ($soap, $res) = @_;
my $message = 'Unknown Error';
if (ref ($res)) {
$message = "Remote SOAP Fault: " . $res->faultstring();
}
else {
$message = "Transport Fault: " . $soap->transport->status();
}
croak $message;
}
my $session_srv = SOAP::Lite
->uri($uris{Session})
->proxy($proxy)
->on_fault(\&fault_handler)
;
my $account_srv = SOAP::Lite
->uri($uris{Account})
->proxy($proxy)
->on_fault(\&fault_handler)
;
my $session_id = $session_srv->login($login, $password)->result();
print "Logged in ($login|$session_id)\n";
my $auth_info = SOAP::Header
->name('auth_info')
->value({ session_id => $session_id }
);
my $GetAccountServiceFeaturesRequest = {
i_account => $i_account,
};
# Current settings
my $GetAccountServiceFeaturesResponse
= $account_srv->get_service_features(
$auth_info,
$GetAccountServiceFeaturesRequest,
)->result();
384
Porta
Switch
Appendices
my $service_features = $GetAccountServiceFeaturesResponse>{service_features};
my $sf_default_action;
SERVICE_FEATURE_ITEM:
for my $service_feature (@{$service_features}) {
if ($service_feature->{name} eq 'default_action') {
$sf_default_action = $service_feature;
last SERVICE_FEATURE_ITEM;
}
}
if (! $sf_default_action) {
print "No Default Action set\n";
}
else {
print "Default Action setting: ",
fm_decode($sf_default_action->{flag_value}), "\n";
}
my $UpdateAccountServiceFeaturesRequest = {
i_account => $i_account,
service_features => [
{
name => 'default_action',
flag_value => fm_encode($FM_RING, $FM_FORWARD),
}
]
};
my $UpdateAccountServiceFeaturesResponse
= $account_srv->update_service_features(
$auth_info,
$UpdateAccountServiceFeaturesRequest
)->result();
$GetAccountServiceFeaturesResponse
= $account_srv->get_service_features(
$auth_info,
$GetAccountServiceFeaturesRequest,
)->result();
$service_features = $GetAccountServiceFeaturesResponse>{service_features};
SERVICE_FEATURE_ITEM_2:
for my $service_feature (@{$service_features}) {
if ($service_feature->{name} eq 'default_action') {
print "Default Action settings: ",
fm_decode($service_feature->{flag_value}),
"\n"
;
last SERVICE_FEATURE_ITEM_2;
}
}
exit 0;
sub-period[, sub-period...]
385
Porta
Switch
Appendices
The scale must be one of the nine different options (or their equivalent
codes):
Scale
year
month
Scale
Code
yr
mo
week
yday
mday
wday
hour
minute
second
wk
yd
md
wd
hr
min
sec
v-v
In the range specification v-v, if the second value is larger than the first,
the range wraps around unless the scale specification is year. Year does
not wrap because a year is never really reset, rather it just changes by
increments. Ignoring that fact that led to the dreaded Y2K nightmare,
when a year rolls over from 99 to 00, it has really rolled over one century,
not gone back a century. Time period supports the ambiguous two digit
year notation because it is so widespread. However, two-digit notation is
converted to four digits by prepending the first two digits of the current
year. In the case of 99-1972, the 99 is translated to whatever the current
century is (probably the 20th), and so the range 99-1972 is treated as
1972-1999. For the 21st century, the range would then be 1972-2099.
In any case, if v-v is 9-2, and the scale is month, September,
October, November, December, January, and February are the months
specified by the range (9-2 is the same as Sep-Feb). If v-v is 2-9, then the
valid months are February, March, April, May, Jun, July, August, and
September.
v is not a point in time. For the hour scale, 9 specifies the time
period from 9:00:00 am to 9:59:59 am. This is what most people would
call 9-10. In other words, v is discrete in its time scale. 9 changes to 10
when 9:59:59 changes to 10:00:00, but 9 is the period from 9:00:00 to
9:59:59. Just before 9:00:00, v was 8.
Note that there can be a white space anywhere, and case is
unimportant. Note also that scales must be specified either in long form
386
Porta
Switch
Appendices
(year, month, week, etc.) or in code form (yr, mo, wk, etc.). Scale forms in
a period statement may be mixed.
Furthermore, when using letters to specify ranges, only the first two
(for weekdays) or the first three (for months) are significant. January is a
valid specification for Jan, and Sunday is a valid specification for su. Sun is
also valid for su.
PERIOD EXAMPLES:
To specify a time period from Monday through Friday, 9am to 5pm,
use the following period:
wd {Mon-Fri} hr {9am-4pm}
When specifying a range using -, it is best to think of - as
meaning through, i.e. 9am through 4pm, which is the time interval
ending just before 5pm. To specify a time period from 9am to 5pm on
Monday, Wednesday, and Friday and from 9am to 3pm on Tuesday and
Thursday, use the following period:
wd {Mon Wed Fri} hr {9am-4pm}, wd{Tue Thu} hr {9am-2pm}
To specify a time period that extends from Monday to Friday, 9am to
5pm, but alternates the weeks in a month, use the following period:
wk {1 3 5} wd {Mon Wed Fri} hr {9am-4pm}
For a period that specifies the winter:
mo {Nov-Feb}
The next example is equivalent to the previous one:
mo {Jan-Feb Nov-Dec}
as is:
mo {jan feb nov dec}
or also:
mo {Jan Feb}, mo {Nov Dec}
and this, too:
mo {Jan Feb} mo {Nov Dec}
To specify a period of every other half-hour, use something like this:
minute {0-29}
To specify the morning, use this:
hour {12am-11am}
Remember that 11am is not 11:00:00am, but rather 11:00:00am 11:59:59am.
5-second blocks could be a fun period to specify:
sec {0-4 10-14 20-24 30-34 40-44 50-54}
To specify every first half-hour on alternating weekdays, and the
second half-hour during the rest of the week, use the following period:
wd {1 3 5 7} min {0-29}, wd {2 4 6} min {30-59}
387
Porta
Switch
Appendices
388
Porta
Switch
Appendices
use SOAP::Lite;
use MIME::Entity;
use Data::Dumper;
# If the server certificate is not trusted (e.g. it was not issued by a
# trusted certificate authority), then ignore it.
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
##### Preparing #######################################################
my $soap_sess = SOAP::Lite
-> uri('https://localhost/UM/SOAP/Session')
-> proxy('https://pum-host:8443/soap.fcgi')
-> on_fault( sub {
my($soap, $res) = @_;
print ("SOAP error:". (ref $res ? $res->faultstring : $soap>transport->status . "/" . $res));
});
my $soap_test = SOAP::Lite
-> uri('https://localhost/UM/SOAP/Voicemail')
-> proxy('https://pum-host:8443/soap.fcgi')
-> on_fault( sub {
my($soap, $res) = @_;
print ("SOAP error:". (ref $res ? $res->faultstring : $soap>transport->status . "/" . $res));
});
my $soap_dial_dir = SOAP::Lite
-> uri('https://localhost/UM/SOAP/DialDirectory')
-> proxy('https://pum-host:8443/soap.fcgi')
-> on_fault( sub {
my($soap, $res) = @_;
print ("SOAP error:". (ref $res ? $res->faultstring : $soap>transport->status . "/" . $res));
});
my $soap_aa = SOAP::Lite
-> uri('https://localhost/UM/SOAP/AutoAttendant')
-> proxy('https://pum-host:8443/soap.fcgi')
-> on_fault( sub {
my($soap, $res) = @_;
print ("SOAP error:". (ref $res ? $res->faultstring : $soap>transport->status . "/" . $res));
});
my $authInfo = $soap_sess->login({
'login'
=> '88881',
'domain'
=> 'pum.somedomain.com',
'password' => 'test123'})->result();
$authInfo = SOAP::Header->name( 'auth_info' => {
'session_id' => $authInfo->{'session_id'}
});
my $authInfo_nosess = SOAP::Header->name( 'auth_info' => {
'login'
=> '88881',
'domain'
=> 'pum.somedomain.com',
'password' => 'test123'
});
#######################################################################
my $res;
#example of accessing SOAP module without establishing session
$res = $soap_test->get_vm_settings($authInfo_nosess)->result();
print Dumper($res);
$res = $soap_test->set_vm_settings($authInfo,
{'vm_settings' =>
{
'password' => '777',
'ext_email' => 'sergey.pavlov@gmail.com',
'auto_play' => 'no',
389
Porta
Switch
Appendices
'announce_dt'=> 'no'
} })->result();
print "set_vm_settings done\n";
my $ent = MIME::Entity->build(
'Filename'
=> 'wellcome.au',
'Type' => 'audio/basic',
'Encoding' => 'base64',
'Path'
=> '/home/portaum/apache/prompts/en/personal_ivr/frw_select_order.au',
);
my @parts = ($ent);
$res = $soap_test->parts([ $ent ])->set_vm_greeting($authInfo,
{'greeting_info' =>
{
'greeting_type' => 'name',
'filename'=> 'wellcome.au'
} })->result();
print "set_vm_greeting done\n";
$res = $soap_test->get_vm_greeting($authInfo,
{
'greeting_type' => 'name',
})->result();
print "get_vm_greeting done\n";
######## Dial Directory ############################
$res = $soap_dial_dir->get_dir_info($authInfo)->result();
print "get_directory_list done\n";
print Dumper($res);
$res = $soap_dial_dir->parts(@parts)->create_dir_entry($authInfo,
{
'dir_entry_info' => {
'active'
=> 'Y',
'abbreviated_number'=> '1787896',
'number_to_dial'
=> '111111',
'lastname'
=> 'LName',
'description'
=> 'desc foo',
'prompt'
=> 'wellcome.au'
}
} )->result();
print "create_dir_entry done\n";
print Dumper($res);
my $i_entry = $res->{'i_entry'};
$res = $soap_dial_dir->parts(@parts)->update_dir_entry($authInfo,
{
'dir_entry_info' => {
'i_entry'
=> $i_entry,
'active'
=> 'Y',
'abbreviated_number'=> '99',
'number_to_dial'
=> '565656',
'lastname'
=> 'LastName',
'description'
=> 'desc333',
'prompt'
=> 'wellcome.au'
}
} )->result();
print "update_dir_entry done\n";
$res = $soap_dial_dir->get_dir_entry($authInfo, {'i_entry' => $i_entry}
)->result();
print "get_dir_entry done\n";
print Dumper($res);
$res = $soap_dial_dir->del_dir_entry($authInfo,
{'i_entry' => $res->{'dir_entry_info'}->{'i_entry'}})->result();
print "del_dir_entry done\n";
print Dumper($res);
######## Auto Attendant ############################
390
Porta
Switch
Appendices
$res = $soap_aa->get_menu_list($authInfo)->result();
if (!$res) {
print "get_menu_list failed\n";
}
print "get_menu_list done\n";
print Dumper($res);
my $root_i_menu;
foreach my $menu (@{$res->{'menu_list'}}) {
if ($menu->{'name'} eq 'ROOT') {
$root_i_menu = $menu->{'i_menu'};
last;
}
}
$res = $soap_aa->parts(@parts)->set_menu_prompt($authInfo,
{
'i_menu'
=> $root_i_menu,
'prompt_type'
=> 'intro',
'prompt'
=> 'wellcome.au'
})->result();
print "set_menu_prompt done\n";
print Dumper($res);
$res = $soap_aa->set_menu_transition($authInfo,
{
'transition_info' => {
'i_menu'
=> $root_i_menu,
'event'
=> '0',
'action'
=> 'Transfer',
'destination'=> '5555',
}
})->result();
print "set_menu_transition done\n";
print Dumper($res);
$res = $soap_aa->get_menu_transition_list($authInfo,
{
'i_menu'
=> $root_i_menu,
})->result();
print "get_menu_transition_list done\n";
print Dumper($res);
$res = $soap_aa->get_menu_prompt($authInfo,
{
'i_menu'
=> $root_i_menu,
'prompt_type'
=> 'intro',
})->result();
print "get_menu_prompt done\n";
print Dumper($res);
$res = $soap_aa->create_menu($authInfo,
{ 'menu_info' => {
'name'
=> 'AABBBCCC',
'period'
=> 'hr{0-11}',
'period_desc'
=> 'Some period',
'msg_timeout_type' => 'standard'
}
})->result();
print "create_menu done\n";
print Dumper($res);
my $new_i_menu=$res->{'i_menu'};
$res = $soap_aa->update_menu($authInfo,
{ 'menu_info' => {
'i_menu'
=> $new_i_menu,
'name'
=> 'DDDEEFF',
'period'
=> 'hr{0-2}',
'period_desc'
=> 'New period',
}
})->result();
print "update_menu done\n";
print Dumper($res);
391
Porta
Switch
Appendices
$res = $soap_aa->get_menu_list($authInfo)->result();
print "get_menu_list done\n";
print Dumper($res);
$res = $soap_aa->del_menu($authInfo,
{ 'i_menu' => $new_i_menu })->result();
print "del_menu done\n";
print Dumper($res);
$res = $soap_sess->logout($authInfo)->result();
print "logout done\n";
print Dumper($res);
392