Extracting Call Traces with the API

The best resource is to use a GET method on https://tmedia.com:12358/call_trace

By default this will return the IDs of last 10 call legs. Unless you have set a different value in the same session.

To modify the number of results use the nb_result parameter.

Add Parameters using the following format:

http://tmedia.com:12358/resource_url?parameter_a=1#parameter_b=2

Like So:

https://tmedia.com:12358/call_trace?nb_result=20

To get full information on each leg add the parameter recursive=yes

https://tmedia.com:12358/call_trace?nb_result=20#recursive=yes

To get older information specify your page number, where 1 is the most recent calls.

https://tmedia.com:12358/call_trace?page=2&recursive=yes&nb_result=20

To get different information you can use different filters by adding them as parameters.

https://tmedia.com:12358/call_trace?start=2025-03-03 00:00:00&end=2025-03-03 16:59:59&page=2&recursive=yes&terminate_reason=Not Normal&nb_result=20

Available Parameters:

Parameter
Valid Input

page

Integer (e.g., 1, 2, 3). Specifies the page number for paginated results. Defaults to 1 if omitted.

nb_result

Integer (e.g., 1 through 100). Sets the number of results per page. Omitting this paramter can cause problems.

start

DateTime string in YYYY-MM-DD HH:MM:SS format (e.g., 2025-03-03 00:00:00). Filters calls starting after this time.

end

DateTime string in YYYY-MM-DD HH:MM:SS format (e.g., 2025-03-03 23:59:59). Filters calls ending before this time. Omitting this paramter can cause problems.

called

String (e.g., 1234567890). The called phone number or SIP URI. Omit this parameter for no filter.

calling

String (e.g., 0987654321). The calling phone number or SIP URI. Omit this parameter for no filter.

nap

String (e.g., nap1). NAP Name. Omit this parameter for no filter.

route

String (e.g., routeA). Call route identifier. Omit this parameter for no filter.

protocol

String (e.g., SIP, SS7, CAS, or ISDN). Call protocol. Omit this parameter for no filter.

direction

Integer, 1 = Incoming, 2 = Outgoing, 3 = Mixer, or 4 = MediaOnly). Call direction. Empty string means no filter.

recorded

String (e.g., Recorded, Not Recorded). Indicates if the call was recorded . Empty string means no filter.

call_state

String (e.g., Active, Inactive). Call status. Empty string means no filter.

leg_id

String (e.g., 0x2D9E9DDE). Unique ID of a call leg. Empty string means no filter.

call_duration

String (e.g., 300). Call duration in seconds. Empty string means no filter.

terminate_reason

String (e.g., Normal, Not Normal, Manually Removed, or custom string: 206, 404 etc..).Empty string means no filter.

mos

String (e.g., 4.5). Mean Opinion Score (Float 0.0-5.0 for call quality). Empty string means no filter.

network_quality

Calls will be filtered based on a network quality equal to or less than that specified. Range from 1 to 100 Comparison operators can be used to modify the field behavior: x : Will return all calls with a value greater than x x-y : Will return all calls with a value between x and y <x : Will return all calls with a value less than x. Equivalent to 'x' alone

call_id

String (e.g., [email protected]). Unique call identifier . Empty string means no filter.

intercepted

String (e.g., Intercepted, Not Intercepted, All). Indicates if the call was intercepted Empty string means no filter.

interception_liid

String (e.g., LIID123). Lawful Interception ID . Empty string means no filter.

interception_leg

String (e.g., 0= Not Interception Leg,1` = Interception Leg). Intercepted call leg identifier. Empty string means no filter.

Last updated

Was this helpful?