[Freeswitch-users] XML_CURL & gateways

Steven Ayre steveayre at gmail.com
Mon Feb 21 20:01:37 MSK 2011


Can you post the entire file that is being sent to FS? It's almost certainly
a syntax problem.

Your mod_xml_curl config is fine. "configuration" is all you need. However
you should know that after mod_xml_curl loads *all* attempts to read a
config file will go to that URL. You can't make it specific to a single
config file. The request contains parameters that tell your script which
config file it's looking for.

You would be best off serving all of your configuration through
mod_xml_curl, except some of the more essential modules such as mod_logfile,
mod_event_socket etc.

-Steve



On 21 February 2011 16:44, David Villasmil
<david.villasmil.work at gmail.com>wrote:

> Hello,
>
> I changed sofia.conf.xml to:
>
> <configuration name="sofia.conf" description="sofia Endpoint">
>
>  <global_settings>
>    <param name="log-level" value="0"/>
>    <!-- <param name="auto-restart" value="false"/> -->
>    <param name="debug-presence" value="0"/>
>  </global_settings>
>
> </configuration>
>
> it seems to load now, but it doesn't load any profiles from the curl
> server, this is my xml_curl:
>
> <configuration name="xml_curl.conf" description="cURL XML Gateway">
>  <bindings>
>    <binding name="sofia">
>       <param name="gateway-url"
> value="http://93.90.20.99/fsxml/gateways.php"
> bindings="configuration"/> -->
>    </binding>
>  </bindings>
> </configuration>
>
>
> I don't what binding name and bindings should be to load the rest of
> sofia from the curl server...
>
>
> any help?
>
> Thanks!
>
>
> David
>
>
>
> On Mon, Feb 21, 2011 at 5:19 PM, David Villasmil
> <david.villasmil.work at gmail.com> wrote:
> > Yeah, that's what i was trying, but now sofia is not starting...
> >
> > could it be my xml_curl is wrong? here it is:
> >
> > trying to load all sofia config:
> >
> > <configuration name="xml_curl.conf" description="cURL XML Gateway">
> >  <bindings>
> >    <binding name="sofia.conf">
> >      <param name="gateway-url"
> > value="http://server_ip/fsxml/gateways.php" bindings="sofia.conf"/>
> > -->
> >    </binding>
> >  </bindings>
> > </configuration>
> >
> > this: http://server_ip/fsxml/gateways.php returns all the sofia
> > config, and it is ok because I copied the result into sofia.conf.xml
> > and it starts prefectly...
> >
> > is my "bindings" ok? I've tried: sofia.conf.xml, sofia.conf and
> > sofia... none seems to load it, i always get:
> >
> > 2011-02-21 17:08:58.277368 [ERR] sofia.c:2646 Open of sofia.conf failed
> > 2011-02-21 17:08:58.277757 [CRIT] switch_loadable_module.c:882 Error
> > Loading module /usr/local/freeswitch/mod/mod_sofia.so
> > **Module load routine returned an error**
> >
> > I removed the sofia.conf.xml from the autoload_configs... not sure
> > whether i should leave it or what...
> >
> > David
> >
> >
> > On Mon, Feb 21, 2011 at 5:07 PM, Steven Ayre <steveayre at gmail.com>
> wrote:
> >> Try (re)including the entire profile config. FS might be ignoring it
> because
> >> of the missing profile params.
> >>
> >> -Steve
> >>
> >>
> >> On 21 February 2011 15:56, David Villasmil <
> david.villasmil.work at gmail.com>
> >> wrote:
> >>>
> >>> Thanks Steven,
> >>>
> >>> > If you load the profile statically at start and rescan later from
> >>> > mod_xml_curl, it should add any missing gateways at that time.
> >>> >
> >>>
> >>> Doesn't do it though... that's why i was wondering if I had something
> >>> wrong in my gateways section. I just posted my config in thi email
> >>> thread before this email. Hope you see something wrong with it.
> >>>
> >>> Thanks
> >>>
> >>> David
> >>>
> >>> On Mon, Feb 21, 2011 at 4:52 PM, Steven Ayre <steveayre at gmail.com>
> wrote:
> >>> > As Brian said, "sofia profile xxx killgw xxx" - you have to do them
> one
> >>> > at a
> >>> > time.
> >>> >
> >>> > If you load the profile statically at start and rescan later from
> >>> > mod_xml_curl, it should add any missing gateways at that time.
> >>> >
> >>> > -Steve
> >>> >
> >>> >
> >>> > On 21 February 2011 15:40, David Villasmil
> >>> > <david.villasmil.work at gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Thanks Steven,
> >>> >>
> >>> >> The sofia profile loads statically. Only the gateway part is passed
> >>> >> via curl, as I only want to load that dynamically.
> >>> >>
> >>> >> I see no errors anywhere:
> >>> >>
> >>> >>  sofia profile external rescan
> >>> >> +OK scan complete
> >>> >>
> >>> >> freeswitch at internal>
> >>> >>
> >>> >> HOw do i remove all gateways before rescanning them?
> >>> >>
> >>> >> Thanks
> >>> >>
> >>> >> David
> >>> >>
> >>> >> On Mon, Feb 21, 2011 at 4:09 PM, Steven Ayre <steveayre at gmail.com>
> >>> >> wrote:
> >>> >> > "sofia status" will show you which profiles & gateways are
> defined.
> >>> >> >
> >>> >> > Are there any errors in FreeSWITCH's logfile when the XML is
> loaded?
> >>> >> > Perhaps
> >>> >> > there's an XML parsing error, or some other error which gets
> logged.
> >>> >> >
> >>> >> > Gateways are only loaded when you load the configuration (when
> >>> >> > mod_sofia
> >>> >> > loads, or on sofia profile name rescan). Existing gateways must be
> >>> >> > deleted
> >>> >> > and then rescanned to pick up configuration changes. Did you do
> that
> >>> >> > after
> >>> >> > making the changes?
> >>> >> >
> >>> >> > The gateway XML looks ok and I can confirm you can serve the
> config
> >>> >> > via
> >>> >> > mod_xml_curl (I do). Your profile looks incomplete though, for
> >>> >> > instance
> >>> >> > there's no sip-ip to bind to. Did you remove the profile params
> when
> >>> >> > posting
> >>> >> > to the list, or is that your entire profile?
> >>> >> >
> >>> >> > Regards,
> >>> >> > -Steve
> >>> >> >
> >>> >> >
> >>> >> > On 21 February 2011 14:47, David Villasmil
> >>> >> > <david.villasmil.work at gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> Hello All,
> >>> >> >>
> >>> >> >> I'm trying to have my gateways defined dynamically with xml_curl.
> >>> >> >> According to the logs, the xml is requested and relivered to fs
> but
> >>> >> >> fs
> >>> >> >> doesn't seem to load it as i'm getting "invalid gateway" when i
> try
> >>> >> >> to
> >>> >> >> use them.
> >>> >> >>
> >>> >> >> this is my http://curl-gateway/gateways.php file:
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> <document type="freeswitch/xml">
> >>> >> >>     <configuration name="sofia.conf" description="Gateways
> >>> >> >> configuration">
> >>> >> >>
> >>> >> >>          <profile name="external">
> >>> >> >>                 <!--
> >>> >> >> http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
> >>> >> >>                 <!-- This profile is only for outbound
> registrations
> >>> >> >> to providers -->
> >>> >> >>                 <gateways>
> >>> >> >>
> >>> >> >>                    <gateway name="gw_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="gw_2">
> >>> >> >>                         <param name="realm" value="3.4.5.6: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>
> >>> >> >>
> >>> >> >>
> >>> >> >> and i get:
> >>> >> >>
> >>> >> >>
> >>> >> >> freeswitch at internal> sofia xmlstatus gateway gw_1
> >>> >> >> Invalid Gateway!
> >>> >> >>
> >>> >> >>
> >>> >> >> Is my file correct?
> >>> >> >>
> >>> >> >> It is not possible to find xml_curl gateways samples anywhere.
> >>> >> >>
> >>> >> >>
> >>> >> >>
> >>> >> >> Thanks
> >>> >> >>
> >>> >> >> David
> >>> >> >>
> >>> >> >> _______________________________________________
> >>> >> >> 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
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > 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
> >>
> >>
> >
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110221/af5e42a8/attachment-0001.html 


More information about the FreeSWITCH-users mailing list