[Freeswitch-users] xml_curl and gateways

David Villasmil david.villasmil.work at gmail.com
Mon Feb 21 17:56:50 MSK 2011


Hello,

care to paste a sample? i can't seem to find any... I'm trying to load
only the <gateways>, i'm using it like this:

<document type="freeswitch/xml">
     <configuration name="sofia.conf" description="Gateways configuration">

          <profile name="external">

                 <gateways>

                    <gateway name="asterisk_1">
                         <param name="realm" value="1.2.3.4:5060"/>
                         <param name="username" value="foo"/>
                         <param name="password" value="1234"/>
                         <param name="register" value="false"/>
                         <param name="retry-seconds" value="30"/>
                    </gateway>

                    <gateway name="opensips_1">
                         <param name="realm" value="5.6.7.8:5060"/>
                         <param name="username" value="foo"/>
                         <param name="password" value="pass"/>
                         <param name="register" value="false"/>
                         <param name="retry-seconds" value="30"/>
                    </gateway>

                 </gateways>

          </profile>

     </configuration>
</document>


FS dumps the files correctly when i set debug on on xmo_curl... but it
doesn't load the gateways...

Thanks


David

On Sun, Sep 21, 2008 at 1:45 AM, Peter P GMX <Prometheus001 at gmx.net> wrote:
> I now serve the whole sofia config from my Ruby on Rails app and the
> gateways now work dynamically from my database entries.
>
> Thanks to all who contributed. I updated the wiki with my experience on
> the issues I had on this topic.
>
> Freeswitch is so great!
>
> Best regards
> Peter
>
> Raymond Chandler schrieb:
>> Peter P GMX wrote:
>>
>>> 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?
>>>
>>>
>>>
>> I think #2 and #3 are wrong, if I understand what you're saying.
>>
>> Your response will override the static XML files, NOT add to them or
>> "enhance" them
>>
>>> 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?
>>>
>>>
>>
>> I wrote quite a bit of stuff that does most of the xml_curl files.
>> sofia.conf was definitely on my list. you can find the stuff that I
>> wrote in ${SVNROOT}/scripts/contrib/intralanman/PHP/fs_curl/
>>
>> yes, it's in PHP, but it should give you enough of an idea of how to
>> send your responses.
>>
>>
>> -Ray
>>
>>
>>
>>
>>> Best regards
>>> Peter
>>>
>>> _______________________________________________
>>> Freeswitch-users mailing list
>>> Freeswitch-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>



More information about the FreeSWITCH-users mailing list