User Tools

Site Tools


api:sip:resetcredentials

API : SIP Account Reset Credentials

Introduction

This request will reset the username and password for a SIP account.

For security reasons the username and password for a SIP account cannot be set manually, it is always auto-generated by the system, both as 16 character strings consisting of upper and lowercase letters and digits.

when a SIP account is created, that requires username/password authentication, a username and password is generated. This should only be used if you suspect that a 3rd party has obtained the username and password.

The new username and password can be seen in the response to the request which will be the full SIP account.

Request

URL https://api.telecomx.dk/sip/ACCOUNT_ID/resetCredentials
Method POST
Access level MANAGER or OWNER when user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Param ACCOUNT_ID Id of the SIP account (24 hex-char string)

Query example

POST https://api.telecomx.dk/sip/1234567890ABCDEF12345678/resetCredentials

Response

Json object
_id Id Unique SIP account id.
customer Id Id of customer the SIP account belongs to.
active Boolean True if the account is active and can handle calls.
name String Human readable name of the SIP account, or the first number of the account.
type String Type of account - always 'SIP'.
numbers Array Array of numbers that the account handles in E.164 format.
highRate Boolean True if account can be used for calling high rated numbers.
international Boolean True if account can be used for calling outside Denmark.
address Id Address the SIP account belongs to (for 112/114 emergency routing).
ratePlan Id Id of the SIP rate plan product this account should be invoiced by.
newRatePlan Id If a new rateplan should be applied at end of month, this is the plan (cannot change in mid-month).
parentSipAccount Id Id of another SIP account. If set, rating calls made on this account is made as if the calls were made on the other account.
pbx Boolean If true, this sip trunk is used by the hosted pbx.
notes String Notes about the SIP account, only visible to RESELLER and ADMIN.
custom Object Custom data that 3rd parties may append, max. 4Kb.
status String 'ON' if the SIP client is connected/reachable, 'OFF' if unreachable.
sipServer String IP address of the SIP server currently handling this SIP account. Only visible for ADMIN.
userAgent String The latest user agent string received from the SIP client.
contact String The latest registration contact string as received from the SIP client.
connection String Method for the SIP client to connect:
IP_AUTH - Calls are sent to the fixed IP address and port, client must use authentication to initiate outbound calls, and can only do so from the fixed IP address.
IP_AUTH_REG - Client must be at the fixed IP address, must register to receive calls and must use authentication to initiate outbound calls.
IP - Calls are sent to the fixed IP address and port, and outbound calls must be made from the fixed IP address - no authentication is required (Lync mode).
COUNTRY_AUTH_REG - client must register to make and receive calls, and client must come from an IP address in one of the selected countries.
username String 16 characters auto-generated string. Can only be changed used the resetCredentials API call.
password String 16 characters auto-generated string. Can only be changed used the resetCredentials API call.
ipAddress String IP address the SIP client must originate from and calls are sent to if connection is not COUNTRY_AUTH_REG.
port Integer Port that calls are sent to if connection is IP or IP_AUTH, default 5060.
countries String Comma list of ISO3166 2 char country codes from where the SIP client may register, if connection is COUNTRY_AUTH_REG.
clipSA Boolean True if SIP client may present any phone number, false if SIP client may only present the numbers in numbers.
stripDkCountryCode Boolean True if +45 should be stripped before sending calls to the SIP client.
failover String E.164 number or IP address or E.164@IP to redirect to when calls cannot be delivered to the sip client.
alwaysFailover Boolean True to always use the failover.

Note that properties holding no value may be omitted from the object.

Example

{
  _id: '1234567890ABCDEF12345678',
  customer: '1234567890ABCDEF12345678',
  active: true,
  name: 'Primary trunk CPH',
  type: 'SIP',
  numbers: ['+4570305050','+4570305051','+4570305052','+4580808080'],
  highRate: true,
  international: true,
  address: '1234567890ABCDEF12345678',
  ratePlan: '1234567890ABCDEF12345678',
  newRatePlan: null,
  parentSipAccount: null,
  pbx: false,
  notes: 'A note about the SIP account',
  custom: null,
  status: 'ON',
  sipServer: 1.2.3.4,
  userAgent: 'Asterisk 1.8.13',
  contact: 'fhrtu373utiu38r8@77.66.100.10:5060',
  connection: 'IP_AUTH_REG',
  username: 'fhrtu373utiu38r8',
  password: 'eh378gi2ufvhghug',
  ipAddress: '77.66.100.10',
  port: null,
  countries: null,
  clipSA: true,
  stripDkCountryCode: true,
  failover: '+4588888888@77.66.100.123',
  alwaysFailover: false
}

Errors

Error code Message Description
400 bad_request SIP account id not found in request URI
403 access_denied Insufficient access level
404 sipAccount SIP account not found
403 pbx Hosted PBX account does not support resetCredentials
500 internal_error <Unspecified>
api/sip/resetcredentials.txt · Last modified: 2015/08/05 13:32 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki