[Freeswitch-svn] [commit] r13252 - freeswitch/trunk/scripts/contrib/swk/php/esl_cdr

FreeSWITCH SVN silik0n at freeswitch.org
Thu May 7 09:40:37 PDT 2009


Author: silik0n
Date: Thu May  7 11:40:37 2009
New Revision: 13252

Log:
ooops

Modified:
   freeswitch/trunk/scripts/contrib/swk/php/esl_cdr/esl_cdr.php

Modified: freeswitch/trunk/scripts/contrib/swk/php/esl_cdr/esl_cdr.php
==============================================================================
--- freeswitch/trunk/scripts/contrib/swk/php/esl_cdr/esl_cdr.php	(original)
+++ freeswitch/trunk/scripts/contrib/swk/php/esl_cdr/esl_cdr.php	Thu May  7 11:40:37 2009
@@ -58,49 +58,50 @@
 			}
 		}
 
-        $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, ".
-	"hangup_cause, start_stamp, answer_stamp, progress_media_stamp, end_stamp, duration, billsec, progress_mediasec, billmin, ".
-	"carrier_id, cust_cost, carrier_cost)".
-	"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)",
-	$data['Unique-ID'],
-	$data['acctcode'],
-	$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']),
-	$data['Caller-Network-Addr'],
-	$data['Channel-Read-Codec-Name']."-". $data['Channel-Read-Codec-Rate'],
-	$data['Channel-Write-Codec-Name']."-". $data['Channel-Write-Codec-Rate'],
-	urlencode($data['Caller-Caller-ID-Name']),
-	$data['Caller-Caller-ID-Number'],
-	$data['variable_switch_r_sdp'],
-	$data['variable_switch_m_sdp'],
-	$data['variable_originate_disposition'],
-	$data['variable_bridge_to'],
-	$data['variable_endpoint_disposition'],
-	$data['variable_sip_hangup_disposition'],
-	$data['variable_sip_term_cause'],
-	$data['variable_hangup_cause'],
-	urldecode($data['variable_start_stamp']) . '-05',
-	isset($data['variable_answer_stamp'])?'\''. urldecode($data['variable_answer_stamp']) . '-05\'':'null',
-	urldecode($data['variable_progress_media_stamp']) . '-05',
-	urldecode($data['variable_end_stamp']) . '-05',
-	$data['variable_duration'],
-	$data['variable_billsec'],
-	$data['variable_progress_mediasec'],
-	$data['variable_billsec'],
-	"0",
-	"0",
-	"0"
-	);
-
-	$inserted = $dbh->exec($insert);
-	if ($inserted < 1){
-		die($db->errorInfo());
+        	$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, ".
+		"hangup_cause, start_stamp, answer_stamp, progress_media_stamp, end_stamp, duration, billsec, progress_mediasec, billmin, ".
+		"carrier_id, cust_cost, carrier_cost)".
+		"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)",
+		$data['Unique-ID'],
+		$data['acctcode'],
+		$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']),
+		$data['Caller-Network-Addr'],
+		$data['Channel-Read-Codec-Name']."-". $data['Channel-Read-Codec-Rate'],
+		$data['Channel-Write-Codec-Name']."-". $data['Channel-Write-Codec-Rate'],
+		urlencode($data['Caller-Caller-ID-Name']),
+		$data['Caller-Caller-ID-Number'],
+		$data['variable_switch_r_sdp'],
+		$data['variable_switch_m_sdp'],
+		$data['variable_originate_disposition'],
+		$data['variable_bridge_to'],
+		$data['variable_endpoint_disposition'],
+		$data['variable_sip_hangup_disposition'],
+		$data['variable_sip_term_cause'],
+		$data['variable_hangup_cause'],
+		urldecode($data['variable_start_stamp']) . '-05',
+		isset($data['variable_answer_stamp'])?'\''. urldecode($data['variable_answer_stamp']) . '-05\'':'null',
+		urldecode($data['variable_progress_media_stamp']) . '-05',
+		urldecode($data['variable_end_stamp']) . '-05',
+		$data['variable_duration'],
+		$data['variable_billsec'],
+		$data['variable_progress_mediasec'],
+		$data['variable_billsec'],
+		"0",
+		"0",
+		"0"
+		);
+	
+		$inserted = $dbh->exec($insert);
+		if ($inserted < 1){
+			die($db->errorInfo());
+		}
 	}
 }
 ?> 



More information about the Freeswitch-svn mailing list