├── tests ├── __init__.py └── tests.py ├── voipms ├── __init__.py ├── base │ ├── __init__.py │ ├── values.py │ └── exceptions.py └── api │ ├── general │ ├── ip.py │ ├── balance.py │ ├── countries.py │ ├── languages.py │ ├── transaction_history.py │ └── __init__.py │ ├── call_detail_records │ ├── rates.py │ ├── records.py │ ├── billing.py │ ├── termination_rates.py │ └── __init__.py │ ├── accounts │ ├── registration_status.py │ ├── subaccount.py │ └── __init__.py │ ├── dids │ ├── search.py │ ├── sms.py │ └── __init__.py │ ├── voicemail │ ├── messages.py │ └── __init__.py │ └── __init__.py ├── setup.cfg ├── .gitignore ├── README.md ├── LICENSE ├── .github └── workflows │ └── pythonpackage.yml └── setup.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /voipms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /voipms/base/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md -------------------------------------------------------------------------------- /voipms/api/general/ip.py: -------------------------------------------------------------------------------- 1 | class IP(): 2 | def __init__(self, base): 3 | self.method = "getIP" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/call_detail_records/rates.py: -------------------------------------------------------------------------------- 1 | class Rates(): 2 | def __init__(self, base): 3 | self.method = "getRates" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/call_detail_records/records.py: -------------------------------------------------------------------------------- 1 | class Records(): 2 | def __init__(self, base): 3 | self.method = "getCDR" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/general/balance.py: -------------------------------------------------------------------------------- 1 | class Balance(): 2 | def __init__(self, base): 3 | self.method = "getBalance" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/general/countries.py: -------------------------------------------------------------------------------- 1 | class Countries(): 2 | def __init__(self, base): 3 | self.method = "getCountries" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/general/languages.py: -------------------------------------------------------------------------------- 1 | class Languages(): 2 | def __init__(self, base): 3 | self.method = "getLanguages" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/call_detail_records/billing.py: -------------------------------------------------------------------------------- 1 | class Billing(): 2 | def __init__(self, base): 3 | self.method = "getCallBilling" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/accounts/registration_status.py: -------------------------------------------------------------------------------- 1 | class RegistrationStatus(): 2 | def __init__(self, base): 3 | self.method = "getRegistrationStatus" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/general/transaction_history.py: -------------------------------------------------------------------------------- 1 | class TransactionHistory(): 2 | def __init__(self, base): 3 | self.method = "getTransactionHistory" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/api/call_detail_records/termination_rates.py: -------------------------------------------------------------------------------- 1 | class TerminationRates(): 2 | def __init__(self, base): 3 | self.method = "getTerminationRates" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | return self.base.request(self.method, params=params) 8 | -------------------------------------------------------------------------------- /voipms/base/values.py: -------------------------------------------------------------------------------- 1 | unset = object() 2 | 3 | 4 | def of(d): 5 | """ 6 | Remove unset values from a dict. 7 | 8 | :param dict d: A dict to strip. 9 | :return dict: A dict with unset values removed. 10 | """ 11 | return {k: v for k, v in d.items() if v != unset} 12 | -------------------------------------------------------------------------------- /voipms/api/dids/search.py: -------------------------------------------------------------------------------- 1 | class Search(): 2 | def __init__(self, base): 3 | self.method = "" 4 | self.base = base 5 | 6 | def canada(self, params={}): 7 | self.method = "searchDIDsCAN" 8 | return self.base.request(self.method, params=params) 9 | 10 | def usa(self, params={}): 11 | self.method = "searchDIDsUSA" 12 | return self.base.request(self.method, params=params) 13 | -------------------------------------------------------------------------------- /voipms/api/voicemail/messages.py: -------------------------------------------------------------------------------- 1 | class Messages(): 2 | def __init__(self, base): 3 | self.method = "" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | self.method = "getVoicemailMessages" 8 | return self.base.request(self.method, params=params) 9 | 10 | def delete(self, params={}): 11 | self.method = "delMessages" 12 | return self.base.request(self.method, params=params) 13 | -------------------------------------------------------------------------------- /voipms/api/dids/sms.py: -------------------------------------------------------------------------------- 1 | class SMS(): 2 | def __init__(self, base): 3 | self.method = "" 4 | self.base = base 5 | 6 | def fetch(self, params={}): 7 | self.method = "getSMS" 8 | return self.base.request(self.method, params=params) 9 | 10 | def create(self, params={}): 11 | self.method = "sendSMS" 12 | return self.base.request(self.method, params=params) 13 | 14 | def set(self, params={}): 15 | self.method = "setSMS" 16 | return self.base.request(self.method, params={}) 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.pyc 6 | *.swp 7 | 8 | # Installer logs 9 | pip-log.txt 10 | 11 | # Distribution / packaging 12 | dist 13 | build 14 | eggs 15 | parts 16 | bin 17 | develop-eggs 18 | .installed.cfg 19 | scratch 20 | env 21 | venv* 22 | wheels 23 | lib 24 | lib64 25 | share 26 | pyvenv.cfg 27 | *.egg-info 28 | man 29 | include 30 | credentials.py 31 | 32 | # Unit test / coverage reports 33 | .coverage 34 | .pytest_cache/ 35 | .tox 36 | 37 | .DS_Store 38 | 39 | #htmlcov 40 | htmlcov* 41 | 42 | # pyenv 43 | .python-version 44 | 45 | # Visual Studio Code 46 | .vscode/ 47 | 48 | # Development 49 | templates/ -------------------------------------------------------------------------------- /voipms/api/accounts/subaccount.py: -------------------------------------------------------------------------------- 1 | class Subaccount(): 2 | def __init__(self, base): 3 | self.method = "" 4 | self.base = base 5 | 6 | def create(self, params={}): 7 | self.method = "createSubAccount" 8 | return self.base.request(self.method, params=params) 9 | 10 | def delete(self, params={}): 11 | self.method = "delSubAccount" 12 | return self.base.request(self.method, params=params) 13 | 14 | def fetch(self, params={}): 15 | self.method = "getSubAccounts" 16 | return self.base.request(self.method, params=params) 17 | 18 | def set(self, params={}): 19 | self.method = "setSubAccount" 20 | return self.base.request(self.method, params=params) 21 | -------------------------------------------------------------------------------- /voipms/api/accounts/__init__.py: -------------------------------------------------------------------------------- 1 | from voipms.api.accounts.subaccount import Subaccount 2 | from voipms.api.accounts.registration_status import RegistrationStatus 3 | 4 | 5 | class Accounts(): 6 | def __init__(self, base): 7 | self._subaccount = None 8 | self._registration_status = None 9 | 10 | self.base = base 11 | 12 | @property 13 | def subaccount(self): 14 | if self._subaccount is None: 15 | self._subaccount = Subaccount(self.base) 16 | return self._subaccount 17 | 18 | @property 19 | def registration_status(self): 20 | if self._registration_status is None: 21 | self._registration_status = RegistrationStatus(self.base) 22 | return self._registration_status 23 | -------------------------------------------------------------------------------- /tests/tests.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from __future__ import print_function 3 | from unittest.mock import patch 4 | from voipms.api import Client 5 | from unittest.mock import MagicMock 6 | 7 | import credentials 8 | 9 | 10 | def test_instantiation(): 11 | username = credentials.username 12 | password = credentials.password 13 | 14 | client = Client(username, password) 15 | return client 16 | 17 | 18 | @patch('voipms.api.general.balance') 19 | def test_make_get_request(mock_requests): 20 | mock_response_obj = MagicMock() 21 | mock_response_obj.json = {"test": "test"} 22 | mock_response_obj.status_code = 200 23 | mock_requests.get.return_value = mock_response_obj 24 | 25 | username = credentials.username 26 | password = credentials.password 27 | 28 | client = Client(username, password) 29 | 30 | res = client.registration_status.fetch() 31 | assert res == {"test": "test"} 32 | -------------------------------------------------------------------------------- /voipms/api/voicemail/__init__.py: -------------------------------------------------------------------------------- 1 | from voipms.api.voicemail.messages import Messages 2 | 3 | 4 | class Voicemail(): 5 | def __init__(self, base): 6 | self._messages = None 7 | self.base = base 8 | 9 | @property 10 | def messages(self): 11 | if self._messages is None: 12 | self._messages = Messages(self.base) 13 | return self._messages 14 | 15 | def create(self, params={}): 16 | self.method = "createVoicemail" 17 | return self.base.request(self.method, params=params) 18 | 19 | def delete(self, params={}): 20 | self.method = "delVoicemail" 21 | return self.base.request(self.method, params=params) 22 | 23 | def fetch(self, params={}): 24 | self.method = "getVoicemails" 25 | return self.base.request(self.method, params=params) 26 | 27 | def set(self, params={}): 28 | self.method = "setVoicemail" 29 | return self.base.request(self.method, params=params) 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # voipms-python 2 | 3 | A python-based API wrapper for [voip.ms](https://voip.ms/). 4 | 5 | ## Installation 6 | 7 | You can install this package from PyPi using [pip](http://www.pip-installer.org/en/latest/), a package manager for Python. Once pip is installed, run 8 | 9 | ```sh 10 | pip install --upgrade voipms-python 11 | ``` 12 | 13 | You can also install from source with: 14 | 15 | ```sh 16 | python setup.py install 17 | ``` 18 | 19 | ### Requirements 20 | 21 | - Python 3.4+ 22 | 23 | ## Usage 24 | 25 | The library needs to be configured with your account's email and API password, the latter of which can be created [here](https://voip.ms/m/api.php). Once that's been done, create a Client object as shown below: 26 | 27 | ```python 28 | from voipms.api import Client 29 | 30 | email = "test@email.com" 31 | api_password = "01N0sWTdiutWTHNF" 32 | 33 | client = Client(email, api_password) 34 | 35 | # get current account balance 36 | balance = client.balance.fetch() 37 | ``` 38 | -------------------------------------------------------------------------------- /voipms/api/dids/__init__.py: -------------------------------------------------------------------------------- 1 | from voipms.api.dids.search import Search 2 | from voipms.api.dids.sms import SMS 3 | 4 | 5 | class DIDs(): 6 | def __init__(self, base): 7 | self._search = None 8 | self._sms = None 9 | 10 | self.base = base 11 | 12 | @property 13 | def search(self): 14 | if self._search is None: 15 | self._search = Search(self.base) 16 | return self._search 17 | 18 | @property 19 | def sms(self): 20 | if self._sms is None: 21 | self._sms = SMS(self.base) 22 | return self._sms 23 | 24 | def cancel(self, params={}): 25 | self.method = "cancelDID" 26 | return self.base.request(self.method, params=params) 27 | 28 | def order(self, params={}): 29 | self.method = "orderDID" 30 | return self.base.request(self.method, params=params) 31 | 32 | def fetch(self, params={}): 33 | self.method = "getDIDsInfo" 34 | return self.base.request(self.method, params=params) 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 DANIEL TESFAI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /voipms/api/call_detail_records/__init__.py: -------------------------------------------------------------------------------- 1 | from voipms.api.call_detail_records.billing import Billing 2 | from voipms.api.call_detail_records.records import Records 3 | from voipms.api.call_detail_records.rates import Rates 4 | from voipms.api.call_detail_records.termination_rates import TerminationRates 5 | 6 | 7 | class CallDetailRecords(): 8 | def __init__(self, base): 9 | self.base = base 10 | self._billing = None 11 | self._records = None 12 | self._rates = None 13 | self._termination_rates = None 14 | 15 | @property 16 | def billing(self): 17 | if self._billing is None: 18 | self._billing = Billing(self.base) 19 | return self._billing 20 | 21 | @property 22 | def records(self): 23 | if self._records is None: 24 | self._records = Records(self.base) 25 | return self._records 26 | 27 | @property 28 | def rates(self): 29 | if self._rates is None: 30 | self._rates = Rates(self.base) 31 | return self._rates 32 | 33 | @property 34 | def termination_rates(self): 35 | if self._termination_rates is None: 36 | self._termination_rates = TerminationRates(self.base) 37 | return self._termination_rates 38 | -------------------------------------------------------------------------------- /.github/workflows/pythonpackage.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a variety of Python versions 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions 3 | 4 | name: Python package 5 | 6 | on: 7 | push: 8 | branches: [ master ] 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | strategy: 17 | matrix: 18 | python-version: [3.5, 3.6, 3.7, 3.8] 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | - name: Set up Python ${{ matrix.python-version }} 23 | uses: actions/setup-python@v1 24 | with: 25 | python-version: ${{ matrix.python-version }} 26 | - name: Install dependencies 27 | run: | 28 | python -m pip install --upgrade pip 29 | - name: Lint with flake8 30 | run: | 31 | pip install flake8 32 | # stop the build if there are Python syntax errors or undefined names 33 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 34 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 35 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 36 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setup( 7 | name="voipms-python", 8 | version="0.0.2", 9 | description="Python wrapper for the voip.ms REST API", 10 | long_description=long_description, 11 | long_description_content_type="text/markdown", 12 | author="Daniel Tesfai", 13 | author_email="danielmtesfai@gmail.com", 14 | url="https://github.com/dtesfai/voipms-python", 15 | license="MIT", 16 | keywords="voipms api", 17 | packages=find_packages(exclude=["tests", "tests.*"]), 18 | python_requires=">=3.4", 19 | project_urls={ 20 | "Bug Tracker": "https://github.com/dtesfai/voipms-python/issues", 21 | "Source Code": "https://github.com/dtesfai/voipms-python", 22 | }, 23 | classifiers=[ 24 | "Development Status :: 2 - Pre-Alpha", 25 | "Intended Audience :: Developers", 26 | "License :: OSI Approved :: MIT License", 27 | "Operating System :: OS Independent", 28 | "Programming Language :: Python :: 3", 29 | "Programming Language :: Python :: 3.4", 30 | "Programming Language :: Python :: 3.5", 31 | "Programming Language :: Python :: 3.6", 32 | "Programming Language :: Python :: 3.7", 33 | "Programming Language :: Python :: Implementation :: PyPy", 34 | "Topic :: Software Development :: Libraries :: Python Modules", 35 | ], 36 | ) 37 | -------------------------------------------------------------------------------- /voipms/api/general/__init__.py: -------------------------------------------------------------------------------- 1 | from voipms.api.general.balance import Balance 2 | from voipms.api.general.ip import IP 3 | from voipms.api.general.transaction_history import TransactionHistory 4 | from voipms.api.general.countries import Countries 5 | from voipms.api.general.languages import Languages 6 | 7 | 8 | class General(): 9 | def __init__(self, base): 10 | self._balance = None 11 | self._ip = None 12 | self._transaction_history = None 13 | self._countries = None 14 | self._languages = None 15 | 16 | self.base = base 17 | 18 | @property 19 | def balance(self): 20 | if self._balance is None: 21 | self._balance = Balance(self.base) 22 | return self._balance 23 | 24 | @property 25 | def ip(self): 26 | if self._ip is None: 27 | self._ip = IP(self.base) 28 | return self._ip 29 | 30 | @property 31 | def transaction_history(self): 32 | if self._transaction_history is None: 33 | self._transaction_history = TransactionHistory(self.base) 34 | return self._transaction_history 35 | 36 | @property 37 | def countries(self): 38 | if self._countries is None: 39 | self._countries = Countries(self.base) 40 | return self._countries 41 | 42 | @property 43 | def languages(self): 44 | if self._languages is None: 45 | self._languages = Languages(self.base) 46 | return self._languages 47 | -------------------------------------------------------------------------------- /voipms/api/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import requests 4 | 5 | from voipms.base.exceptions import VoipException 6 | 7 | 8 | class Client(object): 9 | def __init__(self, username=None, password=None): 10 | self.username = username or os.environ.get('VOIPMS_ACCOUNT_USER') 11 | self.password = password or os.environ.get('VOIPMS_API_TOKEN') 12 | self.api_base = "https://voip.ms/api/v1/rest.php" 13 | 14 | if not self.username or not self.password: 15 | raise VoipException("Credentials are required to create a Client") 16 | 17 | self.auth = (self.username, self.password) 18 | 19 | self._accounts = None 20 | self._call_detail_records = None 21 | self._dids = None 22 | self._general = None 23 | self._voicemail = None 24 | 25 | def request(self, method, auth=None, params={}): 26 | auth = auth or self.auth 27 | 28 | params["api_username"] = auth[0] 29 | params["api_password"] = auth[1] 30 | params["method"] = method 31 | params["content_type"] = "json" 32 | 33 | response = requests.get(self.api_base, params=params) 34 | data = json.loads(response.text) 35 | 36 | if data['status'] and data['status'] != 'success': 37 | err_code = data['status'] 38 | raise VoipException(err_code) 39 | 40 | return data 41 | 42 | @property 43 | def accounts(self): 44 | if self._accounts is None: 45 | from voipms.api.accounts import Accounts 46 | self._accounts = Accounts(self) 47 | return self._accounts 48 | 49 | @property 50 | def call_detail_records(self): 51 | if self._call_detail_records is None: 52 | from voipms.api.call_detail_records import CallDetailRecords 53 | self._call_detail_records = CallDetailRecords(self) 54 | return self._call_detail_records 55 | 56 | @property 57 | def dids(self): 58 | if self._dids is None: 59 | from voipms.api.dids import DIDs 60 | self._dids = DIDs(self) 61 | return self._dids 62 | 63 | @property 64 | def general(self): 65 | if self._general is None: 66 | from voipms.api.general import General 67 | self._general = General(self) 68 | return self._general 69 | 70 | @property 71 | def voicemail(self): 72 | if self._voicemail is None: 73 | from voipms.api.voicemail import Voicemail 74 | self._voicemail = Voicemail(self) 75 | return self._voicemail 76 | 77 | @property 78 | def balance(self): 79 | return self.general.balance 80 | 81 | @property 82 | def ip(self): 83 | return self.general.ip 84 | 85 | @property 86 | def transaction_history(self): 87 | return self.general.transaction_history 88 | 89 | @property 90 | def countries(self): 91 | return self.general.countries 92 | 93 | @property 94 | def languages(self): 95 | return self.general.languages 96 | 97 | @property 98 | def subaccount(self): 99 | return self.accounts.subaccount 100 | 101 | @property 102 | def registration_status(self): 103 | return self.accounts.registration_status 104 | 105 | @property 106 | def billing(self): 107 | return self.call_detail_records.billing 108 | 109 | @property 110 | def records(self): 111 | return self.call_detail_records.records 112 | 113 | @property 114 | def rates(self): 115 | return self.call_detail_records.rates 116 | 117 | @property 118 | def termination_rates(self): 119 | return self.call_detail_records.termination_rates 120 | 121 | @property 122 | def search(self): 123 | return self.dids.search 124 | 125 | @property 126 | def sms(self): 127 | return self.dids.sms 128 | 129 | @property 130 | def messages(self): 131 | return self.voicemail.messages 132 | -------------------------------------------------------------------------------- /voipms/base/exceptions.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, print_function 2 | 3 | 4 | class VoipException(Exception): 5 | def __init__(self, err_code=""): 6 | self.err_code = err_code 7 | 8 | def __str__(self): 9 | err_code_map = { 10 | 'account_with_dids': 'The Account has DIDs assigned to it.', 11 | 'api_not_enabled': 'API has not been enabled or has been disabled', 12 | 'api_limit_exceeded': 'API requests limit per minute has been reached', 13 | 'cancel_failed': "The cancellation wasn't completed.", 14 | 'can_have_only_one_profile_without_pin': 'The conference can just have one profile member without pin', 15 | 'conference_member_relation_not_found': 'There is no relation between the profile member and the conference.', 16 | 'did_in_use': 'DID Number is already in use', 17 | 'duplicated_pin': 'The given pin has been duplicated', 18 | 'error_deleting_msg': 'Error when deleting message', 19 | 'error_moving_msg': 'Error when move the voicemail message to folder', 20 | 'existing_did': "You can't set a callback to an existing VoIP.ms DID number", 21 | 'exceeds_file_size': 'The file exceeds the limite size allowed.', 22 | 'forwards_exceeded': 'Your account is limited to 4 forward entries', 23 | 'invalid_account': 'This is not a valid account', 24 | 'invalid_address': 'Address is missing or the format is invalid.', 25 | 'invalid_admin': 'This is not a valid admin', 26 | 'invalid_agent_ring_timeout': 'This is not a valid Agent ring time out value', 27 | 'invalid_allowedcodecs': 'One of the codecs provided is invalidFormat and Values: ulaw;g729;gsm;all', 28 | 'invalid_attachid': "The given ID is invalid or doesn't exist.", 29 | 'invalid_announce_join_leave': 'This is not a valid "Announce join leave"', 30 | 'invalid_announce_only_user': 'This is not a valid "Announce only user"', 31 | 'invalid_announce_position_frequency': 'This is not a valid Announce position frequency', 32 | 'invalid_announce_round_seconds': 'This is not a valid "Announce round seconds"', 33 | 'invalid_announce_user_count': 'This is not a valid "Announce user count"', 34 | 'invalid_attachmessage': 'this is not a valid AttachMessageShould be: yes/no', 35 | 'invalid_area_code': 'this is not a valid Area Code.', 36 | 'invalid_authtype': 'This is not a valid Auth Type', 37 | 'invalid_authtype_h323': 'You must select IP Auth to use H.323', 38 | 'invalid_authtype_iax2': 'You must use User/Password Authentication for IAX2', 39 | 'invalid_balancemanagement': 'This is not a valid BalanceManagement', 40 | 'invalid_base_recording': 'This is not a valid recording path', 41 | 'invalid_billingtype': 'This is not a valid Billing Type Allowed values: 1 = PerMinute, 2 = Flat', 42 | 'invalid_callback': 'This is not a valid Callback', 43 | 'invalid_callback_enable': 'This is not a valid Callback enable value', 44 | 'invalid_callback_retry': 'This is not a valid Callback retry', 45 | 'invalid_callerid': 'This is not a valid CallerID', 46 | 'invalid_calleridprefix': 'This is not a valid CID Prefix, lenght should be less than 20 chars', 47 | 'invalid_callerid_override': 'This is not a valid CallerID Override', 48 | 'invalid_callhunting': 'This is not a valid Call Hunting', 49 | 'invalid_canada_routing': 'This is not a valid Canada Route', 50 | 'invalid_carrier': 'This is not a valid Carrier', 51 | 'invalid_charge': 'This is not a valid Charge', 52 | 'invalid_client': 'This is not a valid Client', 53 | 'invalid_cnam': 'This is not a valid CNAMShould be: 1/0', 54 | 'invalid_codec': 'This is not a valid Codec', 55 | 'invalid_contact': 'This is not a valid Contact Number', 56 | 'invalid_conference': 'This is not a valid Conference ID', 57 | 'invalid_countryid': 'This is not a valid Country ID', 58 | 'invalid_city': 'City is missing or the format is invalid.', 59 | 'invalid_country': ( 60 | 'Country is missing or the format is invalid, must be in format ISO 3166-1 alpha-2, ' 61 | 'example: US, CA, etc. (You can use the values returned by the method getCountries)' 62 | ), 63 | 'invalid_credentials': 'Username or Password is incorrect', 64 | 'invalid_date': 'This is not a valid dateFormat is: yyyy-mm-dd', 65 | 'invalid_datetime': 'This is not a valid datetimeFormat is: yyyy-mm-dd hh:mm:ss', 66 | 'invalid_daterange': 'Date Range should be 92 days or less', 67 | 'invalid_dayrange': 'This is not a valid Day Range', 68 | 'invalid_delay_before': 'This is not a valid DelayBefore', 69 | 'invalid_deletemessage': 'This is not a valid DeleteMessageShould be: yes/no', 70 | 'invalid_description': 'This is not a valid Description', 71 | 'invalid_devicetype': 'This is not a valid Device Type', 72 | 'invalid_dialtime': 'This is not a valid Dialtime', 73 | 'invalid_did': 'This is not a valid DID', 74 | 'invalid_digits': 'These are not valid Digits OrderDIDVirtual: Digits must be 3 numbers ', 75 | 'invalid_digit_timeout': 'This is not a valid DigitTimeOut', 76 | 'invalid_disa': 'This is not a valid DISA', 77 | 'invalid_destination_folder': 'This is not a valid Destination Folder', 78 | 'invalid_drop_silence': 'This is not a valid "drop silence" value', 79 | 'invalid_dst': 'This is not a valid Destination Number', 80 | 'invalid_dtmf_digits': 'This is no a valid DTMF digit', 81 | 'invalid_dtmfmode': 'This is no a valid DTMF Mode', 82 | 'invalid_email': 'This is not a valid email or email is already in database', 83 | 'invalid_email_attachment_format': 'This is not a valid format value', 84 | 'invalid_email_enable': 'This is not a valid email enable value', 85 | 'invalid_endhour': 'This is not a valid End Hour', 86 | 'invalid_endminute': 'This is not a valid End Minute', 87 | 'invalid_extension': 'This is not a valid extensionExtension can only contain digits', 88 | 'invalid_failover_header': 'This is not a valid failover headerShould be: account/vm/fwd/none', 89 | 'invalid_fax_id': 'This is not a valid Fax Message ID', 90 | 'invalid_file': 'This is not a valid File', 91 | 'invalid_filter': 'This is not a valid Filter', 92 | 'invalid_folder': 'This is not a valid Folder', 93 | 'invalid_folder_id': 'This is not a valid Fax Folder ID', 94 | 'invalid_forward_enable': 'This is not a valid forward enable value', 95 | 'invalid_forwarding': 'This is not a valid forwarding', 96 | 'invalid_forwarding_did': 'Forwarding to the same did is not allowed', 97 | 'invalid_frequency_announcement': 'This is not a valid Frequency announce', 98 | 'invalid_from_number': 'This is not a valid sender number.', 99 | 'invalid_attach_file': 'Valid formats: PDF, MS Word, BMP, JPG', 100 | 'invalid_firstname': 'First name is missing or the format is invalid.', 101 | 'invalid_foc_startdate': 'Invalid date format, must be: YYYY-mm-dd. Example: 2018-02-22', 102 | 'invalid_foc_enddate': 'Invalid date format, must be: YYYY-mm-dd. Example: 2018-02-22', 103 | 'invalid_id': 'This is not a valid ID', 104 | 'invalid_if_announce_position_enabled_report_estimated_hold_time': 'This is not a Report estimated hold time type', 105 | 'invalid_internaldialtime': 'This is not a valid Internal DialtimeShould be: 1 to 60', 106 | 'invalid_internalvoicemail': 'This is not a valid Internal Voicemail', 107 | 'invalid_internationalroute': 'This is not a valid International Route', 108 | 'invalid_ip': 'This is an invalid IP', 109 | 'invalid_ip_auth': 'Do not provide an IP address for User/Pass Authentication', 110 | 'invalid_ip_iax2': 'Do not provide an IP address for IAX2', 111 | 'invalid_ivr': 'This is not a valid IVR', 112 | 'invalid_jitter_buffer': 'This is not a valid "jitter buffer" value', 113 | 'invalid_join_empty_type': "This is not a valid 'JoinWhenEmpty' Type for a Queue", 114 | 'invalid_join_announcement': "This is not a valid 'Join Announcement' Type for a Queue", 115 | 'invalid_language': 'This is not a valid LanguageShould be: es/en/fr', 116 | 'invalid_lastname': 'Lastname is missing or the format is invalid.', 117 | 'invalid_listened': 'This is not a valid Listened value', 118 | 'invalid_location': 'This is not a valid Location', 119 | 'invalid_lockinternational': 'This is not a valid Lock International', 120 | 'invalid_mailbox': 'This is not a valid mailbox', 121 | 'invalid_maximum_callers': 'This is not a valid maximum callers value', 122 | 'invalid_maximum_wait_time': 'This is not a valid maximum wait time value', 123 | 'invalid_method': 'This is not a valid Method', 124 | 'invalid_member': 'This is not a valid Member', 125 | 'invalid_member_delay': 'This is not a valid Member Delay', 126 | 'invalid_message_num': 'This is not a valid Voicemail Message Number', 127 | 'invalid_minute': 'This is not a valid Minute Rate', 128 | 'invalid_mixed_numbers': 'Toll-free numbers and local numbers can not be mixed in the same order.', 129 | 'invalid_monthly': 'This is not a valid Montly Fee', 130 | 'invalid_musiconhold': 'This is not a valid Music on Hold', 131 | 'invalid_name': 'This is not a valid name, Alphanumeric Only', 132 | 'invalid_nat': 'This is not a valid NAT', 133 | 'invalid_note': 'This is not a valid Note, lenght should be less than 50 chars', 134 | 'invalid_number': 'This is not a valid Number', 135 | 'invalid_number_porttype': 'You have entered a local number (not valid in this portability process)', 136 | 'invalid_number_canadian': 'You have entered a Canadian number (not valid in this portability process).', 137 | 'invalid_number_us': 'You have entered a USA number (not valid in this portability process).', 138 | 'invalid_number_fax': 'The Fax number can not be ported into our network', 139 | 'invalid_number_exist': 'The number is already in our network', 140 | 'invalid_numbermembers': ( 141 | 'The element format of multiple data is not correct ' 142 | 'or it size does not match with other elements' 143 | ), 144 | 'invalid_order': 'This is not a valid "order" value', 145 | 'invalid_package': 'This is not a valid Package', 146 | 'invalid_password': ( 147 | 'This is not a valid password, Voicemail: Must be 4 Digits, ' 148 | 'SubAccounts: More than 6 chars, Must Contain Alphanumeric and !#$%&/()=?*[]_:.,{}+-' 149 | ), 150 | 'invalid_password_auth': 'Do not provide a Password for IP Authentication', 151 | 'invalid_password_lessthan_8characters_long': 'This is not a valid password (Less than 8 characters long)', 152 | 'invalid_password_missing_uppercase': 'This is not a valid password (Missing upper case character)', 153 | 'invalid_password_missing_lowercase': 'This is not a valid password (Missing lower case character)', 154 | 'invalid_password_ilegal_characters': ( 155 | 'This is not a valid password (Allowed characters: ' 156 | 'Alphanumeric and ! # $ % & / ( ) = ? * [ ] _ : . , { } + -)' 157 | ), 158 | 'invalid_password_missing_number': 'This is not a valid password (Missing a number)', 159 | 'invalid_pause': 'This is not a valid Pause', 160 | 'invalid_payment': 'This is not a valid Payment', 161 | 'invalid_phonebook': 'This is not a valid Phonebook', 162 | 'invalid_phonenumber': 'This is not a valid Phone Number', 163 | 'invalid_pin': 'This is not a valid PIN', 164 | 'invalid_pin_number': 'Must provide the account PIN number.', 165 | 'invalid_playinstructions': 'This is not a valid PlayInstructionsShould be: u/su', 166 | 'invalid_priority': 'This is not a valid Priority', 167 | 'invalid_protocol': 'This is not a valid Protocol', 168 | 'invalid_province': 'This is not a valid Province', 169 | 'invalid_provider_name': 'You must provide the service provider name', 170 | 'invalid_provider_account': 'You must provide your account # with the current provider', 171 | 'invalid_portingid': "The given ID is invalid or doesn't exist.", 172 | 'invalid_porttype': 'Must provide a valid port type.', 173 | 'invalid_port_status': 'The status code is invalid. (You can use the values returned by the method getListStatus)', 174 | 'invalid_quantity': 'This is not a valid quantity', 175 | 'invalid_query': 'This is not a valid Query', 176 | 'invalid_queue': 'This is not a valid Queue', 177 | 'invalid_quiet': 'This is not a valid "quiet" value', 178 | 'invalid_recording': 'This is not a valid recording', 179 | 'invalid_recording_sound_join': '"join" is not a valid recording', 180 | 'invalid_recording_sound_leave': '"leave" is not a valid recording', 181 | 'invalid_recording_sound_has_joined': '"has_joined" is not a valid recording', 182 | 'invalid_recording_sound_has_left': '"has_left" is not a valid recording', 183 | 'invalid_recording_sound_kicked': '"kicked" is not a valid recording', 184 | 'invalid_recording_sound_muted': '"muted" is not a valid recording', 185 | 'invalid_recording_sound_unmuted': '"unmuted" is not a valid recording', 186 | 'invalid_recording_sound_only_person': '"only person" is not a valid recording', 187 | 'invalid_recording_sound_only_one': '"only one" is not a valid recording', 188 | 'invalid_recording_sound_there_are': '"there are" is not a valid recording', 189 | 'invalid_recording_sound_participants_muted': '"participants muted" is not a valid recording', 190 | 'invalid_recording_sound_other_in_party': '"other in party" is not a valid recording', 191 | 'invalid_recording_sound_place_into_conference': '"place into conference" is not a valid recording', 192 | 'invalid_recording_sound_get_pin': '"get pin" is not a valid recording', 193 | 'invalid_recording_sound_invalid_pin': '"invalid pin" is not a valid recording', 194 | 'invalid_recording_sound_locked': '"locked" is not a valid recording', 195 | 'invalid_recording_sound_locked_now': '"locked now" is not a valid recording', 196 | 'invalid_recording_sound_unlocked_now': '"unlocked now" is not a valid recording', 197 | 'invalid_recording_sound_error_menu': '"error menu" is not a valid recording', 198 | 'invalid_recording_sound_participants_unmuted': '"participants unmuted" is not a valid recording', 199 | 'invalid_report_hold_time_agent': 'This is not a valid Report hold time agent', 200 | 'invalid_resellerclient': 'This is not a valid Reseller Client', 201 | 'invalid_resellernextbilling': ( 202 | 'This is not a valid Reseller Next Billing date, ' 203 | 'date should not be set in the past.' 204 | ), 205 | 'invalid_resellerpackage': 'This is not a valid Reseller Package', 206 | 'invalid_response_timeout': 'This is not a valid ResponseTimeOut', 207 | 'invalid_retry_timer': 'This is not a valid Retry timer', 208 | 'invalid_ringgroup': 'This is not a valid Ring group', 209 | 'invalid_ring_inuse': 'This is not a valid Ring in use value', 210 | 'invalid_route': 'This is not a valid Route', 211 | 'invalid_routing_header': 'This is not a valid Routing headerShould be: account/vm/fwd', 212 | 'invalid_saycallerid': 'This is not a valid SayCallerIDShould be: yes/no', 213 | 'invalid_saytime': 'This is not a valid SayTimeShould be: yes/no', 214 | 'invalid_security_code': 'This is not a valid Security Code.Should be alphanumeric.', 215 | 'invalid_serverpop': 'This is not a valid Server POP', 216 | 'invalid_setup': 'This is not a valid Setup Fee', 217 | 'invalid_silence_threshold': 'This is not a valid "silence threshold" value', 218 | 'invalid_sipuri': 'This is not a valid SIPURI', 219 | 'invalid_sms': 'This is not a valid SMS', 220 | 'invalid_sms_forward': 'This is not a valid SMS forward', 221 | 'invalid_snn': 'Must provide the 4 last digits of the SSN.', 222 | 'invalid_statement_name': 'Statement Name is missing or the format is invalid.', 223 | 'invalid_skippassword': 'This is not a valid skippasswordShould be: 1/0 - or - yes/no', 224 | 'invalid_speed_dial': 'This is not a valid Speed Dial', 225 | 'invalid_starthour': 'This is not a valid Start Hour', 226 | 'invalid_startminute': 'This is not a valid Start Minute', 227 | 'invalid_start_muted': 'This is not a valid Start Muted', 228 | 'invalid_state': 'This is not a valid State', 229 | 'invalid_strategy': 'This is not a valid Ring Strategy', 230 | 'invalid_talking_threshold': 'This is not a valid "talking threshold" value', 231 | 'invalid_talk_detection': 'This is not a valid talk detection value', 232 | 'invalid_tfnumber_porttype': 'You have entered a toll-free number (not valid in this portability process).', 233 | 'invalid_thankyou_for_your_patience': 'This is not a valid Thankyou for your patience value', 234 | 'Invalid_threshold': 'This is not a valid Threshold Amount. The Threshold Amount should be between 1 and 250', 235 | 'invalid_timecondition': 'This is not a valid Time Condition', 236 | 'invalid_timeout': 'This is not a valid timeout', 237 | 'invalid_timerange': 'This is not a valid Timer Range', 238 | 'invalid_timezone': ( 239 | 'This is not a valid TimezoneCDR and resellerCDR: ' 240 | 'Must be numericVoicemail: Values from getTimezone' 241 | ), 242 | 'invalid_type': 'This is not a valid Type', 243 | 'invalid_to_number': 'This is not a valid destination number', 244 | 'invalid_username': 'This is not a valid Username', 245 | 'invalid_voice_announcement': 'This is not a valid Voice announce', 246 | 'invalid_voicemailsetup': 'This is not a valid voicemail', 247 | 'invalid_wrapup_time': 'This is not a valid Wrapup time', 248 | 'invalid_weekdayend': 'This is not a valid Week End', 249 | 'invalid_weekdaystart': 'This is not a valid Week Start', 250 | 'invalid_priority_weight': 'This is not valid weight/priority value', 251 | 'invalid_urgent': 'This is not valid urgent value', 252 | 'invalid_zip': 'Zip Code is missing or the format is invalid.', 253 | 'ip_not_enabled': 'This IP is not enabled for API use', 254 | 'limit_reached': 'You have reached the maximum number of messages allowed per day.', 255 | 'max_phonebook': 'Your account is limited to 8 SIP, IAX or SIP URI members', 256 | 'member_already_included': 'The member has been included already', 257 | 'members_exceeded': 'You have reached the maximum allowed entries for the Phonebook', 258 | 'message_empty': 'The SMS Message is empty', 259 | 'message_not_found': 'The voicemail message was not found', 260 | 'method_maintenance': 'This API method is under maintenance', 261 | 'mismatch_email_confirm': 'e-mail confirm does not match with e-mail', 262 | 'mismatch_password_confirm': 'Pasword confirm does not match with Password', 263 | 'missing_account': 'Account was not provided', 264 | 'missing_address': 'Address was not provided', 265 | 'missing_agent_ring_timeout': 'Agent ring time out was not provided', 266 | 'missing_allowedcodecs': 'Allowed Codecs were not provided', 267 | 'missing_attachmessage': 'AttachMessage was not provided', 268 | 'missing_authtype': 'Auth Type was not provided', 269 | 'missing_balancemanagement': 'BalanceManagemente was not provided', 270 | 'missing_billingtype': 'Billing Type was not provided', 271 | 'missing_callback': 'Callback was not provided', 272 | 'missing_callerid': 'CallerID was not provided', 273 | 'missing_callhunting': 'Call hunting was not provided', 274 | 'missing_carrier': 'Carrier was not provided', 275 | 'missing_charge': 'Charge was not provided.', 276 | 'missing_choices': 'Choices was not provided', 277 | 'missing_city': 'City was not provided', 278 | 'missing_client': 'Client was not provided', 279 | 'missing_cnam': 'CNAM was not provided', 280 | 'missing_codec': 'Codec was not provided', 281 | 'missing_conference': 'Conference was not provided', 282 | 'missing_country': 'Country was not provided', 283 | 'missing_countryid': 'Country ID was not provided', 284 | 'missing_credentials': 'Username or Password was not provided', 285 | 'missing_datetime': 'DateTime value was not provided', 286 | 'missing_delay_before': 'DelayBefore was not provided', 287 | 'missing_deletemessage': 'DeleteMessage was not provided', 288 | 'missing_description': 'Description was not provided', 289 | 'missing_devicetype': 'Device Type was not provided', 290 | 'missing_dialtime': 'Dialtime was not provided', 291 | 'missing_did': 'DID was not provided', 292 | 'missing_digits': 'Digits were not provided', 293 | 'missing_digit_timeout': 'DigitTimeOut was not provided', 294 | 'missing_disa': 'DISA was not provided', 295 | 'missing_dtmfmode': 'DTMF Mode was not provided', 296 | 'missing_email': 'e-mail was not provided', 297 | 'missing_email_confirm': 'e-mail confirm was not provided', 298 | 'missing_enable': 'Enable was not provided', 299 | 'missing_endhour': 'End Hour was not provided', 300 | 'missing_endminute': 'End Minute was not provided', 301 | 'missing_failover_busy': 'Failover Busy was not provided', 302 | 'missing_failover_noanswer': 'Failover NoAnswer was not provided', 303 | 'missing_failover_unreachable': 'Failover Unreachable was not provided', 304 | 'missing_file': 'File was not provided', 305 | 'missing_filter': 'Filter was not provided', 306 | 'missing_firstname': 'Firstname was not provided', 307 | 'missing_folder': 'folder was not provided', 308 | 'missing_forwarding': 'Forwarding was not provided', 309 | 'missing_id': 'ID was not provided', 310 | 'missing_if_announce_position_enabled_report_estimated_hold_time': ( 311 | "'If announce position enabled report " 312 | "estimated hold time' type was not provided" 313 | ), 314 | 'missing_internationalroute': 'International Route was not provided', 315 | 'missing_ip': 'You need to provide an IP if you select IP Authentication Method', 316 | 'missing_ip_h323': 'You must enter an IP Address for H.323', 317 | 'missing_ivr': 'IVR was not provided', 318 | 'missing_join_when_empty': "'JoinWhenEmpty' type was not provided", 319 | 'missing_language': 'Language was not provided', 320 | 'missing_lastname': 'Lastname was not provided', 321 | 'missing_leave_when_empty': "'LeaveWhenEmpty' type was not provided", 322 | 'missing_listened': 'Listened code was not provided', 323 | 'missing_location': 'Location was not provided', 324 | 'missing_lockinternational': 'Lock International was not provided', 325 | 'missing_mailbox': 'Mailbox was not provided', 326 | 'missing_members': 'You need at least 1 member to create a ring group', 327 | 'missing_member': 'Member was not provided', 328 | 'missing_message_num': 'Voicemail message number was not provided', 329 | 'missing_method': 'Method must be provided when using the REST/JSON API', 330 | 'missing_minute': 'Minute Rate was not provided', 331 | 'missing_monthly': 'Monthly Fee was not provided', 332 | 'missing_musiconhold': 'Music on Hold was not provided', 333 | 'missing_name': 'Name was not provided', 334 | 'missing_nat': 'NAT was not provided', 335 | 'missing_number': 'Number was not provided', 336 | 'missing_numbers': 'You must enter at least one valid phone number.', 337 | 'missing_params': 'Required parameters were not provided', 338 | 'missing_package': 'Package was not provided', 339 | 'missing_password': 'Password was not provided', 340 | 'missing_password_confirm': 'Password Confirm was not provided', 341 | 'missing_payment': 'Payment was not provided.', 342 | 'missing_phonebook': 'Phonebook was not provided', 343 | 'missing_phonenumber': 'Phone Number was not provided', 344 | 'missing_pin': 'PIN was not provided', 345 | 'missing_playinstructions': 'PlayInstructions was not provided', 346 | 'missing_priority': 'Priority was not provided', 347 | 'missing_protocol': 'Protocol was not provided', 348 | 'missing_province': 'Province was not provided', 349 | 'missing_query': 'Query was not provided', 350 | 'missing_recording': 'Recording was not provided', 351 | 'missing_report_hold_time_agent': 'Report hold time agent was not provided', 352 | 'missing_resellerclient': "Provide a Reseller Client or don't provide a Reseller Package", 353 | 'missing_resellerpackage': "Provide a Reseller Package or don't provide a Reseller Client", 354 | 'missing_response_timeout': 'ResponseTimeOut was not provided', 355 | 'missing_ringgroup': 'Ring group was not provided', 356 | 'missing_ring_inuse': 'Ring in use was not provided', 357 | 'missing_ring_strategy': 'Ring strategy was not provided', 358 | 'missing_route': 'Route was not provided', 359 | 'missing_routing': 'Routing was not provided', 360 | 'missing_saycallerid': 'SayCallerID was not provided', 361 | 'missing_saytime': 'SayTime was not provided', 362 | 'missing_serverpop': 'Server POP was not provided', 363 | 'missing_setup': 'Setup Fee was not provided', 364 | 'missing_sipuri': 'SIPURI was not provided', 365 | 'missing_sms': 'SMS was not provided', 366 | 'missing_skippassword': 'SkipPassword was not provided', 367 | 'missing_speed_dial': 'Speed Dial was not provided', 368 | 'missing_starthour': 'Start Hour was not provided', 369 | 'missing_startminute': 'Start Minute was not provided', 370 | 'missing_state': 'State was not provided', 371 | 'missing_thankyou_for_your_patience': 'Thankyou for your patience was not provided', 372 | 'missing_timecondition': 'Time Condition was not provided', 373 | 'missing_timeout': 'Timeout was not provided', 374 | 'missing_timezone': 'Timezone was not provided', 375 | 'missing_type': 'Type was not provided', 376 | 'missing_urgent': 'Urgent code was not provided', 377 | 'missing_uri': 'URI was not provided', 378 | 'missing_username': 'Username was not provided', 379 | 'missing_voicemailsetup': 'Voice mail setup was not provided', 380 | 'missing_weekdayend': 'Week End was not provide', 381 | 'missing_weekdaystart': ' Week Start was not provided', 382 | 'missing_priority_weight': ' Priority/Weight was not provided', 383 | 'missing_zip': 'Zip Code was not provided', 384 | 'moving_fail': 'The Fax Message was not moved', 385 | 'name_toolong': 'The name exceeds character size limit', 386 | 'non_sufficient_funds': 'Your account does not have sufficient funds to proceed', 387 | 'no_account': 'There are no accounts', 388 | 'no_attachments': 'Theres no attachments records to show.', 389 | 'no_base64file': 'File not encoded in base64', 390 | 'no_callback': 'There are not Callbacks', 391 | 'no_callhunting': 'There are no Call Huntings', 392 | 'no_callstatus': ( 393 | 'No Call Status was provided. One of the following parameters needs to be set to "1": ' 394 | 'answered, noanswer, busy, failed' 395 | ), 396 | 'no_cdr': 'There are no CDR entries for the filter', 397 | 'no_change_billingtype': 'Imposible change DID billing plan', 398 | 'no_client': 'There are no Clients', 399 | 'no_conference': 'There are no Conferences', 400 | 'no_did': 'There are no DIDs', 401 | 'no_disa': 'There are no DISAs', 402 | 'no_filter': 'There are no Filters', 403 | 'no_forwarding': 'There was no Forwarding', 404 | 'no_ivr': 'There are no ivr', 405 | 'no_mailbox': 'There are no Mailboxes', 406 | 'no_message': 'There are no Fax Message(s)', 407 | 'no_messages': 'There are no Voicemail Message(s)', 408 | 'no_member': 'There are no Static Members', 409 | 'no_numbers': 'There are no Fax Numbers', 410 | 'no_package': 'there are no Packages', 411 | 'no_phonebook': 'There are no Phonebook entries', 412 | 'no_queue': 'There are no Queue entries', 413 | 'no_rate': 'There are no Rates', 414 | 'no_recording': 'There are no recordings', 415 | 'no_ringgroup': 'There are no Ring groups', 416 | 'no_sipuri': 'There are no SIP URIs', 417 | 'no_sms': 'There are no SMS messages', 418 | 'no_timecondition': 'There are no Time Conditions', 419 | 'note_toolong': 'The note exceeds character size limit', 420 | 'order_failed': "The order wasn't completed.", 421 | 'provider_outofservice': 'One of our providers is out of service', 422 | 'recording_in_use_did': 'You have a DID using this Recording', 423 | 'recording_in_use_queue': 'You have a Calling Queue using this Recording', 424 | 'recording_in_use_ivr': 'You have an IVR using this Recording', 425 | 'recording_in_use_caller_id_filtering': 'You have a Caller ID Filtering using this Recording', 426 | 'recording_in_use_caller_timecondition': 'You have a Time Condition using this Recording', 427 | 'repeated_ip': 'You already have a Subaccount using this IP and Protocol', 428 | 'reserved_ip': 'This is a reserved IP used by VoIP.ms or other Companies', 429 | 'same_did_billingtype': 'The Billing Type provided and DID billing type are the same', 430 | 'sipuri_in_phonebook': "This SIPURI can't be deleted, it is mapped in the phonebook", 431 | 'sent_fail': "The Fax Message it wasn't send.", 432 | 'sms_toolong': 'The SMS message exceeds 160 characters', 433 | 'sms_failed': 'The SMS message was not sent', 434 | 'tls_error': 'Theres was a TLS error, please try later.', 435 | 'Unable_to_purchase': 'Unable to purchase DIDs', 436 | 'unavailable_info': 'The information you requested is unavailable at this moment', 437 | 'unsifficient_stock': 'Theres no sufficient stock to complete the order.', 438 | 'used_description': 'You already have a record with this Description', 439 | 'used_extension': 'You already have a subaccount using this extension', 440 | 'used_filter': 'You already have a record with this Filter', 441 | 'used_ip': 'There is already another customer using this IP Address', 442 | 'used_name': 'You already have an entry using this name', 443 | 'used_number': 'You already have a record with this Number', 444 | 'used_password': 'This password has been used previously by this account.', 445 | 'used_speed_dial': 'You have an entry with this Speed Dial', 446 | 'used_username': 'You already have a subaccount using this Username.', 447 | 'weak_password': 'This Password is too weak or too common'} 448 | err_desc = err_code_map[self.err_code] or self.err_code 449 | return "API Call failed as: {}".format(err_desc) 450 | 451 | 452 | class VoipRestException(VoipException): 453 | def __str__(self): 454 | return self.err_code or "" 455 | --------------------------------------------------------------------------------