Session Detail Record

SDRBrowse

Returns information about a group of Session Detail Records or SDRs. SDRs are generated for all calls, including calls to and from the PSTN and SIP to SIP calling.

Authentication & Authorization

Authentication Authorization
Authenticated Session Standard User

Request Parameters

Required Parameters Description
Action “SdrBrowse”
SessionId Authenticated Session identifier.
One and Only One of the Following Required 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.
One and Only One of the Following Optional Parameters Default Description
MonthOffset 0 A month offset into the history. 0 = current month, -1 = last month, -2 = two months ago, …
StartDateTime & EndDateTime NA GNU DateTime range; StartDateTime <= DateTime < EndDateTime
StartSdrId & EndSdrId NA SdrId range; StartSdrId <= SdrId < EndSdrId
Optional Parameters Default Description
OrderBy DateTime SdrId | StartTIme | EndTime | FromUri | ToUri
OutputFormat xml xml | csv
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.
LastSeen  NA Given an SdrId, lets you view Sdrs starting from that Id onward (non-inclusive).
Reverse false Used in conjunction with LastSeen, allows you to view Ids before the LastSeen Id instead of after.

Sample Request

cURL
1
2
3
4
curl -X POST \
--data \
'Action=SdrBrowse&SessionId=iusj9dslgivu5vqsm28qq330k6&StartDateTime=2016-07-06T13:35:13%2B00:00&EndDateTime=2016-07-13T21:02:19%2B00:00&Limit=2&Offset=0&CalcFound=true&UserId=152255' \
https://api.onsip.com/api
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var data = new FormData();
data.append('Action', 'SdrBrowse');
data.append('SessionId', 'iusj9dslgivu5vqsm28qq330k6');
data.append('StartDateTime', '2016-07-06T13:35:13+00:00');
data.append('EndDateTime', '2016-07-13T21:02:19+00:00');
data.append('Limit', '2'); data.append('Offset', '0'); data.append('CalcFound', 'true'); data.append('UserId', '152255');
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
110
111
112
113
114
115
116
<Response xmlns="http://www.jnctn.net/ns/rest/2006-01">
   <Context>
      <Action>
         <IsCompleted>true</IsCompleted>
      </Action>
      <Request>
         <IsValid>true</IsValid>
         <DateTime>2017-01-17T15:58:17+00:00</DateTime>
         <Duration>121</Duration>
         <Parameters>
            <Parameter>
               <Name>Action</Name>
               <Value>SdrBrowse</Value>
            </Parameter>
            <Parameter>
               <Name>SessionId</Name>
               <Value>0flh2ug1v2l0dmo3le5i60tj05</Value>
            </Parameter>
            <Parameter>
               <Name>StartDateTime</Name>
               <Value>2016-07-06T13:35:13+00:00</Value>
            </Parameter>
            <Parameter>
               <Name>EndDateTime</Name>
               <Value>2016-07-13T21:02:19+00:00</Value>
            </Parameter>
            <Parameter>
               <Name>Limit</Name>
               <Value>2</Value>
            </Parameter>
            <Parameter>
               <Name>Offset</Name>
               <Value>0</Value>
            </Parameter>
            <Parameter>
               <Name>CalcFound</Name>
               <Value>true</Value>
            </Parameter>
            <Parameter>
               <Name>UserId</Name>
               <Value>152255</Value>
            </Parameter>
            <Parameter>
               <Name>OrderBy</Name>
               <Value>StartTime DESC, SdrId DESC</Value>
            </Parameter>
         </Parameters>
      </Request>
      <Session>
         <IsEstablished>true</IsEstablished>
         <SessionId>0flh2ug1v2l0dmo3le5i60tj05</SessionId>
         <UserId>152255</UserId>
         <Roles>
            <Role>
               <Name>Account Admin</Name>
            </Role>
         </Roles>
      </Session>
   </Context>
   <Result>
      <SdrBrowse>
         <Sdrs Limit="2" Count="30" LengthTotal="1741" LengthTotalCdrSeconds="2940" NonBillableSeconds="1741">
            <Sdr>
               <SdrId>128065338</SdrId>
               <CallId>uf2vrtpcr3d29o8v5qrp</CallId>
               <CallerDisplay>"test2"</CallerDisplay>
               <CallerAddress>sip:test2@onsnip.onsip.com</CallerAddress>
               <CallerContact>sip:ld06ffgc*bu6ppq7iavel.invalid_ovobe250881355_ovidb141b9c4@199.7.173.101;transport=ws;ob;gr</CallerContact>
               <CallerAccountId />
               <CallerOrganizationId />
               <CallerUserId />
               <CallerOrganizationService />
               <CalleeDisplay />
               <CalleeAddress>sip:james@onsnip.onsip.com</CalleeAddress>
               <CalleeContact>sip:jv5jrpv1*cefi7it2sq0n.invalid_ovob1474b556f4_ovida298ce75@199.7.173.102;transport=ws;gr</CalleeContact>
               <CalleeAccountId>22543</CalleeAccountId>
               <CalleeOrganizationId>25018</CalleeOrganizationId>
               <CalleeUserId>152255</CalleeUserId>
               <CalleeOrganizationService>hosted</CalleeOrganizationService>
               <StartTime>2016-07-13T21:01:52+00:00</StartTime>
               <EndTime>2016-07-13T21:02:08+00:00</EndTime>
               <ConfirmedTime>2016-07-13T21:01:55+00:00</ConfirmedTime>
               <Duration>16</Duration>
               <ConfirmedDuration>13</ConfirmedDuration>
               <Disposition>Answered</Disposition>
               <Created>2016-07-13T21:03:04+00:00</Created>
            </Sdr>
            <Sdr>
               <SdrId>128063909</SdrId>
               <CallId>gqr6se2bsndjaeq358os</CallId>
               <CallerDisplay>"test2"</CallerDisplay>
               <CallerAddress>sip:test2@onsnip.onsip.com</CallerAddress>
               <CallerContact>sip:f1r1r0k7*igvqusprhno8.invalid_ovobf6e4c41ee0_ovidb141b9c4@199.7.173.101;transport=ws;ob;gr</CallerContact>
               <CallerAccountId />
               <CallerOrganizationId />
               <CallerUserId />
               <CallerOrganizationService />
               <CalleeDisplay />
               <CalleeAddress>sip:james@onsnip.onsip.com</CalleeAddress>
               <CalleeContact>sip:jv5jrpv1*cefi7it2sq0n.invalid_ovob1474b556f4_ovida298ce75@199.7.173.102;transport=ws;gr</CalleeContact>
               <CalleeAccountId>22543</CalleeAccountId>
               <CalleeOrganizationId>25018</CalleeOrganizationId>
               <CalleeUserId>152255</CalleeUserId>
               <CalleeOrganizationService>hosted</CalleeOrganizationService>
               <StartTime>2016-07-13T20:59:08+00:00</StartTime>
               <EndTime>2016-07-13T20:59:24+00:00</EndTime>
               <ConfirmedTime>2016-07-13T20:59:14+00:00</ConfirmedTime>
               <Duration>16</Duration>
               <ConfirmedDuration>10</ConfirmedDuration>
               <Disposition>Answered</Disposition>
               <Created>2016-07-13T21:00:03+00:00</Created>
            </Sdr>
         </Sdrs>
      </SdrBrowse>
   </Result>
</Response>

Topics: Developer Docs