account.sh
This script allows you to create a new account, update account information or remove an account. The VoipNow accounts are:
- Service Providers
- Organizations
- Users
Usage
account.sh <command> [options]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.
To see all available parameters, you can run:
account.sh --helpExamples
Add New Account
- Service Providerbash
account.sh --create newserviceprovider \ --level ServiceProvider \ --first_name "Service" \ --last_name "Provider" \ --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" - Organizationbash
account.sh --create neworganization \ --level Organization \ --first_name "Organization" \ --last_name "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 - Userbash
account.sh --create newuser \ --level User \ --first_name "User Name" \ --last_name "Test" \ --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 \ --role administrator
Any of the above CLI commands returns the message 'Account was created' once the account is added.
Update Account Email
account.sh --update newaccount --email "newcl2@example.com"Once the changes are applied, the CLI will display the following message: 'The account was updated'.
Remove Account
account.sh --remove newserviceproviderWhen removing an account, the CLI prompts for confirmation with the message:
Do you really want to remove the reseller and all its child accounts? [Yes/No]After confirming with 'Yes', the system displays: 'Account removed'.
Resend Account Details
account.sh --update newaccount \
--company "Updated Organization" \
--password "pass20G5Z" \
--sendmailOnce the changes are applied, the CLI will display the following message: The account was updated.