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@203.0.113.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 | String | 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 | String | 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 | String | 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 |
| sourceIPType | String | Type of source IP server |
| destinationIPType | String | Type of destination IP server |
| sourceCustomerName | String | Name of source customer, if available. |
| destinationCustomerName | String | Name of destination customer, if available. |
Note that properties holding no value may be omitted from the object.
Response example
{ "callId": "123465743567845918237459354653@203.0.113.7", "relatedCallId": "563745935465788123465743234591@198.51.100.50", "aNumber": "+4500000001", "aNumberPrivacy": "0", "bNumber": "+4500000002", "divertedBy": "", "sbcServer": "203.0.113.3", "sourcePeer": "Telenor", "destinationPeer": "SuperTel", "rtpProxyId": "1", "rtpProxyFlags": "rip", "sourceIP": "198.51.100.50", "destinationIP": "203.0.113.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": "650000000000000000000301", "sourceVoiceAccountId": "650000000000000000000302", "sourceRatePlanId": "650000000000000000000303", "destinationCustomerId": "", "userName": "Example User", "userLocation": "CPH", "userExtension": "211", "rtpStat": "2534,4634,23,7,2", "sourceIPType": "pbx", "sourceCustomerName": "Example Customer A/S" }
Errors
| Error code | Message | Description |
|---|---|---|
| 404 | id | Session not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sbc/session/get.txt · Last modified: by Mikkel Meerwaldt Jørgensen