freeswitch連線postgres資料庫

2021-07-24 16:55:17 字數 1791 閱讀 9097

1.安裝postgres資料庫,並啟動。省略安裝過程。

2。在freeswitch所在伺服器安裝postgresql-devel.

3.配置修改和編譯。

在modules.conf中開啟pg_cdr vim modules.conf

event_handlers/mod_cdr_pg_csv
在fs原始碼目錄下面 執行

./configure --enable-core

-pgsql

-support

如果一切正常,重新編譯安裝。

make mod_cdr_pg_csv-install
value="pgsql://hostaddr=0.0.0.0     dbname=fs_db user=fs_dba password='123456'"/>
cdr_pg_csv.conf.xml 檔案 修改如下:

value="host=0.0.0.0   user=fs_dba password=*dbname=fs_db connect_timeout=10" />
並且要手動建立表cdr,這個有點奇怪,不知道為什麼fs不能自動建立這個表

建表語句:

create

table cdr (

id serial primary

key,

local_ip_v4 inet not

null,

caller_id_name varchar,

caller_id_number varchar,

destination_number varchar

notnull,

context varchar

notnull,

start_stamp timestamp

with

time

zone

notnull,

answer_stamp timestamp

with

time

zone,

end_stamp timestamp

with

time

zone

notnull,

duration int

notnull,

billsec int

notnull,

hangup_cause varchar

notnull,

uuid uuid not

null,

bleg_uuid uuid,

accountcode varchar,

read_codec varchar,

write_codec varchar,

sip_hangup_disposition varchar,

ani varchar

);

Freeswitch連線SIP電話

本篇主要介紹如何用freeswitch連線sip freeshswitch最典型的應用是作為乙個伺服器 背靠背的使用者 並用 客戶端軟體 一般叫軟 連線到它。可以通過如下命令看下埠占用情況 freeswitch 預設配置了1000 1019共20個使用者,你可以隨便選擇乙個使用者進行配置。注意 密碼...

FreeSwitch連線語音閘道器配置及使用場景

freeswitch連線語音閘道器配置及使用場景 簡介 在學習的過程中需要使用fs和語音閘道器連線,通過sip接入運營商呼到手機或者固話。尤其是在人工催收 電銷外呼中需要在freeswitch中使用sip和運營商對接達到指定號碼落地的效果,簡單描述如下 對接方式 簡單介紹一下,freeswitch裡...

FreeSWITCH模組載入

一 模組介面 freeswitch的大部分功能是通重載入外部的模組來實現的。模組通過乙個資料結構向外部暴露了自己的介面。該資料結構定義如下 typedef struct switch loadable module function table switch loadable module func...