exportVendorsCDRs_Mera()
Notice:
Since version Sippy 2020 start_date has default value 1 hour ago and end_date has value now.
This application is used to export CDRs of all vendors into Mera format. Exported CDRs can be used for external billing.
Parameters:
- start_date - fetch CDRs from start_date, format is '%H:%M:%S.000 GMT %a %b %d %Y' (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String. Otpional.
- end_date - fetch CDRs till end_date, format is '%H:%M:%S.000 GMT %a %b %d %Y' (e.g. 09:57:29.000 GMT Wed Nov 18 2009). String. Otpional.
- start_i_cdrs_connection - fetch CDRs having i_cdrs_connection >= start_i_cdrs_connection. String. Optional.
- end_i_cdrs_connection - fetch CDRs having i_cdrs_connection < end_i_cdrs_connection. String. Optional.
Returns:
- result - OK means that query was successfully. String.
- last_i_cdrs_connection - i_cdrs_connection of the latest CDR. String.
- cdrs - an array of strings:
HOST=<switch-ip>,CONFID=<conf-id>,CALLID=<call-id>,SRC-IP=<src-ip>,DST-IP=<dst-ip>,SRC-NAME=<src-name>,DST-NAME=<dst-name>,SRC-NUMBER-IN=<src-number-from-orig>,SRC-NUMBER-BILL=<src-number-user-for-routing>,SRC-NUMBER-OUT=<src-number-to-term>,DST-NUMBER-IN=<dst-number-from-orig>,DST-NUMBER-BILL=<dst-number-user-for-routing>,DST-NUMBER-OUT=<dst-number-to-term>,SETUP-TIME=<setup-time>,CONNECT-TIME=<connect-time>,DISCONNECT-TIME=<disconnect-time>,ELAPSED-TIME=<duration>,DISCONNECT-CODE-Q931=<disconnect-cause>
Trusted mode
This function supports trusted mode. In this case i_customer=1 should be passed in addition to the parameters mentioned above.
Here is parameters mapping into SSP database:
HOST - IP-address of the switch CONFID - calls.call_id CALLID - cdrs_connections.i_cdrs_connection SRC-IP - cdrs.remote_ip DST-IP - connections.destination SRC-NAME - accounts.username DST-NAME - vendors.name SRC-NUMBER-IN - cdrs.cli_in SRC-NUMBER-BILL - calls.cli SRC-NUMBER-OUT - cdrs_connections.cli_out DST-NUMBER-IN - cdrs.cld_in DST-NUMBER-BILL - calls.cld DST-NUMBER-OUT - cdrs_connections.cld_out SETUP-TIME - cdrs_connections.setup_time CONNECT-TIME - cdrs_connections.connect_time DISCONNECT-TIME - cdrs_connections.disconnect_time ELAPSED-TIME - cdrs_connections.duration DISCONNECT-CODE-Q931 - sipErrToH323Err[cdrs_connections.result]