[Freeswitch-users] xml_curl and gateways

Peter P GMX Prometheus001 at gmx.net
Wed Sep 17 14:40:02 PDT 2008


According to http://wiki.freeswitch.org/wiki/Mod_xml_curl I'v tried to 
set up gateways dynamically, but I do net get it to work:
I always get : "Invalid profile"

My assumptions for a right xml answer back to FS are as follows, but I 
think at least one of it is false:
1. ) I start with
<document type='freeswitch/xml'>
  <section name='configuration'>
    <configuration name='sofia.conf' description='RailsAdditionalConf'>
2.) I do not want to change settings, so I do NOT add a <settings> tag
3.) I want to enhance an existing profile, so I add a profile tag 
(<profile name='external'>)
4.) I assume that I can have an existing profile "external" in the xml 
conf files and can mix additional parts dynamically into the same profile
5.) Within the profile I want to add gateways, so I add a gateway tag 
(<gateways>)
6.) Then I add the gateways
7.) I add the closing tags

Which one of the assumptions if wrong?

The request I receive is as follows:
{"key_name"=>"name", "action"=>"directory", "tag_name"=>"configuration", 
"key_value"=>"sofia.conf", "controller"=>"xml_curls", 
"hostname"=>"freeswitch", "section"=>"configuration"}

I only answer once at startup with the follwing:
<document type='freeswitch/xml'>
  <section name='configuration'>
    <configuration name='sofia.conf' description='RailsAdditionalConf'>
        <profile name='external'>
          <gateways>
  <gateway name="freeswitch2">
  <param name="username" value="1007"/>
  <param name="realm" value="192.168.0.56:5061"/>
  <param name="password" value="xxxx"/>
  <param name="proxy" value="192.168.0.56"/>
  <param name="expire-seconds" value="30"/>
  <param name="register" value="true"/>
  <param name="register-transport" value="tls"/>
  <param name="retry-seconds" value="30"/>
  </gateway>
          </gateways>
        </profile>
    </configuration>
  </section>
</document>

Does anybody have a correct XML answer for a gateway and can post it?

Best regards
Peter




More information about the FreeSWITCH-users mailing list