FreeSWITCH GUI (fs图形化配置程序介绍)
介绍一个我最近开发的 FreeSWITCH GUI 程序。程序架构 配置客户端 <-> REDIS <-> mod_cti<-> FreeSWITCH。客户端,把配置文件,以JSON方式存到REDIS,mod_cti 通过实switch_xml_bind_search_function(cti_redis_xml_fetch, SWITCH_XML_SECTIO
介绍一个我最近开发的 FreeSWITCH GUI 程序。程序架构 配置客户端 <-> REDIS <-> mod_cti <-> FreeSWITCH。
客户端,把配置文件,以JSON方式存到REDIS,mod_cti 通过实 switch_xml_bind_search_function(cti_redis_xml_fetch, SWITCH_XML_SECTION_DIRECTORY | SWITCH_XML_SECTION_DIALPLAN | SWITCH_XML_SECTION_CONFIG, NULL), 再FreeSWITCH需要读取XML的时候,实时把REDIS存储的JSON配置转换成XML对象,实现大部分配置(分机,拨号方案)实时生效。而且非常高效,支持群集部署。
配置客户端使用了配置模板功能,可以实现FreeSWITCH所有XML的图形化配置。
和其他图形化配置的区别,大部分图像化配置界面,使用mod_cur_xml接口,请求处理能力差,不支持大并发使用,而且可扩展性不好,自定义界面 难度高。
我这个接口,使用json和redis,方便客户开发自己的web配置界面,非常适合FreeSWITCH二次开发使用。就是专为FreeSWITCH二次开发准备的。
使用了REDIS存储配置,redis的高性能,大大提高FreeSWITCH的处理能力。
1 分机模板
2 sofia模板
3 网关模板
4 拨号方案
先介绍这么多,以慢慢详细介绍各项功能。
分机模板JSON
{
"name": "root",
"children": [
{
"name": "attribute",
"display": "属性",
"children": [
{
"name": "number-alias",
"restor": true,
"display": "别名",
"input_candidate": "",
"input_type": "string",
"input_filter": "wav(*.wav)",
"editable": true,
"type": "string",
"value": ""
},
{
"name": "cacheable",
"restor": true,
"display": "缓存",
"editable": true,
"type": "string",
"input_type": "string"
}
],
"input_type": "string",
"type": "folder",
"editable": false,
"help": "",
"value": "",
"input_echomode": 2,
"input_mask": "",
"input_candidate": ""
},
{
"name": "param",
"display": "参数",
"children": [
{
"name": "password",
"restor": true,
"input_echomode": 2,
"display": "密码",
"editable": true,
"help": "",
"input_candidate": "",
"input_type": "string",
"type": "string",
"input_mask": ""
},
{
"name": "auth-acl",
"restor": true,
"display": "auth-acl",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "localnet.auto",
"input_selectonly": false
},
{
"name": "allow-empty-password",
"restor": true,
"display": "allow-empty-password",
"editable": true,
"type": "boolean",
"input_type": "boolean",
"help": "",
"value": "0"
},
{
"name": "sip-forbid-register",
"restor": true,
"display": "禁止注册",
"type": "boolean",
"editable": true,
"input_type": "boolean"
},
{
"name": "user-agent-filter",
"restor": true,
"display": "user-agent-filter",
"editable": true,
"type": "string",
"input_type": "string"
},
{
"name": "max-registrations-per-extension",
"restor": true,
"display": "max-registrations-per-extension",
"type": "number",
"editable": true,
"input_type": "integer",
"help": "最大注册终端个数"
}
],
"input_type": "string",
"type": "folder",
"editable": true,
"help": ""
},
{
"name": "variable",
"display": "变量",
"children": [
{
"name": "effective_caller_id_name",
"restor": true,
"display": "主叫名字",
"input_type": "string",
"input_filter": "wav(*.wav)",
"type": "string",
"editable": true
},
{
"name": "effective_caller_id_number",
"restor": true,
"display": "主叫号码",
"input_type": "string",
"type": "string",
"editable": true
},
{
"name": "user_context",
"restor": true,
"display": "呼叫路由",
"value": "",
"type": "string",
"input_type": "string",
"editable": true,
"children": [],
"help": "",
"input_candidate": "redis_hash_keys.cti_dialplan_context",
"input_selectonly": true
},
{
"name": "sip-force-expires",
"restor": true,
"type": "number",
"editable": true,
"input_type": "integer",
"display": "sip-force-expires",
"value": ""
},
{
"name": "sip-force-contact",
"restor": true,
"display": "sip-force-contact",
"editable": true,
"type": "string",
"input_type": "string",
"value": "NDLB-connectile-dysfunction-2.0",
"input_candidate": "NDLB-connectile-dysfunction-2.0,NDLB-tls-connectile-dysfunction,NDLB-connectile-dysfunction,nat-connectile-dysfunction"
},
{
"name": "sip-force-user",
"restor": true,
"display": "sip-force-user",
"editable": true,
"type": "string",
"input_type": "string",
"help": ""
},
{
"name": "inbound-reg-force-matching-username",
"restor": true,
"display": "inbound-reg-force-matching-username",
"editable": true,
"type": "boolean",
"input_type": "boolean"
}
],
"input_type": "integer",
"type": "folder",
"help": ""
}
]
}
SIP模板JSON
{
"children": [
{
"name": "aliases",
"restor": true,
"type": "string",
"display": "aliases",
"value": "",
"editable": true,
"input_type": "array"
},
{
"name": "gateway",
"restor": true,
"display": "网关",
"editable": true,
"type": "string",
"input_type": "array",
"input_candidate": "all,redis_hash_keys.cti_gateway",
"input_selectonly": true
},
{
"name": "domains",
"restor": true,
"display": "domains",
"type": "folder",
"children": [
{
"name": "name",
"restor": true,
"display": "name",
"editable": true,
"type": "string",
"input_type": "string",
"value": ""
},
{
"name": "alias",
"restor": true,
"display": "alias",
"type": "string",
"editable": true,
"input_type": "boolean",
"value": "false"
},
{
"name": "parse",
"restor": true,
"display": "parse",
"type": "string",
"editable": true,
"input_type": "boolean",
"value": "false"
}
]
},
{
"name": "settings",
"restor": true,
"type": "folder",
"children": [
{
"name": "alias",
"restor": true,
"display": "alias",
"editable": true,
"type": "string"
},
{
"name": "shutdown-on-fail",
"restor": true,
"display": "shutdown-on-fail",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "user-agent-string",
"restor": true,
"display": "user-agent-string",
"editable": true,
"value": "ddtswitch",
"type": "string"
},
{
"name": "log-level",
"restor": true,
"display": "log-level",
"editable": true,
"type": "string",
"input_type": "integer"
},
{
"name": "debug",
"restor": true,
"display": "debug",
"type": "string",
"editable": true,
"input_type": "integer",
"value": "0"
},
{
"name": "sip-trace",
"restor": true,
"editable": true,
"display": "sip-trace",
"type": "string",
"value": "no"
},
{
"name": "sip-capture",
"restor": true,
"display": "sip-capture",
"editable": true,
"input_type": "string",
"value": "no"
},
{
"name": "context",
"restor": true,
"display": "路由",
"editable": true,
"type": "string",
"value": "",
"input_candidate": "redis_hash_keys.cti_dialplan_context",
"input_selectonly": true
},
{
"name": "dialplan",
"restor": true,
"display": "dialplan",
"type": "string",
"value": "XML",
"editable": true,
"input_type": "string"
},
{
"name": "sip-port",
"restor": true,
"display": "sip-port",
"editable": true,
"type": "string",
"input_type": "integer",
"value": "random",
"input_min": 1,
"input_max": 65535
},
{
"name": "sip-ip",
"restor": true,
"display": "sip-ip",
"editable": true,
"type": "string",
"input_type": "string",
"value": "$${local_ip_v4}"
},
{
"name": "rtp-ip",
"restor": true,
"display": "rtp-ip",
"editable": true,
"type": "string",
"input_type": "string",
"value": "$${local_ip_v4}"
},
{
"name": "ext-sip-ip",
"restor": true,
"display": "ext-sip-ip",
"editable": true,
"type": "string",
"value": "auto-nat",
"input_type": "string"
},
{
"name": "ext-rtp-ip",
"restor": true,
"display": "ext-rtp-ip",
"editable": true,
"type": "string",
"value": "auto-nat",
"input_type": "string"
},
{
"name": "tcp-keepalive",
"restor": true,
"display": "tcp-keepalive",
"editable": true,
"type": "string",
"input_type": "integer"
},
{
"name": "tcp-pingpong",
"restor": true,
"display": "tcp-pingpong",
"editable": true,
"type": "string"
},
{
"name": "tcp-ping2pong",
"restor": true,
"display": "tcp-ping2pong",
"editable": true,
"type": "string"
},
{
"name": "media-option",
"restor": true,
"display": "media-option",
"editable": true,
"input_candidate": "resume-media-on-hold,bypass-media-after-att-xfer,bypass-media-after-hold",
"type": "string"
},
{
"name": "inbound-bypass-media",
"restor": true,
"display": "inbound-bypass-media",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "inbound-proxy-media",
"restor": true,
"display": "inbound-proxy-media",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "disable-rtp-auto-adjust",
"restor": true,
"display": "disable-rtp-auto-adjust",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "ignore-183nosdp",
"restor": true,
"display": "ignore-183nosdp",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "enable-soa",
"restor": true,
"display": "enable-soa",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "t38-passthru",
"restor": true,
"display": "t38-passthru",
"editable": true,
"type": "string",
"input_type": "boolean",
"help": ""
},
{
"name": "inbound-codec-prefs",
"restor": true,
"display": "inbound-codec-prefs",
"editable": true,
"type": "string",
"input_type": "string",
"value": "$${global_codec_prefs}",
"help": ""
},
{
"name": "outbound-codec-prefs",
"restor": true,
"display": "outbound-codec-prefs",
"editable": true,
"type": "string",
"value": "$${outbound_codec_prefs}"
},
{
"name": "codec-prefs",
"restor": true,
"display": "codec-prefs",
"editable": true,
"type": "string"
},
{
"name": "inbound-codec-negotiation",
"restor": true,
"display": "inbound-codec-negotiation",
"editable": true,
"input_candidate": "generous,greedy,scrooge",
"type": "string",
"value": "generous",
"input_type": "string"
},
{
"name": "inbound-late-negotiation",
"restor": true,
"display": "inbound-late-negotiation",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": "true"
},
{
"name": "bitpacking",
"restor": true,
"display": "bitpacking",
"editable": true,
"type": "string"
},
{
"name": "disable-transcoding",
"restor": true,
"display": "disable-transcoding",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "renegotiate-codec-on-reinvite",
"restor": true,
"display": "renegotiate-codec-on-reinvite",
"type": "string",
"editable": true,
"input_type": "boolean"
},
{
"name": "stun-enabled",
"restor": true,
"display": "stun-enabled",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "stun-auto-disable",
"restor": true,
"display": "stun-auto-disable",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "apply-nat-acl",
"restor": true,
"display": "apply-nat-acl",
"editable": true,
"type": "string",
"input_type": "string",
"value": "nat.auto"
},
{
"name": "aggressive-nat-detection",
"restor": true,
"display": "aggressive-nat-detection",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": "true"
},
{
"name": "vad",
"restor": true,
"display": "vad",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "in,out,both"
},
{
"name": "suppress-cng",
"restor": true,
"display": "suppress-cng",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "supress-cng",
"restor": true,
"display": "supress-cng",
"editable": false
},
{
"name": "NDLB-force-rport",
"restor": true,
"display": "NDLB-force-rport",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "true,safe",
"value": "true"
},
{
"name": "NDLB-broken-auth-hash",
"restor": true,
"display": "NDLB-broken-auth-hash",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "NDLB-received-in-nat-reg-contact",
"restor": true,
"display": "NDLB-received-in-nat-reg-contact",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "NDLB-sendrecv-in-session",
"restor": true,
"display": "NDLB-sendrecv-in-session",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "NDLB-allow-bad-iananame",
"restor": true,
"display": "NDLB-allow-bad-iananame",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "inbound-use-callid-as-uuid",
"restor": true,
"display": "inbound-use-callid-as-uuid",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "outbound-use-uuid-as-callid",
"restor": true,
"display": "outbound-use-uuid-as-callid",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "tls",
"restor": true,
"display": "tls",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "tls-only",
"restor": true,
"display": "tls-only",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "tls-bind-params",
"restor": true,
"display": "tls-bind-params",
"editable": true,
"type": "string"
},
{
"name": "tls-cert-dir",
"restor": true,
"display": "tls-cert-dir",
"editable": true,
"type": "string"
},
{
"name": "tls-version",
"restor": true,
"display": "tls-version",
"editable": true,
"type": "string"
},
{
"name": "tls-passphrase",
"restor": true,
"display": "tls-passphrase",
"editable": true,
"type": "string"
},
{
"name": "tls-verify-date",
"restor": true,
"display": "tls-verify-date",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "tls-verify-policy",
"restor": true,
"display": "tls-verify-policy",
"editable": true,
"type": "string"
},
{
"name": "tls-verify-depth",
"restor": true,
"display": "tls-verify-depth",
"editable": true,
"type": "string"
},
{
"name": "tls-verify-in-subjects",
"restor": true,
"display": "tls-verify-in-subjects",
"editable": true,
"type": "string"
},
{
"name": "rfc2833-pt",
"restor": true,
"display": "rfc2833-pt",
"editable": true,
"type": "string",
"input_type": "string",
"value": "101"
},
{
"name": "dtmf-duration",
"restor": true,
"display": "dtmf-duration",
"editable": true,
"type": "string",
"value": "2000"
},
{
"name": "dtmf-type",
"restor": true,
"display": "dtmf-type",
"type": "string",
"editable": true,
"input_type": "string",
"input_candidate": "rfc2833,info,none"
},
{
"name": "pass-rfc2833",
"restor": true,
"display": "pass-rfc2833",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "liberal-dtmf",
"restor": true,
"display": "liberal-dtmf",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "enable-timer",
"restor": true,
"display": "enable-timer",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "session-timeout",
"restor": true,
"display": "session-timeout",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "enable-100rel",
"restor": true,
"display": "enable-100rel",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "minimum-session-expires",
"restor": true,
"display": "minimum-session-expires",
"editable": true,
"type": "string",
"input_type": "integer",
"input_min": 90
},
{
"name": "sip-options-respond-503-on-busy",
"restor": true,
"display": "sip-options-respond-503-on-busy",
"type": "string",
"editable": true,
"input_type": "boolean"
},
{
"name": "sip-force-expires",
"restor": true,
"display": "sip-force-expires",
"editable": true,
"type": "string",
"input_type": "integer"
},
{
"name": "sip-expires-max-deviation",
"restor": true,
"display": "sip-expires-max-deviation",
"editable": true,
"type": "string",
"input_type": "integer"
},
{
"name": "outbound-proxy",
"restor": true,
"display": "outbound-proxy",
"editable": true,
"type": "string",
"input_type": "string"
},
{
"name": "send-display-update",
"restor": true,
"display": "send-display-update",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "auto-jitterbuffer-msec",
"restor": true,
"display": "auto-jitterbuffer-msec",
"editable": true,
"type": "string",
"input_type": "integer",
"help": "Turn on a jitterbuffer for every call"
},
{
"name": "rtp-timer-name",
"restor": true,
"display": "rtp-timer-name",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "soft",
"value": "soft"
},
{
"name": "rtp-rewrite-timestamps",
"restor": true,
"display": "rtp-rewrite-timestamps",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "media_timeout",
"restor": true,
"display": "media_timeout",
"editable": true,
"type": "string",
"input_type": "integer",
"value": "60"
},
{
"name": "rtp-timeout-sec",
"restor": true,
"display": "rtp-timeout-sec",
"editable": false,
"type": "string"
},
{
"name": "media_hold_timeout",
"restor": true,
"display": "media_hold_timeout",
"editable": true,
"type": "string",
"input_type": "integer",
"value": "300"
},
{
"name": "rtp-hold-timeout-sec",
"restor": true,
"display": "rtp-hold-timeout-sec",
"editable": false,
"type": "string"
},
{
"name": "rtp-autoflush-during-bridge",
"restor": true,
"display": "rtp-autoflush-during-bridge",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "rtp-autoflush",
"restor": true,
"display": "rtp-autoflush",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "challenge-realm",
"restor": true,
"display": "challenge-realm",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "auto_to,auto_from",
"value": "auto_from"
},
{
"name": "accept-blind-auth",
"restor": true,
"display": "accept-blind-auth",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "auth-calls",
"restor": true,
"display": "auth-calls",
"editable": true,
"type": "string",
"help": "Users in the directory can have \"auth-acl\" parameters applied to them so as to restrict users access to a predefined ACL or a CIDR.Value can be \"false\" to disable authentication on this profile, meaning that when calls come in the profile will *not* send an auth challenge to the caller.",
"value": "true",
"input_candidate": "",
"input_type": "boolean"
},
{
"name": "log-auth-failures",
"restor": true,
"display": "log-auth-failures",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": "false"
},
{
"name": "auth-all-packets",
"restor": true,
"display": "auth-all-packets",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": "false"
},
{
"name": "disable-register",
"restor": true,
"display": "disable-register",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "multiple-registrations",
"restor": true,
"display": "multiple-registrations",
"editable": true,
"type": "string",
"input_type": "string",
"input_candidate": "contact,true,false"
},
{
"name": "max-registrations-per-extension",
"restor": true,
"display": "max-registrations-per-extension",
"editable": true,
"type": "string",
"value": "",
"input_type": "integer"
},
{
"name": "accept-blind-reg",
"restor": true,
"display": "accept-blind-reg",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "inbound-reg-force-matching-username",
"restor": true,
"display": "inbound-reg-force-matching-username",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": "true"
},
{
"name": "force-publish-expires",
"restor": true,
"display": "force-publish-expires",
"editable": true,
"type": "string",
"input_type": "boolean",
"value": ""
},
{
"name": "force-register-domain",
"restor": true,
"display": "force-register-domain",
"editable": true,
"type": "string",
"input_type": "string",
"value": "$${domain}"
},
{
"name": "force-register-db-domain",
"restor": true,
"display": "force-register-db-domain",
"editable": true,
"type": "string",
"input_type": "string",
"value": "$${domain}"
},
{
"name": "send-message-query-on-register",
"restor": true,
"display": "send-message-query-on-register",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "unregister-on-options-fail",
"restor": true,
"display": "unregister-on-options-fail",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "nat-options-ping",
"restor": true,
"display": "nat-options-ping",
"editable": true,
"type": "string",
"input_type": "boolean"
},
{
"name": "all-reg-options-ping",
"restor": true,
"display": "all-reg-options-ping",
"editable": true,
"input_type": "boolean",
"type": "string"
},
{
"name": "registration-thread-frequency",
"restor": true,
"display": "registration-thread-frequency",
"editable": true,
"input_type": "integer"
},
{
"name": "inbound-reg-in-new-thread",
"restor": true,
"display": "inbound-reg-in-new-thread",
"editable": true,
"input_type": "boolean"
},
{
"name": "ping-mean-interval",
"restor": true,
"display": "ping-mean-interval",
"editable": true,
"input_type": "integer"
},
{
"name": "ping-thread-frequency",
"restor": true,
"display": "ping-thread-frequency",
"editable": true,
"input_type": "integer"
},
{
"name": "force-subscription-expires",
"restor": true,
"display": "force-subscription-expires",
"editable": true,
"input_type": "integer"
},
{
"name": "force-subscription-domain",
"restor": true,
"display": "force-subscription-domain",
"editable": true,
"input_type": "string",
"value": "$${domain}"
},
{
"name": "manage-presence",
"restor": true,
"display": "manage-presence",
"editable": true,
"input_type": "boolean",
"value": "false"
},
{
"name": "dbname",
"restor": true,
"display": "dbname",
"editable": true,
"input_type": "string"
},
{
"name": "presence-hold-state",
"restor": true,
"display": "presence-hold-state",
"editable": true,
"input_type": "string",
"input_candidate": "confirmed,early,terminated"
},
{
"name": "presence-hosts",
"restor": true,
"display": "presence-hosts",
"editable": true,
"input_type": "string"
},
{
"name": "presence-privacy",
"restor": true,
"display": "presence-privacy",
"editable": true,
"input_type": "boolean"
},
{
"name": "send-presence-on-register",
"restor": true,
"display": "send-presence-on-register",
"editable": true,
"input_type": "string",
"input_candidate": "false,true,first-only"
},
{
"name": "caller-id-type",
"restor": true,
"display": "caller-id-type",
"editable": true,
"input_type": "string",
"input_candidate": "rpid,pid,none"
},
{
"name": "pass-callee-id",
"restor": true,
"display": "pass-callee-id",
"editable": true,
"input_type": "boolean",
"help": "set this param to false if your gateway for some reason hates X- headers that it is supposed to ignore"
},
{
"name": "hold-music",
"restor": true,
"display": "hold-music",
"editable": true,
"input_type": "string",
"value": "$${hold_music}"
},
{
"name": "disable-hold",
"restor": true,
"display": "disable-hold",
"editable": true,
"input_type": "boolean"
},
{
"name": "apply-inbound-acl",
"restor": true,
"display": "apply-inbound-acl",
"editable": true,
"input_type": "string"
},
{
"name": "apply-register-acl",
"restor": true,
"display": "apply-register-acl",
"editable": true,
"input_type": "string"
},
{
"name": "apply-proxy-acl",
"restor": true,
"display": "apply-proxy-acl",
"editable": true,
"input_type": "string"
},
{
"name": "local-network-acl",
"restor": true,
"display": "local-network-acl",
"editable": true,
"value": "localnet.auto",
"input_type": "string"
},
{
"name": "record-template",
"restor": true,
"display": "record-template",
"editable": true,
"input_type": "string"
},
{
"name": "record-path",
"restor": true,
"display": "record-path",
"editable": true
},
{
"name": "max-proceeding",
"restor": true,
"display": "max-proceeding",
"editable": true,
"input_type": "integer"
},
{
"name": "bind-params",
"restor": true,
"display": "bind-params",
"editable": true,
"input_type": "string"
},
{
"name": "disable-transfer",
"restor": true,
"display": "disable-transfer",
"editable": true,
"input_type": "boolean"
},
{
"name": "manual-redirect",
"restor": true,
"display": "manual-redirect",
"editable": true,
"input_type": "boolean"
},
{
"name": "enable-3pcc",
"restor": true,
"display": "enable-3pcc",
"editable": true,
"input_type": "boolean"
},
{
"name": "nonce-ttl",
"restor": true,
"display": "nonce-ttl",
"editable": true,
"input_type": "integer",
"value": "60"
},
{
"name": "sql-in-transactions",
"restor": true,
"display": "sql-in-transactions",
"editable": true,
"input_type": "boolean"
},
{
"name": "odbc-dsn",
"restor": true,
"display": "odbc-dsn",
"editable": true,
"input_type": "string"
},
{
"name": "mwi-use-reg-callid",
"restor": true,
"display": "mwi-use-reg-callid",
"editable": true,
"input_type": "boolean"
},
{
"name": "username",
"restor": true,
"display": "username",
"editable": true,
"input_type": "string",
"value": "ddt"
},
{
"name": "track-calls",
"restor": true,
"display": "track-calls",
"editable": true,
"input_type": "boolean"
},
{
"name": "watchdog-enabled",
"restor": true,
"display": "watchdog-enabled",
"editable": true,
"input_type": "string"
},
{
"name": "watchdog-step-timeout",
"restor": true,
"display": "watchdog-step-timeout",
"editable": true,
"input_type": "integer"
},
{
"name": "watchdog-event-timeout",
"restor": true,
"display": "watchdog-event-timeout",
"editable": true,
"input_type": "integer"
},
{
"name": "auto-restart",
"restor": true,
"display": "auto-restart",
"editable": true
},
{
"name": "inbound-zrtp-passthru",
"restor": true,
"display": "inbound-zrtp-passthru",
"editable": true,
"input_type": "integer",
"value": "true"
},
{
"name": "forward-unsolicited-mwi-notify",
"restor": true,
"display": "forward-unsolicited-mwi-notify",
"editable": true,
"input_type": "boolean",
"value": "false"
},
{
"name": "rtp-digit-delay",
"restor": true,
"display": "rtp-digit-delay",
"editable": true,
"input_type": "integer"
},
{
"name": "enable-rfc-5626",
"restor": true,
"display": "enable-rfc-5626",
"editable": true,
"input_type": "boolean"
},
{
"name": "disable-srv503",
"restor": true,
"display": "disable-srv503",
"editable": true,
"input_type": "boolean"
},
{
"name": "presence-proto-lookup",
"restor": true,
"display": "presence-proto-lookup",
"editable": true,
"input_type": "boolean"
},
{
"name": "cid-in-1xx",
"restor": true,
"display": "cid-in-1xx",
"editable": true,
"input_type": "boolean"
},
{
"name": "extended-info-parsing",
"restor": true,
"display": "extended-info-parsing",
"editable": true,
"input_type": "boolean"
},
{
"name": "enable-compact-headers",
"restor": true,
"display": "enable-compact-headers",
"editable": true,
"input_type": "boolean"
},
{
"name": "sip-messages-respond-200-ok",
"restor": true,
"display": "sip-messages-respond-200-ok",
"editable": true,
"input_type": "boolean"
},
{
"name": "sip-subscribe-respond-200-ok",
"restor": true,
"display": "sip-subscribe-respond-200-ok",
"editable": true,
"input_type": "boolean"
},
{
"name": "tls-sip-port",
"restor": true,
"display": "tls-sip-port",
"editable": true,
"input_type": "integer"
},
{
"name": "tls-ciphers",
"restor": true,
"display": "tls-ciphers",
"editable": true,
"input_type": "string"
},
{
"name": "ws-binding",
"restor": true,
"display": "ws-binding",
"editable": true,
"input_type": "string"
},
{
"name": "wss-binding",
"restor": true,
"display": "wss-binding",
"editable": true,
"input_type": "string"
},
{
"name": "delete-subs-on-register",
"restor": true,
"display": "delete-subs-on-register",
"editable": true,
"input_type": "boolean"
},
{
"name": "inbound-reg-in-new-thread",
"restor": true,
"display": "inbound-reg-in-new-thread",
"editable": true,
"input_type": "boolean"
},
{
"name": "rtcp-audio-interval-msec",
"restor": true,
"display": "rtcp-audio-interval-msec",
"editable": true,
"input_type": "integer"
},
{
"name": "rtcp-video-interval-msec",
"restor": true,
"display": "rtcp-video-interval-msec",
"editable": true,
"input_type": "integer"
},
{
"name": "sip-subscription-max-deviation",
"restor": true,
"display": "sip-subscription-max-deviation",
"editable": true,
"input_type": "integer"
},
{
"name": "rtp-autofix-timing",
"restor": true,
"display": "rtp-autofix-timing",
"editable": true,
"input_type": "boolean"
},
{
"name": "auto-rtp-bugs",
"restor": true,
"display": "auto-rtp-bugs",
"editable": true,
"input_type": "string",
"input_candidate": "clear,CISCO_SKIP_MARK_BIT_2833,SONUS_SEND_INVALID_TIMESTAMP_2833"
},
{
"name": "disable-srv",
"restor": true,
"display": "disable-srv",
"editable": true,
"input_type": "boolean",
"help": "the following can be used as workaround with bogus SRV\/NAPTR records"
},
{
"name": "disable-naptr",
"restor": true,
"display": "disable-naptr",
"editable": true,
"input_type": "boolean"
},
{
"name": "timer-T1",
"restor": true,
"display": "timer-T1",
"editable": true,
"input_type": "integer",
"help": "Initial retransmission interval (in milliseconds).\n Set the T1 retransmission interval used by the SIP transaction engine.\n The T1 is the initial duration used by request retransmission timers A and E (UDP) as well as response retransmission timer G."
},
{
"name": "timer-T1X64",
"restor": true,
"display": "timer-T1X64",
"editable": true,
"input_type": "integer",
"help": "Transaction timeout (defaults to T1 * 64).\n Set the T1x64 timeout value used by the SIP transaction engine.\n The T1x64 is duration used for timers B, F, H, and J (UDP) by the SIP transaction engine.\n The timeout value T1x64 can be adjusted separately from the initial retransmission interval T1."
},
{
"name": "timer-T2",
"restor": true,
"display": "timer-T2",
"editable": true,
"input_type": "integer",
"help": "Maximum retransmission interval (in milliseconds).\n Set the maximum retransmission interval used by the SIP transaction engine.\n The T2 is the maximum duration used for the timers E (UDP) and G by the SIP transaction engine.\n Note that the timer A is not capped by T2. Retransmission interval of INVITE requests grows exponentially\n until the timer B fires"
},
{
"name": "timer-T4",
"restor": true,
"display": "timer-T4",
"editable": true,
"input_type": "integer",
"help": "Transaction lifetime (in milliseconds).\n Set the lifetime for completed transactions used by the SIP transaction engine.\n A completed transaction is kept around for the duration of T4 in order to catch late responses.\n The T4 is the maximum duration for the messages to stay in the network and the duration of SIP timer K."
},
{
"name": "renegotiate-codec-on-hold",
"restor": true,
"display": "renegotiate-codec-on-hold",
"editable": true,
"input_type": "boolean",
"help": "By default mod_sofia will ignore the codecs in the sdp for hold\/unhold operations\n Set this to true if you want to actually parse the sdp and re-negotiate the codec during hold\/unhold.\n It's probably not what you want so stick with the default unless you really need to change this."
},
{
"name": "auto-invite-100",
"restor": true,
"display": "auto-invite-100",
"editable": true,
"input_type": "boolean",
"help": "By default mod_sofia will send \"100 Trying\" in response to a SIP INVITE. Set this to false if\n you want to turn off this behavior and manually send the \"100 Trying\" via the acknowledge_call application."
}
]
}
]
}
网关模板JSON
{
"children": [
{
"name": "param",
"restor": true,
"display": "参数",
"type": "folder",
"children": [
{
"name": "realm",
"restor": true,
"display": "realm",
"editable": true,
"input_type": "string"
},
{
"name": "username",
"restor": true,
"display": "username",
"editable": true
},
{
"name": "password",
"restor": true,
"display": "password",
"editable": true,
"input_echomode": 2
},
{
"name": "register",
"restor": true,
"display": "register",
"editable": true,
"input_type": "boolean",
"help": "false: do not register. true: register (default)",
"value": "false"
},
{
"name": "destination-prefix",
"restor": true,
"display": "destination-prefix"
},
{
"name": "from-user",
"restor": true,
"display": "from-user",
"editable": true,
"input_type": "string"
},
{
"name": "from-domain",
"restor": true,
"display": "from-domain",
"editable": true,
"input_type": "string"
},
{
"name": "caller-id-in-from",
"restor": true,
"display": "caller-id-in-from",
"editable": true,
"input_type": "boolean",
"value": "true"
},
{
"name": "extension",
"restor": true,
"display": "extension",
"editable": true,
"input_type": "string",
"help": "Note: 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."
},
{
"name": "extension-in-contact",
"restor": true,
"display": "extension-in-contact",
"editable": true,
"input_type": "boolean",
"help": "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."
},
{
"name": "auth-username",
"restor": true,
"display": "auth-username",
"editable": true,
"input_type": "string"
},
{
"name": "contact-host",
"restor": true,
"display": "contact-host",
"editable": true
},
{
"name": "retry-seconds",
"restor": true,
"display": "retry-seconds",
"editable": true,
"input_type": "integer",
"input_min": 5,
"help": "this sets the number of seconds to retry the registration"
},
{
"name": "retry_seconds",
"restor": true,
"display": "retry_seconds",
"editable": true,
"help": "support typo for back compat"
},
{
"name": "expire-seconds",
"restor": true,
"display": "expire-seconds",
"editable": true,
"input_type": "integer",
"help": "expire in seconds: *optional* 3600, if blank"
},
{
"name": "timeout-seconds",
"restor": true,
"display": "timeout-seconds",
"editable": true,
"input_type": "integer",
"help": "reg_timeout_seconds",
"input_min": 5
},
{
"name": "proxy",
"restor": true,
"display": "proxy",
"editable": true,
"input_type": "string",
"help": "proxy host: *optional* same as realm, if blank"
},
{
"name": "register-proxy",
"restor": true,
"display": "register-proxy",
"editable": true
},
{
"name": "register-transport",
"restor": true,
"display": "register-transport",
"editable": true,
"input_type": "string",
"input_candidate": "udp",
"help": "which transport to use for register"
},
{
"name": "contact-params",
"restor": true,
"display": "contact-params",
"editable": true,
"input_type": "string",
"help": "extra sip params to send in the contact",
"input_candidate": "tport=tcp"
},
{
"name": "ping",
"restor": true,
"display": "ping",
"editable": true,
"input_type": "integer",
"help": "check gateway availability: *optional* \"ping\" is used to check gateway availability. By setting this option, FreeSWITCH will send SIP OPTIONS packets to gateway. If gateway responds with 200 or 404, gateway is pronounced up, otherwise down. [N.B. It appears that other error messages can be returned and still result in the gateway being marked as 'up'?] If any call is routed to gateway with state down, FreeSWITCH will generate NETWORK_OUT_OF_ORDER hangup cause. Ping frequency is defined in seconds (value attribute) and has a minimum value of 5 seconds."
},
{
"name": "ping-max",
"restor": true,
"display": "ping-max",
"editable": true,
"input_type": "integer"
},
{
"name": "ping-min",
"restor": true,
"display": "ping-min",
"editable": true,
"input_type": "integer",
"help": "ping-min means \"how many successful pings we must have before declaring a gateway up\".\n\nThe interval between ping-min and ping-max is the \"safe area\" where a gateway is marked as UP. So if we have, for example, min 3 and max 6, if the gateway is up and we move counter between 3,4,5,6 the gateway will be up.\n\nIf from 6 we loose 4 (so counter == 2) pings in a row, the gateway will be declared down.\n\nPlease note that on sofia startup the gateway is always started as UP, so it will be up even if ping-min is > 1 . the \"right\" way starts when the gateway goes down."
},
{
"name": "ping-user-agent",
"restor": true,
"display": "ping-user-agent",
"editable": true
},
{
"name": "ping-monitoring",
"restor": true,
"display": "ping-monitoring",
"editable": true,
"input_type": "boolean",
"help": "if true then every gw ping result will fire a gateway status event"
},
{
"name": "distinct-to",
"restor": true,
"display": "distinct-to",
"editable": true,
"input_type": "string",
"help": "Param \"distinct-to\" is used when you want FS to register using a distict AOR for header To. It requires proper setting of related parameters. For example if you want the REGISTER to go with:\n\n From: <sip:someuser@somedomain.com>\n To: <sip:anotheruser@anotherdomain.com> 交换to和from信息"
},
{
"name": "context",
"restor": true,
"display": "路由",
"editable": true,
"input_candidate": "redis_hash_keys.cti_dialplan_context",
"input_selectonly": true
},
{
"name": "scheme",
"restor": true,
"display": "scheme",
"editable": true
},
{
"name": "rfc-5626",
"restor": true,
"display": "rfc-5626",
"editable": true,
"input_type": "boolean"
},
{
"name": "reg-id",
"restor": true,
"display": "reg-id",
"editable": true,
"input_type": "integer"
},
{
"name": "908-retry-seconds",
"restor": true,
"display": "908-retry-seconds",
"editable": true,
"input_type": "string"
}
]
},
{
"name": "variables",
"restor": true,
"display": "变量",
"type": "folder",
"children": [
{
"name": "verbose_sdp",
"restor": true,
"display": "verbose_sdp",
"editable": true,
"input_type": "boolean"
},
{
"name": "absolute_codec_string",
"restor": true,
"display": "absolute_codec_string",
"help": "",
"editable": true
},
{
"name": "<inbound>custom_var",
"restor": true,
"display": "inbound_custom_var",
"editable": true,
"input_type": "string",
"help": "direction=\"inbound\""
},
{
"name": "<outbound>custom_var",
"restor": true,
"display": "outbound_custom_var",
"editable": true,
"input_type": "string",
"help": "direction=\"outbound\""
},
{
"name": "p:caller_id_name",
"restor": true,
"display": "主叫用户",
"editable": true,
"help": "However, see below for a special syntax to set profile variables rather than channel variables.",
"input_type": "string"
},
{
"name": "p:caller_id_number",
"restor": true,
"display": "主叫号码",
"help": "",
"editable": true,
"input_type": "string"
},
{
"name": "sip_sticky_contact",
"restor": true,
"display": "sip_sticky_contact",
"editable": true,
"input_type": "boolean",
"value": "true"
}
]
}
]
}
更多推荐
所有评论(0)