提交 544f077e authored 作者: Ken Rice's avatar Ken Rice

ooops

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/contrib@13252 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fa89c26a
...@@ -58,49 +58,50 @@ for(;;) { ...@@ -58,49 +58,50 @@ for(;;) {
} }
} }
$insert = sprintf("INSERT into cdr (uuid, acctcode, ani, e164_ani, dnis, translated_dnis, e164_dnis, src_host, read_codec, write_codec, clid_name, ". $insert = sprintf("INSERT into cdr (uuid, acctcode, ani, e164_ani, dnis, translated_dnis, e164_dnis, src_host, read_codec, write_codec, clid_name, ".
"clid_number, src_sdp, dest_sdp, originate_disposition, bridge_to_uuid, endpoint_disposition, sip_hangup_disposition, term_cause, ". "clid_number, src_sdp, dest_sdp, originate_disposition, bridge_to_uuid, endpoint_disposition, sip_hangup_disposition, term_cause, ".
"hangup_cause, start_stamp, answer_stamp, progress_media_stamp, end_stamp, duration, billsec, progress_mediasec, billmin, ". "hangup_cause, start_stamp, answer_stamp, progress_media_stamp, end_stamp, duration, billsec, progress_mediasec, billmin, ".
"carrier_id, cust_cost, carrier_cost)". "carrier_id, cust_cost, carrier_cost)".
"VALUES". "VALUES".
"('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %s, '%s', '%s',". "('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %s, '%s', '%s',".
"%s, %s, %s, %s, %s, %s, %s)", "%s, %s, %s, %s, %s, %s, %s)",
$data['Unique-ID'], $data['Unique-ID'],
$data['acctcode'], $data['acctcode'],
$data['Caller-Caller-ID-Number'], $data['Caller-Caller-ID-Number'],
$data['Caller-Caller-ID-Number'], $data['Caller-Caller-ID-Number'],
urldecode($data['Caller-Destination-Number']), urldecode($data['Caller-Destination-Number']),
urldecode($data['Caller-Destination-Number']), urldecode($data['Caller-Destination-Number']),
urldecode($data['Caller-Destination-Number']), urldecode($data['Caller-Destination-Number']),
$data['Caller-Network-Addr'], $data['Caller-Network-Addr'],
$data['Channel-Read-Codec-Name']."-". $data['Channel-Read-Codec-Rate'], $data['Channel-Read-Codec-Name']."-". $data['Channel-Read-Codec-Rate'],
$data['Channel-Write-Codec-Name']."-". $data['Channel-Write-Codec-Rate'], $data['Channel-Write-Codec-Name']."-". $data['Channel-Write-Codec-Rate'],
urlencode($data['Caller-Caller-ID-Name']), urlencode($data['Caller-Caller-ID-Name']),
$data['Caller-Caller-ID-Number'], $data['Caller-Caller-ID-Number'],
$data['variable_switch_r_sdp'], $data['variable_switch_r_sdp'],
$data['variable_switch_m_sdp'], $data['variable_switch_m_sdp'],
$data['variable_originate_disposition'], $data['variable_originate_disposition'],
$data['variable_bridge_to'], $data['variable_bridge_to'],
$data['variable_endpoint_disposition'], $data['variable_endpoint_disposition'],
$data['variable_sip_hangup_disposition'], $data['variable_sip_hangup_disposition'],
$data['variable_sip_term_cause'], $data['variable_sip_term_cause'],
$data['variable_hangup_cause'], $data['variable_hangup_cause'],
urldecode($data['variable_start_stamp']) . '-05', urldecode($data['variable_start_stamp']) . '-05',
isset($data['variable_answer_stamp'])?'\''. urldecode($data['variable_answer_stamp']) . '-05\'':'null', isset($data['variable_answer_stamp'])?'\''. urldecode($data['variable_answer_stamp']) . '-05\'':'null',
urldecode($data['variable_progress_media_stamp']) . '-05', urldecode($data['variable_progress_media_stamp']) . '-05',
urldecode($data['variable_end_stamp']) . '-05', urldecode($data['variable_end_stamp']) . '-05',
$data['variable_duration'], $data['variable_duration'],
$data['variable_billsec'], $data['variable_billsec'],
$data['variable_progress_mediasec'], $data['variable_progress_mediasec'],
$data['variable_billsec'], $data['variable_billsec'],
"0", "0",
"0", "0",
"0" "0"
); );
$inserted = $dbh->exec($insert); $inserted = $dbh->exec($insert);
if ($inserted < 1){ if ($inserted < 1){
die($db->errorInfo()); die($db->errorInfo());
}
} }
} }
?> ?>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论