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)

Link to this section Summary

Link to this section Functions

Link to this macro

action(name, value)

(macro)
Link to this macro

condition(var, list)

(macro)
Link to this macro

extension(name, list)

(macro)
Link to this macro

tag(name, attrs \\ [])

(macro)