网关配置

介绍

支持给网关指定变量,设置网关的语音编码编码和主叫号码。网关配置编辑后,不能实时生效 ,需要执行sofia命令才可以生效,具体看SIP设置。

配置

cti_gateway@domain [哈希表]

  1. key 网关名字
  2. value 网关配置
{
"param": {
"register": "true",
"caller-id-in-from": "true",
"realm": "180.76.224.191:35560",
"from-user": "",
"destination-prefix": "",
"username": "mytrunk",
"password": "mytrunk@ddt"
},
"variables": {
"sip_sticky_contact": "true"
}
}

gateway_template.png

  • param 网关参数
    • realm 网关服务器IP
    • username 网关用户名
    • password 网关密码
    • register 是否需要注册
    • destination-prefix 报号前缀,呼叫时被叫号码之前添加这个前缀
    • from-user 对接IMS时需要,根据IMS要求填写,一般和username设置一样
    • from-domain 对接IMS时需要,根据IMS要求填写,一般和realm设置一样
    • caller-id-in-from sip信令from设置为主叫号码
    • extension extension parameter influence the contents of channel variable Caller-Destination-Number and destination_number. If it is blank, Caller-Destination-Number will always be set to gateway’s username. If it has a value, Caller-Destination-Number will always be set to this value. If it has value auto_to_user, Caller-Destination-Number will be populated with value ${sip_to_user} which means the real dialled number in case of an inbound call.
    • extension-in-contact Param “extension-in-contact” is used to force what the contact info will be in the registration. If you are having a problem with the default registering as gw+gateway_name@ip you can set this to true to use extension@ip. If extension is blank, it will use username@ip.
    • auth-username 认证用户名,如果认证用户名和用户名不一样时需要配置
    • retry-seconds this sets the number of seconds to retry the registration
    • expire-seconds 注册的过期时间,如果不设置,默认是 3600,建议设置60。
  • variables 网关变量
    • absolute_codec_string 声音编码
    • p:caller_id_number 主叫号码
    • sip_sticky_contact 为了防止NAT环境出问题,都设置为true