@RestController
public class XmlCurlController
extends Object
最小可用的 mod_xml_curl HTTP 控制器。
FreeSWITCH 配置 xml_curl.conf.xml 后,会以 HTTP 请求获取 directory 与 dialplan 的 XML。
本控制器通过查询参数进行路由:
- type=directory&user=1000&domain=default
- type=dialplan&context=default&dest=1000
注意:生产环境需加入鉴权、白名单、限流与审计;此处为演示用途。
-
-
Constructor Summary
Constructors
-
Method Summary
byte[]
fsXml(org.springframework.util.MultiValueMap<String,String> paramsRaw,
jakarta.servlet.http.HttpServletRequest request)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Details
-
XmlCurlController
public XmlCurlController()
-
Method Details
-
fsXml
@RequestMapping(value={"/fs-xml","/xmlcurl"},
method={GET,POST},
produces="application/xml;charset=UTF-8")
@ResponseBody
public byte[] fsXml(@RequestParam
org.springframework.util.MultiValueMap<String,String> paramsRaw,
jakarta.servlet.http.HttpServletRequest request)
-
health
@GetMapping(value="/_healthz",
produces="text/plain")
@ResponseBody
public String health()
-
-
-