User Address

Every OnSIP user can have one or more SIP addresses (e.g mike@example.onsip.com). We commonly refer to an OnSIP user’s SIP address as a user address. This feature can be a useful way to create different identities like mike.sales@example.onsip.com and mike.support@example.onsip.com for the same user.

User addresses can be a handy feature when used in conjunction with Ring Groups. For instance, it would be trivial to run phone campaigns by placing the user address, mike.campaign1@example.onsip.com, into the Ring Group holiday.campaign1@example.onsip.com, and then assigning a phone number to that campaign.

User Address Add

Add a UserAddress to an Organization.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAddressAdd”
SessionId Authenticated Session identifier.
OrganizationId A positive integer which references a unique organization.
Username The username portion of the address to add.
Domain The domain portion of the address to add.
UserId A positive integer which references a unique user associated with the address.
Timeout A positive integer indicating the max length of time in seconds a call attempt is made.
Optional ParametersDefaultDescription
DefaultAddress If not set, no failover will be attempted. A failover SIP address to use in the event of a timeout or negative response.

Result Element Schema

UserAddressAdd.rnc:

UserAddressAdd.rng, UserAddress.rng, Address.rng, DefaultAddress.rng

Sample Request

cURL
1
2
3
curl -X POST --data \
'Action=UserAddressAdd&SessionId=2n6e82gmsg2khqsro2k7n3b1n6&OrganizationId=654321&Username=test&Domain=example.onsip.com&UserId=123456&Timeout=120' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var data = new FormData();
data.append('Action', 'UserAddressAdd');
data.append('SessionId', '2n6e82gmsg2khqsro2k7n3b1n6');
data.append('OrganizationId', '654321');
data.append('Username', 'test');
data.append('Domain', 'example.onsip.com');
data.append('UserId', '123456');
data.append('Timeout', '120');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T13:53:50+00:00</DateTime>
      <Duration>103</Duration>
      <Parameters>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAddressAdd</Value>
        </Parameter>
        <Parameter>
          <Name>SessionId</Name>
          <Value>2n6e82gmsg2khqsro2k7n3b1n6</Value>
        </Parameter>
        <Parameter>
          <Name>OrganizationId</Name>
          <Value>654321</Value>
        </Parameter>
        <Parameter>
          <Name>Username</Name>
          <Value>test</Value>
        </Parameter>
        <Parameter>
          <Name>Domain</Name>
          <Value>example.onsip.com</Value>
        </Parameter>
        <Parameter>
          <Name>UserId</Name>
          <Value>123456</Value>
        </Parameter>
        <Parameter>
          <Name>Timeout</Name>
          <Value>120</Value>
        </Parameter>
        <Parameter>
          <Name>Name</Name>
          <Value>test</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>2n6e82gmsg2khqsro2k7n3b1n6</SessionId>
      <UserId>211025</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAddressAdd>
      <UserAddress>
        <UserId>123456</UserId>
        <AuthUsername>test</AuthUsername>
        <AuthPassword>authpass</AuthPassword>
        <Timeout>120</Timeout>
        <E911LocationId/>
        <DoNotDisturb>false</DoNotDisturb>
        <Address>
          <AddressId>246800</AddressId>
          <Username>test</Username>
          <Domain>example.onsip.com</Domain>
          <Type>user</Type>
          <Name>test</Name>
          <Modified>2014-04-21T13:53:50+00:00</Modified>
          <Created>2014-04-21T13:53:50+00:00</Created>
          <CplText>&lt;cpl xmlns=&quot;urn:ietf:params:xml:ns:cpl&quot;/&gt;</CplText>
        </Address>
      </UserAddress>
      <Organization>
        <OrganizationId>654321</OrganizationId>
        <AccountId>67890</AccountId>
        <Service>platform</Service>
        <Domain>example.onsip.com</Domain>
        <CallerId/>
        <CallerIdName/>
        <CallerIdNumber/>
        <Status>enabled</Status>
        <ExtendedDialing>false</ExtendedDialing>
        <E911Provisioning>false</E911Provisioning>
        <BusyLampField>false</BusyLampField>
        <Authenticated>false</Authenticated>
        <RegistrationLimit>0</RegistrationLimit>
        <Modified>2014-03-14T19:52:08+00:00</Modified>
        <Created>2014-03-14T19:52:08+00:00</Created>
        <Contact>
          <Name>Alice Applegate</Name>
          <Organization>OnSIP Example</Organization>
          <Address>55 Broad St</Address>
          <City>New York</City>
          <State>NY</State>
          <Zipcode>10004</Zipcode>
          <Country>United States of America</Country>
          <CountryId>207</CountryId>
          <Phone>1-212-456-7890</Phone>
          <Email>alice@example.com</Email>
          <Modified>2014-03-14T19:52:08+00:00</Modified>
        </Contact>
      </Organization>
    </UserAddressAdd>
  </Result>
</Response>

User Address Read

Returns information about a UserAddress.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAddressRead”
SessionId Authenticated Session identifier.
Address A SIP “user” address of the form username@domain (ie joe@example.onsip.com).

Result Element Schema

UserAddressRead.rnc:

UserAddressRead.rng, Address.rng, DefaultAddress.rng

Sample Request

cURL
1
2
3
curl -X POST --data \
'Action=UserAddressRead&SessionId=2n6e82gmsg2khqsro2k7n3b1n6&Address=test@example.onsip.com' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
var data = new FormData();
data.append('Action', 'UserAddressRead');
data.append('SessionId', '2n6e82gmsg2khqsro2k7n3b1n6');
data.append('Address', 'test@example.onsip.com');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:13:49+00:00</DateTime>
      <Duration>19</Duration>
      <Parameters>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAddressRead</Value>
        </Parameter>
        <Parameter>
          <Name>SessionId</Name>
          <Value>2n6e82gmsg2khqsro2k7n3b1n6</Value>
        </Parameter>
        <Parameter>
          <Name>Address</Name>
          <Value>test@example.onsip.com</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>2n6e82gmsg2khqsro2k7n3b1n6</SessionId>
      <UserId>123456</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAddressRead>
      <UserAddress>
        <UserId>123456</UserId>
        <AuthUsername>test</AuthUsername>
        <AuthPassword>PQ2am6KLuGunkCbn</AuthPassword>
        <Timeout>120</Timeout>
        <E911LocationId/>
        <DoNotDisturb>false</DoNotDisturb>
        <Address>
          <AddressId>246800</AddressId>
          <Username>test</Username>
          <Domain>example.onsip.com</Domain>
          <Type>user</Type>
          <Name>test</Name>
          <Modified>2014-04-21T13:53:50+00:00</Modified>
          <Created>2014-04-21T13:53:50+00:00</Created>
          <CplText>&lt;cpl xmlns=&quot;urn:ietf:params:xml:ns:cpl&quot;/&gt;</CplText>
        </Address>
      </UserAddress>
      <Organization>
        <OrganizationId>654321</OrganizationId>
        <AccountId>123456</AccountId>
        <Service>platform</Service>
        <Domain>test.onsip.com</Domain>
        <CallerId/>
        <CallerIdName/>
        <CallerIdNumber/>
        <Status>enabled</Status>
        <ExtendedDialing>false</ExtendedDialing>
        <E911Provisioning>false</E911Provisioning>
        <BusyLampField>false</BusyLampField>
        <Authenticated>false</Authenticated>
        <RegistrationLimit>0</RegistrationLimit>
        <Modified>2014-03-14T19:52:08+00:00</Modified>
        <Created>2014-03-14T19:52:08+00:00</Created>
        <Contact>
          <Name>Alice Applegate</Name>
          <Organization>OnSIP Example</Organization>
          <Address>55 Broad St</Address>
          <City>New York</City>
          <State>NY</State>
          <Zipcode>10004</Zipcode>
          <Country>United States of America</Country>
          <CountryId>207</CountryId>
          <Phone>1-212-456-7890</Phone>
          <Email>alice@example.com</Email>
          <Modified>2014-03-14T19:52:08+00:00</Modified>
        </Contact>
      </Organization>
    </UserAddressRead>
  </Result>
</Response>

User Address Browse

Returns information about a group of UserAddresses.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAddressBrowse”
SessionId Authenticated Session identifier.
One and Only One of the Following Parameters Description
AccountId A positive integer which references a unique account.
OrganizationId A positive integer which references a unique organization.
UserId A positive integer which references a unique user.
Optional ParametersDefaultDescription
OrderBy   Username | Domain | UserId
Limit 20 The maximum number of records to return.
Offset 0 The offset of the first record to return. The offset of the initial record is 0 (not 1).
CalcFound true Calculate how many records there would be in the result set, disregarding any Limit parameter.

Result Element Schema

UserAddressBrowse.rnc:

UserAddressBrowse.rng, Address.rng, DefaultAddress.rng

Sample Request

cURL
1
2
3
curl -X POST --data \
'Action=UserAddressBrowse&SessionId=2n6e82gmsg2khqsro2k7n3b1n6' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
var data = new FormData();
data.append('Action', 'UserAddressBrowse');
data.append('SessionId', '2n6e82gmsg2khqsro2k7n3b1n6');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:44:30+00:00</DateTime>
      <Duration>28</Duration>
      <Parameters>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAddressBrowse</Value>
        </Parameter>
        <Parameter>
          <Name>SessionId</Name>
          <Value>2n6e82gmsg2khqsro2k7n3b1n6</Value>
        </Parameter>
        <Parameter>
          <Name>Limit</Name>
          <Value>20</Value>
        </Parameter>
        <Parameter>
          <Name>Offset</Name>
          <Value>0</Value>
        </Parameter>
        <Parameter>
          <Name>CalcFound</Name>
          <Value>true</Value>
        </Parameter>
        <Parameter>
          <Name>AccountId</Name>
          <Value>22835</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>2n6e82gmsg2khqsro2k7n3b1n6</SessionId>
      <UserId>123456</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAddressBrowse>
      <UserAddresses Limit="20" Offset="0" Found="16">
        <UserAddress>
          <UserId>123456</UserId>
          <AuthUsername>test</AuthUsername>
          <AuthPassword>PQ2am6KLuGunkCbn</AuthPassword>
          <Timeout>120</Timeout>
          <E911LocationId/>
          <DoNotDisturb>false</DoNotDisturb>
          <Address>
            <AddressId>246800</AddressId>
            <Username>test</Username>
            <Domain>example.onsip.com</Domain>
            <Type>user</Type>
            <Name>test</Name>
            <Modified>2014-04-21T13:53:50+00:00</Modified>
            <Created>2014-04-21T13:53:50+00:00</Created>
            <CplText>&lt;cpl xmlns=&quot;urn:ietf:params:xml:ns:cpl&quot;/&gt;</CplText>
          </Address>
        </UserAddress>
    </UserAddressBrowse>
  </Result>
</Response>

User Address Delete

Delete a UserAddress.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAddressDelete”
SessionId Authenticated Session identifier.
Address A SIP “user” address of the form username@domain (i.e. joe@example.onsip.com).

Result Element Schema

UserAddressDelete.rnc:

UserAddressDelete.rng

Sample Request

cURL
1
2
3
curl -X POST --data \ 
'Action=UserAddressDelete&SessionId=2n6e82gmsg2khqsro2k7n3b1n6&Address=test@example.onsip.com' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
var data = new FormData();
data.append('Action', 'UserAddressDelete');
data.append('SessionId', '2n6e82gmsg2khqsro2k7n3b1n6');
data.append('Address', 'test@example.onsip.com');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T14:55:03+00:00</DateTime>
      <Duration>62</Duration>
      <Parameters>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAddressDelete</Value>
        </Parameter>
        <Parameter>
          <Name>SessionId</Name>
          <Value>2n6e82gmsg2khqsro2k7n3b1n6</Value>
        </Parameter>
        <Parameter>
          <Name>Address</Name>
          <Value>test@example.onsip.com</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>2n6e82gmsg2khqsro2k7n3b1n6</SessionId>
      <UserId>123456</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAddressDelete>
      <Organization>
        <OrganizationId>654321</OrganizationId>
        <AccountId>123456</AccountId>
        <Service>platform</Service>
        <Domain>example.onsip.com</Domain>
        <CallerId/>
        <CallerIdName/>
        <CallerIdNumber/>
        <Status>enabled</Status>
        <ExtendedDialing>false</ExtendedDialing>
        <E911Provisioning>false</E911Provisioning>
        <BusyLampField>false</BusyLampField>
        <Authenticated>false</Authenticated>
        <RegistrationLimit>0</RegistrationLimit>
        <Modified>2014-03-14T19:52:08+00:00</Modified>
        <Created>2014-03-14T19:52:08+00:00</Created>
        <Contact>
          <Name>Alice Applegate</Name>
          <Organization>OnSIP Test</Organization>
          <Address>55 Broad St</Address>
          <City>New York</City>
          <State>NY</State>
          <Zipcode>10004</Zipcode>
          <Country>United States of America</Country>
          <CountryId>207</CountryId>
          <Phone>1-212-456-7890</Phone>
          <Email>test@example.com</Email>
          <Modified>2014-03-14T19:52:08+00:00</Modified>
        </Contact>
      </Organization>
    </UserAddressDelete>
  </Result>
</Response>

User Address Edit

Update a UserAddress.

Authentication & Authorization

AuthenticationAuthorization
Authenticated Session Account Admin

Request Parameters

Required ParametersDescription
Action “UserAddressEdit”
SessionId Authenticated Session identifier.
Address The addresss that will be edited.
UserId A positive integer which references a unique User associated with the address.
Timeout A positive integer indicating the max length of time in seconds a call attempt is made.
Optional ParametersDefaultDescription
DefaultAddress If not set, no failover will be attempted. A failover SIP address to use in the event of a timeout or negative response.
Username The updated username portion of the address.  

Result Element Schema

UserAddressEdit.rnc:

UserAddressEdit.rng, UserAddress.rng, Address.rng, DefaultAddress.rng

Sample Request

cURL
1
2
3
curl -X POST --data \
'Action=UserAddressEdit&SessionId=2n6e82gmsg2khqsro2k7n3b1n6&UserId=123456&Timeout=60&Address=test@example.onsip.com' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
var data = new FormData();
data.append('Action', 'UserAddressEdit');
data.append('SessionId', '2n6e82gmsg2khqsro2k7n3b1n6');
data.append('Address', 'test@example.onsip.com');
data.append('UserId', '123456');
data.append('Timeout', '60');

var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://api.onsip.com/api', true);
xhr.onload = function () {
  console.log(this.responseText);
}
xhr.send(data);

Sample Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="UTF-8"?>
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
  <Context>
    <Action>
      <IsCompleted>true</IsCompleted>
    </Action>
    <Request>
      <IsValid>true</IsValid>
      <DateTime>2014-04-21T15:24:06+00:00</DateTime>
      <Duration>37</Duration>
      <Parameters>
        <Parameter>
          <Name>Action</Name>
          <Value>UserAddressEdit</Value>
        </Parameter>
        <Parameter>
          <Name>SessionId</Name>
          <Value>2n6e82gmsg2khqsro2k7n3b1n6</Value>
        </Parameter>
        <Parameter>
          <Name>UserId</Name>
          <Value>123456</Value>
        </Parameter>
        <Parameter>
          <Name>Timeout</Name>
          <Value>60</Value>
        </Parameter>
        <Parameter>
          <Name>Address</Name>
          <Value>test@example.onsip.com</Value>
        </Parameter>
        <Parameter>
          <Name>Username</Name>
          <Value>test</Value>
        </Parameter>
        <Parameter>
          <Name>Name</Name>
          <Value>test</Value>
        </Parameter>
      </Parameters>
    </Request>
    <Session>
      <IsEstablished>true</IsEstablished>
      <SessionId>2n6e82gmsg2khqsro2k7n3b1n6</SessionId>
      <UserId>123456</UserId>
      <Roles>
        <Role>
          <Name>Account Admin</Name>
        </Role>
      </Roles>
    </Session>
  </Context>
  <Result>
    <UserAddressEdit>
      <UserAddress>
        <UserId>123456</UserId>
        <AuthUsername>test</AuthUsername>
        <AuthPassword>authpassword</AuthPassword>
        <Timeout>60</Timeout>
        <E911LocationId/>
        <DoNotDisturb>false</DoNotDisturb>
        <Address>
          <AddressId>246800</AddressId>
          <Username>test</Username>
          <Domain>example.onsip.com</Domain>
          <Type>user</Type>
          <Name>test</Name>
          <Modified>2014-04-21T15:22:42+00:00</Modified>
          <Created>2014-04-21T15:22:42+00:00</Created>
          <CplText>&lt;cpl xmlns=&quot;urn:ietf:params:xml:ns:cpl&quot;/&gt;</CplText>
        </Address>
      </UserAddress>
      <Organization>
        <OrganizationId>654321</OrganizationId>
        <AccountId>67890</AccountId>
        <Service>platform</Service>
        <Domain>example.onsip.com</Domain>
        <CallerId/>
        <CallerIdName/>
        <CallerIdNumber/>
        <Status>enabled</Status>
        <ExtendedDialing>false</ExtendedDialing>
        <E911Provisioning>false</E911Provisioning>
        <BusyLampField>false</BusyLampField>
        <Authenticated>false</Authenticated>
        <RegistrationLimit>0</RegistrationLimit>
        <Modified>2014-03-14T19:52:08+00:00</Modified>
        <Created>2014-03-14T19:52:08+00:00</Created>
        <Contact>
          <Name>Alice Applegate</Name>
          <Organization>OnSIP Test</Organization>
          <Address>55 Broad St</Address>
          <City>New York</City>
          <State>NY</State>
          <Zipcode>10004</Zipcode>
          <Country>United States of America</Country>
          <CountryId>207</CountryId>
          <Phone>1-212-456-7890</Phone>
          <Email>alice@example.com</Email>
          <Modified>2014-03-14T19:52:08+00:00</Modified>
        </Contact>
      </Organization>
    </UserAddressEdit>
  </Result>
</Response>

Topics: Developer Docs