FreeSWITCH折騰筆記3——資料庫修改為postgresql

來源:互聯網
上載者:User

標籤:freeswitch pgsql

需要修改的設定檔:

switch.conf.xml //核心表 

cdr_pg_csv.conf.xml //通話記錄 db.conf.xml //核心表 
voicemail.conf.xml //留言相關的表 
internal.xml // 
external.xml // 
fifo.conf.xml //fifo相關的表 
callcenter.conf.xml //callcenter程式相關的表。


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‘"/>

或者在var.xml追加以下配置,然後去注釋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‘" />


【附】xml_cdr建表sql及cdr_pg_csv.conf.xml 欄位設定


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" 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 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"/>    <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 var="hangup_cause"/>    <field var="hangup_cause_q850"/>    <field var="sip_hangup_disposition"/>    <!-- <field var="sip_hangup_disposition"/> -->    <!-- <field var="ani"/> -->  </schema>




本文出自 “折騰筆記” 部落格,請務必保留此出處http://908405.blog.51cto.com/898405/1950318

FreeSWITCH折騰筆記3——資料庫修改為postgresql

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.