如果将FreeSWITCH用于云端, 支持大规模并发呼叫, 就要用到 多域/多租户 技术了, FreeSWITCH 本身可以直接支持.

每个域可以单独, 拥有相同的分机号也互相打不通, 各自线路, IVR , 路由等不相同.

配置方式如下:

1. conf/vars.xml

<X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}" />
<X-PRE-PROCESS cmd="set" data="domain_name=$${domain}" />

这里配置了 默认 domain(名字), 启用域(多租户)之后就没什么用啦.

2. conf/sip_profile/internal.xml

<!--all inbound reg will look in this domain for the users -->
<param name="force-register-domain" value="$${domain}"/>
<!--force the domain in subscriptions to this value -->
<param name="force-subscription-domain" value="$${domain}"/>
<!--all inbound reg will stored in the db using this domain -->
<param name="force-register-db-domain" value="$${domain}"/>

三个 强制参数, 注释掉, 重启该 profile.

<可以建立多个 profile>

3. conf/directory/default.xml

<include>
<!--the domain or ip (the right hand side of the @ in the addr-->
<domain name="$${domain}">

这个 domain 指定了 此用户目录配置适用于哪个 domain(名字) (默认$${domain}是vars.xml中配置的)

可以建立多个 domain 的配置(如 复制多份,每份各自配置domain_name),
这样 就有了多个域了(name 配置成指定的 domain_name)
多个域,最好每个域都有各自的用户目录及用户配置(主要是有各自的用户配置)
相应的,用户配置的加载也要改:

<users>
<X-PRE-PROCESS cmd="include" data="default/*.xml"/>
</users>

<另,要让各自域中的用户使用(各自)单独的 Dialplan 进行路由,还要改用户配置中的 user_context 参数>

4. conf/directory/default/<user>.xml

要让各自域中的用户使用(各自)单独的 Dialplan 进行路由,还要改用户配置中的 user_context 参数

<variables>
<variable name="user_context" value="default"/>

<这时候,就要相应的 增加 路由了, 否则没有路由, 也是打不通的>

5. conf/dialplan/default.xml

<include>
<context name="default">

复制这个dialplan,并更改 context_name , 与用户配置中设置的相对应

6. reloadxml, 注册,拨打测试

7. 启用域之后, 拨打就不能在使用了 `user/1000` 这样的缩写形式了,

必须使用完整形式: `user/1000@${domain_name}`
在使用 会议, fifo 等应用时,也要写完整形式,
即: 启用域(多租户)之后,拨打用户就要写完整(带域名)的了,不然就找不到用户了

8. 还可以将不同的域(租户)分到不同的 Sofia Profile 中,可以使不同的 profile 使用不同的端口了

使用端口注意:

不同的profile 要额外注意 ws 的端口, 否则可能 造成 profile启动失败, 但是 莫名其妙的不知道 为嘛失败(sip端口没有占用啊.呵呵)

    <!-- for sip over websocket support -->
<param name="ws-binding" value=":5066"/> <!-- for sip over secure websocket support -->
<!-- You need wss.pem in $${certs_dir} for wss or one will be created for you -->
<param name="wss-binding" value=":7443"/>

最新文章

  1. Android APK的安装
  2. C#学习笔记-icon托盘图标的简单知识
  3. Storm实战:在云上搭建大规模实时数据流处理系统(Storm+Kafka)
  4. 12. 星际争霸之php设计模式--模板模式
  5. maven项目修改java编译版本的方式
  6. Sql Server 简单查询 异步服务器更新语句
  7. 解决由于一个软件限制策略的阻止,windows无法运行此程序cmd.reg
  8. 【英语】Bingo口语笔记(41) - 有关爱情的表达
  9. jquery放大镜
  10. 跨域资源共享 CORS 详解
  11. [Regular Expressions] Match the Start and End of a Line
  12. Java日志工具之SLF4J
  13. 接口测试——httpclient介绍与请求方式详解
  14. &lt;c:forEach items=&quot;${list}&quot; var=&quot;tt&quot; varStatus=&quot;status&quot;&gt; 的相关大小长度
  15. Python大婶博客汇总
  16. 北京大学Cousera学习笔记--7-计算导论与C语言基础--基本数据类型&amp;变量&amp;常量
  17. flutter Row 垂直或水平放置多个widget
  18. 系统性能--CPU
  19. bzoj千题计划198:bzoj1084: [SCOI2005]最大子矩阵
  20. SpagoBI 教程 Lesson 5: Creating a dashboard with BIRT and SpagoBI

热门文章

  1. psoc4的中断笔记
  2. linux各个文件作用
  3. div,css常用技术
  4. Oracle12c之 CDB数据库中数据字典架构
  5. snmp 介绍和Ubuntu安装使用
  6. hadoop中的一次集群任务执行超时问题查找过程
  7. 20181122_C#中AOP初探_装饰器模式的AOP_Remoting实现AOP_Castle实现AOP
  8. 第三章 k8s cluster环境创建
  9. 【HDU】2222 Keywords Search(AC自动机)
  10. AIX存储LV PV VG (转载)