Configuration files that need to be modified:
Switch.conf.xml//Core table
Cdr_pg_csv.conf.xml//Call historydb.conf.xml//Core table
voicemail.conf.xml//message-related tables
internal.xml//
external.xml//
fifo.conf.xml//fifo Related tables
callcenter.conf.xml//callcenter Program-related tables.
1,Switch.conf.xml
<param name= "Core-db-dsn" value= "pgsql://host=localhost dbname=freeswitch user=freeswitch password= ' password ' Options= '-C client_min_messages=notice ' application_name= ' FreeSWITCH ' "/>
2,cdr_pg_csv.conf.xml
<param name= "Db-info" value= "Host=localhost user=freeswitch password=nopassword dbname=freeswitch connect_timeout =10 "/> <param name=" db-table "value=" Xml_cdr "/>
3 , Db.conf.xml, voicemail.conf.xml, internal.xml, external.xml, fifo.conf.xml, callcenter.conf.xml
<param name= "Odbc-dsn" value= "pgsql://host=localhost dbname=freeswitch user=freeswitch password= ' password ' Options= '-C client_min_messages=notice ' application_name= ' FreeSWITCH ' "/>
or Add the following configuration to the Var.xml, and then go to annotate db.conf.xml,voicemail.conf.xml, Internal.xml, External.xml, Fifo.conf.xml, callcenter.conf.xml "<param name=" Odbc-dsn " value=" $${dsn "/>"
<x-pre-process cmd= "Set" Data= "dsn=pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password= ' Password ' options= '-c client_min_messages=notice ' application_name= ' FreeSWITCH ' "/><x-pre-process cmd=" set " Data= "dsn_callcenter=pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password= ' password ' options= '-C Client_min_messages=notice ' application_name= ' FreeSWITCH ' "/>
< Span style= "Color:rgb (63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;background-color:rgb (255,255,255);" > "Attached" XML_CDR built-in SQL and cdr_pg_csv.conf.xml field Settings
< Span style= "Color:rgb (63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;background-color:rgb (255,255,255);" >
create table "public". " Xml_cdr " (" UUID " uuid not null," Domain_uuid " uuid," Extension_uuid " uuid," Domain_ Name " text COLLATE " Default "," AccountCode " text COLLATE " Default "," direction " text COLLATE "Default", "Default_language" text COLLATE "Default", "Context" text COLLATE "Default", "Xml_cd" text COLLATE "Default", "JSON" &NBSP;JSONB, " Caller_id_name " text COLLATE " Default "," Caller_id_number " text COLLATE " Default " , "Source_number" text COLLATE "Default", "Destination_number" text COLLATE " Default "," Start_epoch " numeric," Start_stamp " timestamp (6)," Answer_stamp " timestamp (6)," Answer_ Epoch " numeric," End_epoch " numeric," End_stamp " text COLLATE " Default "," duration " numeric, "Mduration" numeric, "Billsec" numeric, "Billmsec" numeric, "Bridge_uuid" text& NBsp collate "Default", "Read_codec" text COLLATE "Default", "Read_rate" text collate "Default", "Write_codec" text COLLATE "Default", "Write_rate" text COLLATE " Default "," Remote_media_ip " text COLLATE " Default "," Network_addr " text COLLATE " Default "," Recording_file " text COLLATE " Default "," Leg " char (1) COLLATE " Default " , "Pdd_ms" numeric, "Rtp_audio_in_mos" numeric, "Last_app" text COLLATE "Default", "Last_ Arg " text COLLATE " Default "," Cc_side " text COLLATE " Default "," Cc_member_uuid " uuid, "Cc_queue_joined_epoch" text COLLATE "Default", "Cc_queue" text collate "Default", "Cc_member_session_uuid" uuid, "cc_agent" text COLLATE "Default", "Cc_agent_ Type " text COLLATE " Default "," Waitsec " numeric," Conference_name " text collate "Default", "CoNference_uuid " uuid," conference_member_id " text COLLATE " Default "," Digits_dialed " text collate "Default", "Pin_number" text COLLATE "Default", "Hangup_cause" text COLLATE "Default", "hangup_cause_q850" numeric, "Sip_hangup_disposition" text collate "Default",constraint "Xml_cdr_pkey" PRIMARY KEY ("UUID") with (Oids=false); alter table "public". " Xml_cdr " OWNER TO " FreeSWITCH ";
</settings> <schema> <field var= "UUID"/> <field var= "Domain_uuid"/> <field var= "domain_name"/> <field var= "AccountCode"/> <field var= " Direction "/> <field var=" Default_language "/> < Field var= "Context"/> <field var= "XML_CDR"/> <!-- <field var= "local_ip_v4"/> --> <field var= " Caller_id_name "/> <field var=" Caller_id_number "/> <field var= "Destination_number"/> <field var= "Start_epoch"/> <field var= "Start_stamp"/> <field var= " Answer_stamp "/> &Nbsp; <field var= "Answer_epoch"/> <field var= "End_epoch"/> <field var= "End_stamp"/> <field var= " Duration "/> <field var=" Mduration "/> <field var= "Billsec"/> <field var= "Billmsec"/> < Field var= "Bridge_uuid"/> <!-- <field var= "Bleg_uuid"/> --> <field var= "Read_codec"/> <field var= "Read_rate"/> <field var= "Write_codec"/> <field var= "Write_rate"/> <field var= "Remote_media_ip"/> <field var= "Network_addr"/> <field var= " Recording_file "/> ≪field var= "Leg"/> <field var= "Pdd_ms"/> <field var= "Last_app"/> <field var= "Last_arg"/> <field var= "Cc_side"/> <field var= "Cc_member_uuid"/> <field var= "Cc_queue_joined_epoch"/> <field var= " Cc_queue "/> <field var=" Cc_member_session_uuid "/> <field var= "Cc_agent"/> <field var= "Cc_agent_type"/> <field var= "Waitsec"/> <field var= "Conference_name"/> <field var= "Conference_uuid"/> <field var= " conference_member_id "/> <field var=" digits_dialed "/> <field&nbsP;var= "Hangup_cause"/> <field var= "hangup_cause_q850"/> <field var= "Sip_hangup_disposition"/> <!-- <field var= "Sip_hangup_disposition"/> --> <!-- <field var= "ani"/> --> </schema>
This article is from the "Toss Notes" blog, make sure to keep this source http://908405.blog.51cto.com/898405/1950318
FreeSWITCH Toss notes 3--database modified to PostgreSQL