首页 > 其他分享 >FreeSWITCH 启用多域(多租户)的配置

FreeSWITCH 启用多域(多租户)的配置

时间:2023-02-08 15:46:19浏览次数:37  
标签:xml domain name 租户 配置 用户 多域 FreeSWITCH

如果将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"/>

 

标签:xml,domain,name,租户,配置,用户,多域,FreeSWITCH
From: https://www.cnblogs.com/kn-zheng/p/17101988.html

相关文章

  • FreeSWITCH 安装配置的 各种坑, 填坑
    个人安装环境:OS:CentOS6.764位FreeSWITCHVer:1.6.17 一.编译出错安装之前,最好先安装这几个东西(如果有,请忽略):yasm(有nasm的话不用装这个),opus-dev......
  • apply-register-acl 参数允许FreeSWITCH分机注册/拨打不验证密码
    今天调试发现注册的分机的`Auth-User`居然是`unknown`!!!怎么回事?仔细对比检查发现,internalprofile指定了`apply-register-acl`的参数,值为`domain`,......
  • FreeSWITCH 使用SSL-WebSocket-WebRTC
    阿里上买的域名,申请了个免费ssl,然后开始折腾,,,,申请了ssl证书,但是不提供.pem格式的下载(*/ω\*)然后把一堆提供的都下载下来了, 然后又到网上搜crt/cer......
  • FreeSwitch启用WEBRTC小记
    FS启用webrtc:(可以使用自签发的root证书或申请免费的域名证书!以便使用websip)1、创建证书,用自签发的证书或申请域名证书都可以2、生成wss证书,放FS的相应目录:windows是.......
  • FreeSWITCH 使用 lua 脚本 接管 分机注册,鉴权等
    FreeSWITCH使用lua脚本接管分机注册,鉴权等1.更改lua.conf.xml配置<configurationname="lua.conf"description="LUAConfiguration"><settings><!--......
  • freeswitch智能语音开发之ASR
    ASR(AutomaticSpeechRecognition)自动语音识别技术是一种将人的语音转换为文本的技术。一、freeswitch如何使用asrfreeswitch提供两个app功能detect_speech和play_and_de......
  • 配置Freeswitch(mod_unimrcp)与百度Mrcp Server实现实时语音识别(ASR)
    前面我们已经搭建好了百度MrcpServer服务器,接下来我们将Freeswitch与unimrcpserver两者连接起来,配置百度unimrcpserver的文章大家去这里看一下:搭建百度MrcpServer与Fr......
  • freeSwitch入门
    简单使用windows安装FreeSwitch自己的电脑系统是xubuntu22.10UbuntuKineticKudu(developmentbranch)版本,linx安装FreeSwitch需要自己编译安装,里面安装编......
  • Freeswitch 对接 unimrcpserver ASR调用
    freeswitch部署的系统版本:Centos6.9x64unimrcp部署版本:RedHat6.4x86(32)**对接前提:freeswitch已经编译并且安装了mod_unimrcp模块unimrcp已经部署好**如果以......
  • FreeSwitch Hangup-Cause电话挂断原因速查
    Freeswitch官网太慢了,经常还打不开,把电话挂断原因大全复制一份到这里,方便日常查看ITU-TQ.850CodeSIPEquiv.EnumerationCauseDescription0 UNSPECIFIEDUnspec......