Excerpt |
---|
This script allows you to create a new account, update account information or remove an account. The VoipNow 3 accounts are: service providers, organizations, and users. |
Usage
Shell |
---|
/usr/local/voipnow/bin/account.sh[options] |
Where <command> is one of:
Argument | Parameter | Description |
---|
-h, --help | | Shows the help message. |
-c, --create | login_name | Creates a new account. |
-u, --update | login_name | Updates an account. |
-r, --remove | login_name | Removes an account. |
and available [options] are:
Argument | Parameter | Description |
---|
--level | string | Account level (required for creation). Accepted values: ServiceProvider , Organization , User . |
--name | string | Contact name (required for creation). |
--login | login_name | Control panel login name (required for creation). |
--auto | <empty> | Automatic password generation. |
--password | password | Control panel password (required for creation).- On account creation: if --phonepassword option is not supplied, the phone password is set equal to this password.
- On account update: if previously the phone password was the same with the control panel password and --phonepassword option is not supplied, the phone password is set equal to this password.
|
--phonepassword | phonepassword | Phone password (for level = User and phone terminal extensions only).- On account creation: if not supplied, the phone password is set equal to the control panel password.
- On account update: if supplied, even if previously the phone password was the same with the control panel password, the phone password is updated.
|
--parent_login | login_name | Login name of the account that creates this child account (required for creation of organizations and users). |
--email | string | E-mail address (required for creation). |
--company | string | Company Name. |
--telephone | number | Phone number. |
--fax | number | Fax number. |
--address | string | Street. |
--city | string | City. |
--state | string | US state. |
--pcode | string | Postal code. |
--country | string | Country code (required for creation). |
--timezone | string | Timezone name (required for creation). |
--language | string | Interface language as specified by the ISO 639–1 standard (required for creation). |
--phone_language | string | Phone language as specified by the ISO 639–1 standard (required for extension creation). |
--charging_plan | string | Charging plan name. The charging plan must already be created in the parent account. |
--template_id | number | ID of the permissions and limits template. You must provide the ID of a template for the account level you want to create. |
--type | string | Extension type (for level = User only). Allowed values: 'term', 'queue', 'ivr', 'conference', 'voicecenter', 'callback', 'callcard', 'intercom', 'queuecenter' (this is not required). |
--number | number | Extension number (for level = User only) (required for creation). |
--label | string | Extension label (for level = User only) (this is not required and if it is not provided, label will default to extension number). |
--extension_template_id | number | ID of extension template (for level = User only) (this is not required). |
--sendmail | <empty value> | Send an welcome email to the account owner. Always sent on account creation. On update, sent only if this flag is set. |
Note |
---|
When creating a User level account, it is also possible to create an associated extension using the --type, --number, --label, --extension_template_id parameters. Extension creation is optional. |
Examples
Add New Service Provider
Shell |
---|
/usr/local/voipnow/bin/account.sh --create newserviceprovider --level ServiceProvider --name "Service Provider Name" --password "pass20G5Z" --email "newservice_provider@example.com" --company "Service Provider Company" --telephone "021.21.223.23" --fax "021.21.223.23" --address "This is the service provider address" --city "Some City" --state "Alsace" --pcode "111111" --country "Fr" --timezone "Europe/Paris" --language en --charging_plan "Default charging plan" |
Add New Organization
Shell |
---|
/usr/local/voipnow/bin/account.sh --create neworganization --level Organization --name "Organization Name" --password "pass20G5Z" --parent_login newserviceprovider --email "neworganization@example.com" --company "Organization Company" --telephone "021.21.223.23" --fax "021.21.223.23" --address "This is the organization address" --city "Some City" --state "Alsace" --pcode "111111" --country "Fr" --timezone "Europe/Paris" --language en |
Add New User
Shell |
---|
/usr/local/voipnow/bin/account.sh --create newuser --level User --name "User Name" --password "pass20G5Z" --parent_login neworganization --email "newuser@example.com" --company "User Company" --telephone "021.21.223.23" --fax "021.21.223.23" --address "This is the user address" --city "Some City" --state "Alsace" --pcode "111111" --country "Fr" --timezone "Europe/Paris" --language en --phone_language en |
Update Account Email
Shell |
---|
/usr/local/voipnow/bin/account.sh --update newaccount --email "newcl2@example.com" |
Remove Account
Shell |
---|
/usr/local/voipnow/bin/account.sh --remove newaccount |
Update Phone Terminal Password
Shell |
---|
/usr/local/voipnow/bin/account.sh --update newphoneterminal --phonepassword "21tryme68" |
Resend Account Details
Shell |
---|
/usr/local/voipnow/bin/account.sh --update newaccount --company "Updated Organization" --password "pass20G5Z" --sendmail |