api:sbc:session:get
Table of Contents
API : SBC Session Get
Introduction
This request will return a session. A session is the realtime data we holds about an ongoing call.
Request
| URL | https://api.telecomx.dk/sbc/session/SESSION_ID | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER_ADMIN with TELE feature, or ADMIN. | |
| Param | SESSION_ID | CallId of the session to return. |
Query examples
https://api.telecomx.dk/sbc/session/56375632547476357536@23.34.33.74
Response
| JSON object | ||
|---|---|---|
| callId | String | Call-ID from the SIP request |
| relatedCallId | String | Related-Call-ID from the SIP request as set by the VPBX if this call is to be bound to another inbound call |
| aNumber | String | E.164 number of the caller or anonymous |
| aNumberPrivacy | Number | 1 if caller number should be hidden, 0 if not |
| bNumber | String | E.164 number that is being called |
| divertedBy | String | E.164 number that diverted the call |
| sbcServer | String | IP address of the SBC server that created the session/handles the session |
| sourcePeer | String | Id of peer request was received from, if received from a peer |
| destinationPeer | String | Id of peer request was sent to, if destination was a peer |
| rtpProxyId | Number | Id of the RTP proxy used |
| rtpProxyFlags | String | Flags for the RTP proxy used |
| sourceIP | String | IP address that initiated the call - made the INVITE |
| destinationIP | String | IP address that the request was sent to |
| direction | String | 'I' for calls received from a peer, 'O' for calls received from a trusted host |
| mobileOriginated | Number | 1 if call originated from a mobile device, 0 if not - see X-MO: 1 SIP header |
| mvno | String | Name of mvno provider that the call is coming from or going to, blank if non-mvno |
| mvnoData | String | additional data from the MVNO, if TDC, then prefix, if Telenor then accountcode |
| started | Date | DateTime in UTC of when the call started - INVITE received |
| answered | Date | DateTime in UTC of when the call was answered by the remote end - 200 OK received |
| ended | Date | DateTime in UTC of when the call ended - BYE/CANCEL/Terminating ErrorCode received |
| endedReason | String | BYE or CANCEL or 4xx, 5xx or 6xx SIP error code, BLOCKED, BLACKLISTED or FRAUD |
| endedBy | String | A for caller, B for callee (whoever sends the CANCEL or BYE) or F for fraud or S for system |
| userAgent | String | User agent string from host that initiated the call |
| sourceCustomerId | String | Id of the customer |
| sourceVoiceAccountId | String | Id of the voice account that made the call (if outbound) |
| sourceRatePlanId | String | Id of the rate plan used for the call |
| destinationCustomerId | String | Id of the customer the request was sent to, if destination is internal |
| userName | String | Name of the person who made the call/owns the number/phone |
| userLocation | String | Name of the users location |
| userExtension | String | Extension number of the user/device that made the call |
| rtpStat | String | RTP statistics |
Note that properties holding no value may be omitted from the object.
Response example
{ callId: '123465743567845918237459354653@8.7.6.7', relatedCallId: '563745935465788123465743234591@80.198.52.50', aNumber: '+4581808888', aNumberPrivacy: '0', bNumber: '+4580808080', divertedBy: '', sbcServer: '2.1.1.3', sourcePeer: 'Telenor', destinationPeer: 'SuperTel', rtpProxyId: '1', rtpProxyFlags: 'rip', sourceIP: '80.198.52.50', destinationIP: '8.7.6.5', direction: 'O', mobileOriginated: '1', mvno: 'Telenor', mvnoData: '54563657663', started: '2014-01-01T12:00:00.000Z', answered: '2014-01-01T12:00:05.000Z', ended: '2014-01-01T12:05:00.000Z', endedReason: 'BYE', endedBy: 'A', userAgent: 'myPBX 12.3beta7', sourceCustomerId: '1234567890ABCDEF12345678', sourceVoiceAccountId: '1234567890ABCDEF12345678', sourceRatePlanId: '1234567890ABCDEF12345678', destinationCustomerId: '', userName: 'Per', userLocation: 'CPH', userExtension: '211', rtpStat: '2534,4634,23,7,2' }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Session id not found in request URI |
| 404 | id | Session not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sbc/session/get.txt · Last modified: 2023/10/30 21:41 by Per Møller