Get value, specifed by arguments, from FreeSWITCH XML configuration.
Get value, specified by arguments, from XML string, specified by first argument.
Get value, specified by arguments, from JSON string, specified by first argument.
git branch devel-mod_parser
git checkout devel-mod_parser
git submodule add -- https://github.com/kvishnivetsky/freeswitch-mod_parser.git src/mod/applications/mod_parser
- edit your
configure.ac
and add toAC_CONFIG_FILES
sectionsrc/mod/applications/mod_parser/Makefile
- edit your
modules.conf
and addapplications/mod_parser
- build FreeSWITCH as usual:
./bootstrap.sh
and so on....
CURL response in this examplereturns JSON string:
{ "data":[ "test2", {"test3":"value"} ] }
To extract value
to variable in dialplan use:
<action application="curl" data="https://api.test.local/get-some-json"/>
<action application="set" data="api_result=${get_json_value('${curl_response_data}' data 1 test3)}"/>
- FreeSWITCH JSON parser
- FreeSWITCH XML parser
- FreeSWITCH dialplan JSON
- FreeSWITCH dialplan XML