FreeswitchDialplanXmlEx (freeswitch_dialplan_xml_ex v0.1.0)
DialplanXML builder for freeswitch mod_xml_curl.
Example
defmodule MyFanstaticDialplan do
use FreeswitchDialplanXmlEx,
condition_field_mapping: %{"Caller-Destination-Number" => "destination_number"}
# only render extension who conditions asserts
extension "echo" do
condition %{"Caller-Destination-Number" => "9196" do
action "echo"
end
end
extension "extension" do
condition %{"Caller-Destination-Number" => "1" <> rest do
action "bridge", "user/1#{rest}"
end
end
end
then you can render with params from mod_xml_curl and get xml string.
MyFantasticDialplan.render(params)