FreeSWITCH及VOIP,Openser,电话机器人等产品中文技术资讯、交流、沟通、培训、咨询、服务一体化网络。QQ群:293697898
配置文件
<configuration name="nwayacd.conf" description="nway acd control module for FreeSWITCH">
<settings>
<param name="dbstring" value="user=postgres dbname=records password=Nway2017 host=127.0.0.1 port=5432 sslmode=disable"/>
<param name="license-file" value="/etc/nway/acd_license.txt"/>
<param name="log_dir" value="/opt/fsgui/mod_log"/>
<param name="jn-prefix" value="/home/voices/prefix.wav"/>
<!--报工号前缀语音-->
<param name="jn-suffix" value="/home/voices/suffix.wav"/>
<!--报工号后缀语音-->
<!-- 以下为工号数字音-->
<param name="jn-0" value="/home/voices/0.wav"/>
<param name="jn-1" value="/home/voices/1.wav"/>
<param name="jn-2" value="/home/voices/2.wav"/>
<param name="jn-3" value="/home/voices/3.wav"/>
<param name="jn-4" value="/home/voices/4.wav"/>
<param name="jn-5" value="/home/voices/5.wav"/>
<param name="jn-6" value="/home/voices/6.wav"/>
<param name="jn-7" value="/home/voices/7.wav"/>
<param name="jn-8" value="/home/voices/8.wav"/>
<param name="jn-9" value="/home/voices/9.wav"/>
<param name="default-blacklistwav" value="/home/blacklist.wav"/>
<!--默认黑名单语音-->
<param name="default-agent-busy" value="/home/busy.wav"/>
<!--默认忙语音-->
<param name="default-agent-transfer" value="/home/transfer.wav"/>
<!--默认转接语音-->
<param name="recover-seconds" value="300"/>
<!--从记录态恢复到空闲态时间长度,默认 300秒5分钟-->
<param name="recover-auto" value="true"/>
<!--自动由模块切换记录态到空闲态-->
<param name="noanwser-to-ready" value="false"/>
<!-- 呼转不应答是否自动转为空闲态,默认为一定要座席手工-->
<param name="typing-auto" value="true"/>
<!--自动将接听的座席状态切换为记录态-->
<param name="auto-answer" value="true"/>
<!--要求座席侧由系统送过来即自动应答,sip_auto_answer及对ip话机的-->
<param name="video-codecs" value="PCMA,H264"/>
<!--送给座席的编码,含语音编码,配置是不是视频客服在数据库中use_video字段-->
<param name="debug" value="true"/>
<param name="asr-str" value="dsr $1 ab"/>
<!--当座席接通时,要调用的识别的字符串,相当于 execute_on_answer=dsr $1 ab
ab则代表是ab两路,还可以a 或b-->
<param name="use-asr" value="true"/>
<!--当座席接通时,是否要使用asr进行识别,true为识别,false为不识别-->
<param name="local-ip" value="172.34.22.122"/>
<!--定义每台服务器的ip,用于排队中 -->
<param name="output_sql" value="true"/>
<!--定义每台服务器的ip,用于排队中 -->
</settings>
</configuration>
数据库相关部分
```sql
---------座席组表
CREATE SEQUENCE public.ext_group_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ext_group_id_seq
OWNER TO postgres;
CREATE SEQUENCE public.ext_group_map_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.ext_group_map_id_seq
OWNER TO postgres;
--固定座席组
CREATE TABLE public.ext_group
(
id bigint NOT NULL DEFAULT nextval('ext_group_id_seq'::regclass),
group_name character varying(100), -- 组或座席组名
group_number character varying(50), -- 座席组短号
current_ext_number character varying(50) ,-- 当前组里接听时找到的分机,如果找不到,则再从头开始
group_call_mode integer DEFAULT 5 ,-- 呼叫模式 ...
transfer_ring character varying(255) DEFAULT '::character varying,
black_list_ring character varying(255) DEFAULT '::character varying,
busy_ring character varying(255) DEFAULT '::character varying,
group_callout_timeout integer DEFAULT 15 -- 呼叫到每个号码时的超时时长,默认15秒
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.ext_group
OWNER TO postgres;
COMMENT ON TABLE public.ext_group
IS '分机座席分组,面向12345业务';
COMMENT ON COLUMN public.ext_group.group_name IS '组或座席组名';
COMMENT ON COLUMN public.ext_group.group_number IS '座席组短号';
COMMENT ON COLUMN public.ext_group.current_ext_number IS '当前组里接听时找到的分机,如果找不到,则再从头开始';
COMMENT ON COLUMN public.ext_group.group_call_mode IS '呼叫模式 0 顺序,1 随机,2 循环,3 记忆优先+ 0 ,4 记忆优先+1 ,5 记忆优先+2';
COMMENT ON COLUMN public.ext_group.group_callout_timeout IS '呼叫到每个号码时的超时时长,默认15秒';
--动态座席组和座席对应表
CREATE TABLE public.ext_group_map
(
id bigint NOT NULL DEFAULT nextval('ext_group_map_id_seq'::regclass),
ext_group_id bigint, -- 分机组id
ext_group_number character varying(50), -- 座席组号码
ext character varying(50) -- 分机
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.ext_group_map
OWNER TO postgres;
COMMENT ON COLUMN public.ext_group_map.ext_group_id IS '分机组id';
COMMENT ON COLUMN public.ext_group_map.ext_group_number IS '座席组号码';
COMMENT ON COLUMN public.ext_group_map.ext IS '分机';
----------------------------------------------------------------------
----排队
----------------------------------------------------------------------
CREATE SEQUENCE public.callin_queue_id_seq
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
CACHE 1;
ALTER TABLE public.callin_queue_id_seq
OWNER TO postgres;
CREATE TABLE public.callin_queue
(
id bigint NOT NULL DEFAULT nextval('callin_queue_id_seq'::regclass),
callin_number character varying(50), -- 呼入号码
callin_group character varying(50), -- 呼入组
callin_type integer DEFAULT 0, -- 0为普通,1为VIP
call_time timestamp without time zone DEFAULT now() ,-- 开始排队时间
call_uuid character varying(50) DEFAULT '::character varying -- 一条独立的uuid,用来找到该呼叫
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.callin_queue
OWNER TO postgres;
COMMENT ON TABLE public.callin_queue
IS '呼入但座席忙的情况下,进行排队,排队则是先进先出';
COMMENT ON COLUMN public.callin_queue.callin_number IS '呼入号码';
COMMENT ON COLUMN public.callin_queue.callin_group IS '呼入组';
COMMENT ON COLUMN public.callin_queue.callin_type IS '0为普通,1为VIP';
COMMENT ON COLUMN public.callin_queue.call_time IS '开始排队时间';
COMMENT ON COLUMN public.callin_queue.call_uuid IS '一条独立的uuid,用来找到该呼叫';
```