[Freeswitch-dev] multiple sql template in cdr_csv_conf.xml

Chandra Adhikari chandraadhikari91 at gmail.com
Wed Jul 13 10:56:09 MSD 2016


Hi All'

can i set multiple sql template in cdr_csv_conf.xml???

like this:

<configuration name="cdr_csv.conf" description="CDR CSV Format">
  <settings>
    <!-- 'cdr-csv' will always be appended to log-base -->
    <!--<param name="log-base" value="/var/log"/>-->
    <!--<param name="default-template" value="example"/>-->
    <param name = "default-template" value = "sql" />
    <!-- This is like the info app but after the call is hung up -->
    <!--<param name="debug" value="true"/>-->
    <param name="rotate-on-hup" value="true"/>
    <!-- may be a b or ab -->
    <param name="legs" value="a"/>
        <!-- Only log in Master.csv -->
        <!-- <param name="master-file-only" value="true"/> -->
  </settings>
  <templates>
  <template name="sql">INSERT INTO cdr VALUES
("${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}",
"${accountcode}");</template>

   <template name="sql">INSERT INTO csv VALUES ('${client_id}',
'${user_id}','${destination_number}','${caller_id_number}',
'${start_stamp}','${end_stamp}','${answer_stamp}','${duration}','${ivr_duration}','${transfer_duration}',
'${first_dtmf}', '${vmrecuri}', '${callrecording_file}', '${action}',
'${agent}', '${project_id}', '${level}', '${ruleid}', '${sticky_flag}',
'NORMAL'</template>
  </configuration>

Warm regards
Chandra Adhikari
+91 8377939169
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20160713/cba20ef3/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-dev mailing list