listAllCalls()

This application returns list of calls in any state. Only calls made under authenticated customer are returned. Root customer receives full list.


The application supports trusted mode and i_customer parameter should be supplied in this case (mandatory for trusted mode starting from 5.0)


Parameters:

  • recursive - Should the calls of subcustomers be included in the returned list (new in post 1.7.1). Boolean. Optional. Default: True
  • i_account - Return only calls which belong to the specified account. Integer. Optional. (Available starting in 2020)
  • i_vendor - Return only calls which are currently routed via a connection belonging to the specified vendor. Integer. Optional. (Available starting in 2020)
  • i_connection - Return only calls which are currently routed via the specified connection. This parameter takes precedence over the i_vendor parameter. Integer. Optional. (Available starting in 2020)
  • order - How to order calls. String. Optional. (Available Starting in 2020). Possible values:
    • oldest_first (default)
    • oldest_last
    • longest_first
    • longest_last
  • node_id - Return calls only for specific node_id. String. Optional. (Available in FreightSwitch)


Trusted Mode:

In trusted mode the i_customer integer parameter must be used to specify under which access rights this application should execute (as of >=5.0)

Returns:

  • list of dictionaries. Here is an example of returned value in Python syntax:


       {
    'CLI' : '801',
    'I_CONNECTION' : 1,
    'CLD' : '812',
    'CALL_ID' : 'd84b2a8b-44f79741@192.168.0.11',
    'DELAY' : 6.102700465,
    'DURATION' : 0,
    'CC_STATE' : 'ARComplete',
    'I_ACCOUNT' : 3,
    'ID' : '960',
    'I_CUSTOMER' : '1',
    'I_ENVIRONMENT' : '1',
    'CALLER_MEDIA_IP' : '192.168.22.7',
    'CALLEE_MEDIA_IP' : '192.168.22.54',
    'SETUP_TIME' : '20210822T10:11:52.000',
    'DIRECTION' : 'vendor',
    'NODE_ID' : 'node-12345678'

    },
    {
    'CLI' : '10545',
    'I_CONNECTION' : 1,
    'CLD' : '123456',
    'CALL_ID' : 'c80634fb-6f7ad6fd@192.168.0.22',
    'DELAY' : 2.233400465,
    'DURATION' : 22.704463777,
    'CC_STATE' : 'Connected',
    'I_ACCOUNT' : 223,
    'ID' : '944',
    'I_CUSTOMER' : '1',
    'I_ENVIRONMENT' : '1',
    'CALLER_MEDIA_IP' : '192.168.22.2',
    'CALLEE_MEDIA_IP' : '192.168.22.49',
    'SETUP_TIME' : '20210822T10:12:52.000',
    'DIRECTION' : 'onnet_in',
    'NODE_ID' : 'node-12345678'
    }



  • XMLRPC fault in case of any error.


CC_STATE statuses and their description:


Idle - the call has been received and the processing of the call has been started.

WaitAuth - authentication procedure has started but is not yet completed.

WaitRoute - authentication has been done successfully, the b2bua is waiting for routing information.

ARComplete - authentication and routing have been completed, the b2bua tries to establish a connection.

Connected - both call legs have connected successfully. The conversation is in progress.

Disconnecting - the call is being disconnected.

Dead - the call has been disconnected successfully. B2bua waits for late requests and responses which might have been delayed.


Data types of values in the dictionary:


CLIString
I_CONNECTIONInteger
CLDString
CALL_IDString
DELAYDouble
DURATIONDouble
CC_STATEString
I_CUSTOMERInteger
I_ENVIRONMENTInteger
I_ACCOUNTInteger
IDString
CALLER_MEDIA_IPString
CALLEE_MEDIA_IPString
DIRECTIONString
NODE_ID*String
SETUP_TIME**String


* Available in FreightSwitch

** Available in 2022


listActiveCalls()

This is the same as the listAllCalls application, but returns the call list containing calls in states Connected, ARComplete or WaitRoute? only.


disconnectCall()

This application is used to disconnect an active call.


Parameters:

  • ID - ID of the call to disconnect (see the listAllCalls application). String. Required.

Returns:

  • result - OK means that disconnect request was sent successfully
  • result - Call not found or not accessible - means that disconnect cannot be initiated
  • XMLRPC fault in case of any error.

disconnectAccount() (new in post 1.7.1)

This application is used to disconnect all active calls of a given account. 


Top level customer could also issue this API call for any account in his hierarchy, including accounts of his subcustomers.


Parameters:

  • i_account - Integer. Required.

Returns:

  • result - OK means that disconnect request was sent successfully
  • count - number of disconnected sessions
  • XMLRPC fault in case of any error.

getAccountCallStats() (new in 2.1)

This application is used to get aggregated statistics of active calls in the softswitch. This is a lightweight API call and it is recommended to be used instead of listAllCalls() or listActiveCalls() when summary only is needed. 

This method could run only under root customer, and all calls of Accounts under subcustomers are returned as well.


Parameters:

None

Returns:

  • result - OK
  • data - dictionary of the following format:

    {
i_account : [ <total calls>, <connected calls> ]
    }

  • XMLRPC fault in case of any error.

getAccountCallStatsCustomer() (new in 2024, FreightSwitch)

This application behaves same as getAccountCallStats but only call stats of accounts that belong to the customer are returned.


Parameters:

None


Trusted mode:

In trusted mode the i_customer integer parameter is required to retrieve call stats.


Returns:

  • result - OK
  • data - dictionary of the following format:
    { i_account : [ <total calls>, <connected calls> ] }

disconnectCustomer() (since 5.2)

This application is used to disconnect all active calls of a given customer. All calls of accounts that belong to the customer and all descendant subcustomers will be dropped.

Top level customer could also issue this API call for any subcustomer in his hierarchy, including customers of his subcustomers.


Parameters:

  • i_customer - ID of customer. Integer. Required.


Trusted mode:

In trusted mode the i_wholesaler integer parameter can be used to specify under which access rights this application should execute.


Returns:

  • result - OK means that all calls were disconnected successfully
  • count - number of disconnected calls
  • XMLRPC fault in case of any error