Export vendor CDRs in MERA format
Цей контент ще не доступний вашою мовою.
exportVendorsCDRs_Mera exports the CDRs of all vendor connections as text lines in the MERA CDR format. Use it to feed an external billing or reconciliation system that reads this format. Each line describes one call leg sent to a vendor.
The method supports trusted mode with i_customer, which must be 1, the root customer.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
start_date |
string | no | Export CDRs from this time, UTC, in the format %H:%M:%S.000 GMT %a %b %d %Y, for example 09:57:29.000 GMT Wed Nov 18 2009 |
end_date |
string | no | Export CDRs up to this time, same format as start_date |
start_i_cdrs_connection |
string | no | Export CDRs whose i_cdrs_connection is greater than or equal to this value |
end_i_cdrs_connection |
string | no | Export CDRs whose i_cdrs_connection is less than this value |
To export incrementally, keep last_i_cdrs_connection from each response and pass a greater value as start_i_cdrs_connection next time.
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
last_i_cdrs_connection |
string | i_cdrs_connection of the latest CDR exported |
cdrs |
array | The CDRs, each a string of comma-separated KEY=value pairs, see the line format |
Line format
Section titled “Line format”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-in>,SRC-NUMBER-BILL=<src-number-bill>,SRC-NUMBER-OUT=<src-number-out>,DST-NUMBER-IN=<dst-number-in>,DST-NUMBER-BILL=<dst-number-bill>,DST-NUMBER-OUT=<dst-number-out>,SETUP-TIME=<setup-time>,CONNECT-TIME=<connect-time>,DISCONNECT-TIME=<disconnect-time>,ELAPSED-TIME=<duration>,DISCONNECT-CODE-Q931=<disconnect-cause>| Key | Value |
|---|---|
HOST |
IP address of the switch |
CONFID |
SIP Call-ID of the call |
CALLID |
i_cdrs_connection, the ID of the vendor CDR |
SRC-IP |
IP address the call came from |
DST-IP |
Destination of the vendor connection |
SRC-NAME |
User name of the account that made the call |
DST-NAME |
Name of the vendor |
SRC-NUMBER-IN |
CLI as received from the caller |
SRC-NUMBER-BILL |
CLI after the incoming translation rules, used for routing and billing |
SRC-NUMBER-OUT |
CLI sent to the vendor |
DST-NUMBER-IN |
CLD as received from the caller |
DST-NUMBER-BILL |
CLD after the incoming translation rules, used for routing and billing |
DST-NUMBER-OUT |
CLD sent to the vendor |
SETUP-TIME |
Setup time of the vendor leg |
CONNECT-TIME |
Connect time of the vendor leg |
DISCONNECT-TIME |
Disconnect time of the vendor leg |
ELAPSED-TIME |
Duration of the vendor leg |
DISCONNECT-CODE-Q931 |
Q.931 disconnect cause mapped from the SIP result of the vendor leg |
Example
Section titled “Example”call("exportVendorsCDRs_Mera", { "start_date": "00:00:00.000 GMT Thu Jan 15 2026", "end_date": "00:00:00.000 GMT Fri Jan 16 2026",}){ "result": "OK", "last_i_cdrs_connection": "902211", "cdrs": [ "HOST=192.0.2.1,CONFID=3c2a7f1e-90b4@192.0.2.10,CALLID=902211,SRC-IP=192.0.2.10," "DST-IP=198.51.100.20,SRC-NAME=1001,DST-NAME=Carrier A," "SRC-NUMBER-IN=01632960001,SRC-NUMBER-BILL=441632960001,SRC-NUMBER-OUT=441632960001," "DST-NUMBER-IN=01632960123,DST-NUMBER-BILL=441632960123,DST-NUMBER-OUT=441632960123," "SETUP-TIME=…,CONNECT-TIME=…,DISCONNECT-TIME=…,ELAPSED-TIME=125,DISCONNECT-CODE-Q931=16", ],}Related
Section titled “Related”- Call records (CDRs): Vendors Call Records in the panel
- Vendors
- Get CDRs of an account