Can you post the entire file that is being sent to FS? It's almost certainly a syntax problem.<br><br>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.<br>
<br>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.<br><br>-Steve<br><br><br><br><div class="gmail_quote">
On 21 February 2011 16:44, David Villasmil <span dir="ltr"><<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I changed sofia.conf.xml to:<br>
<br>
<configuration name="sofia.conf" description="sofia Endpoint"><br>
<br>
<global_settings><br>
<param name="log-level" value="0"/><br>
<!-- <param name="auto-restart" value="false"/> --><br>
<param name="debug-presence" value="0"/><br>
</global_settings><br>
<br>
</configuration><br>
<br>
it seems to load now, but it doesn't load any profiles from the curl<br>
server, this is my xml_curl:<br>
<div class="im"><br>
<configuration name="xml_curl.conf" description="cURL XML Gateway"><br>
<bindings><br>
<binding name="sofia"><br>
</div> <param name="gateway-url"<br>
value="<a href="http://93.90.20.99/fsxml/gateways.php" target="_blank">http://93.90.20.99/fsxml/gateways.php</a>"<br>
bindings="configuration"/> --><br>
</binding><br>
</bindings><br>
</configuration><br>
<br>
<br>
I don't what binding name and bindings should be to load the rest of<br>
sofia from the curl server...<br>
<br>
<br>
any help?<br>
<br>
Thanks!<br>
<br>
<br>
David<br>
<br>
<br>
<br>
On Mon, Feb 21, 2011 at 5:19 PM, David Villasmil<br>
<div><div></div><div class="h5"><<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>> wrote:<br>
> Yeah, that's what i was trying, but now sofia is not starting...<br>
><br>
> could it be my xml_curl is wrong? here it is:<br>
><br>
> trying to load all sofia config:<br>
><br>
> <configuration name="xml_curl.conf" description="cURL XML Gateway"><br>
> <bindings><br>
> <binding name="sofia.conf"><br>
> <param name="gateway-url"<br>
> value="<a href="http://server_ip/fsxml/gateways.php" target="_blank">http://server_ip/fsxml/gateways.php</a>" bindings="sofia.conf"/><br>
> --><br>
> </binding><br>
> </bindings><br>
> </configuration><br>
><br>
> this: <a href="http://server_ip/fsxml/gateways.php" target="_blank">http://server_ip/fsxml/gateways.php</a> returns all the sofia<br>
> config, and it is ok because I copied the result into sofia.conf.xml<br>
> and it starts prefectly...<br>
><br>
> is my "bindings" ok? I've tried: sofia.conf.xml, sofia.conf and<br>
> sofia... none seems to load it, i always get:<br>
><br>
> 2011-02-21 17:08:58.277368 [ERR] sofia.c:2646 Open of sofia.conf failed<br>
> 2011-02-21 17:08:58.277757 [CRIT] switch_loadable_module.c:882 Error<br>
> Loading module /usr/local/freeswitch/mod/mod_sofia.so<br>
> **Module load routine returned an error**<br>
><br>
> I removed the sofia.conf.xml from the autoload_configs... not sure<br>
> whether i should leave it or what...<br>
><br>
> David<br>
><br>
><br>
> On Mon, Feb 21, 2011 at 5:07 PM, Steven Ayre <<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>> wrote:<br>
>> Try (re)including the entire profile config. FS might be ignoring it because<br>
>> of the missing profile params.<br>
>><br>
>> -Steve<br>
>><br>
>><br>
>> On 21 February 2011 15:56, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Thanks Steven,<br>
>>><br>
>>> > If you load the profile statically at start and rescan later from<br>
>>> > mod_xml_curl, it should add any missing gateways at that time.<br>
>>> ><br>
>>><br>
>>> Doesn't do it though... that's why i was wondering if I had something<br>
>>> wrong in my gateways section. I just posted my config in thi email<br>
>>> thread before this email. Hope you see something wrong with it.<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> David<br>
>>><br>
>>> On Mon, Feb 21, 2011 at 4:52 PM, Steven Ayre <<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>> wrote:<br>
>>> > As Brian said, "sofia profile xxx killgw xxx" - you have to do them one<br>
>>> > at a<br>
>>> > time.<br>
>>> ><br>
>>> > If you load the profile statically at start and rescan later from<br>
>>> > mod_xml_curl, it should add any missing gateways at that time.<br>
>>> ><br>
>>> > -Steve<br>
>>> ><br>
>>> ><br>
>>> > On 21 February 2011 15:40, David Villasmil<br>
>>> > <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> Thanks Steven,<br>
>>> >><br>
>>> >> The sofia profile loads statically. Only the gateway part is passed<br>
>>> >> via curl, as I only want to load that dynamically.<br>
>>> >><br>
>>> >> I see no errors anywhere:<br>
>>> >><br>
>>> >> sofia profile external rescan<br>
>>> >> +OK scan complete<br>
>>> >><br>
>>> >> freeswitch@internal><br>
>>> >><br>
>>> >> HOw do i remove all gateways before rescanning them?<br>
>>> >><br>
>>> >> Thanks<br>
>>> >><br>
>>> >> David<br>
>>> >><br>
>>> >> On Mon, Feb 21, 2011 at 4:09 PM, Steven Ayre <<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>><br>
>>> >> wrote:<br>
>>> >> > "sofia status" will show you which profiles & gateways are defined.<br>
>>> >> ><br>
>>> >> > Are there any errors in FreeSWITCH's logfile when the XML is loaded?<br>
>>> >> > Perhaps<br>
>>> >> > there's an XML parsing error, or some other error which gets logged.<br>
>>> >> ><br>
>>> >> > Gateways are only loaded when you load the configuration (when<br>
>>> >> > mod_sofia<br>
>>> >> > loads, or on sofia profile name rescan). Existing gateways must be<br>
>>> >> > deleted<br>
>>> >> > and then rescanned to pick up configuration changes. Did you do that<br>
>>> >> > after<br>
>>> >> > making the changes?<br>
>>> >> ><br>
>>> >> > The gateway XML looks ok and I can confirm you can serve the config<br>
>>> >> > via<br>
>>> >> > mod_xml_curl (I do). Your profile looks incomplete though, for<br>
>>> >> > instance<br>
>>> >> > there's no sip-ip to bind to. Did you remove the profile params when<br>
>>> >> > posting<br>
>>> >> > to the list, or is that your entire profile?<br>
>>> >> ><br>
>>> >> > Regards,<br>
>>> >> > -Steve<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > On 21 February 2011 14:47, David Villasmil<br>
>>> >> > <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>><br>
>>> >> > wrote:<br>
>>> >> >><br>
>>> >> >> Hello All,<br>
>>> >> >><br>
>>> >> >> I'm trying to have my gateways defined dynamically with xml_curl.<br>
>>> >> >> According to the logs, the xml is requested and relivered to fs but<br>
>>> >> >> fs<br>
>>> >> >> doesn't seem to load it as i'm getting "invalid gateway" when i try<br>
>>> >> >> to<br>
>>> >> >> use them.<br>
>>> >> >><br>
>>> >> >> this is my <a href="http://curl-gateway/gateways.php" target="_blank">http://curl-gateway/gateways.php</a> file:<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> <document type="freeswitch/xml"><br>
>>> >> >> <configuration name="sofia.conf" description="Gateways<br>
>>> >> >> configuration"><br>
>>> >> >><br>
>>> >> >> <profile name="external"><br>
>>> >> >> <!--<br>
>>> >> >> <a href="http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files" target="_blank">http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files</a> --><br>
>>> >> >> <!-- This profile is only for outbound registrations<br>
>>> >> >> to providers --><br>
>>> >> >> <gateways><br>
>>> >> >><br>
>>> >> >> <gateway name="gw_1"><br>
>>> >> >> <param name="realm" value="<a href="http://1.2.3.4:5060" target="_blank">1.2.3.4:5060</a>"/><br>
>>> >> >> <param name="username" value="foo"/><br>
>>> >> >> <param name="password" value="1234"/><br>
>>> >> >> <param name="register" value="false"/><br>
>>> >> >> <param name="retry-seconds" value="30"/><br>
>>> >> >> </gateway><br>
>>> >> >><br>
>>> >> >> <gateway name="gw_2"><br>
>>> >> >> <param name="realm" value="<a href="http://3.4.5.6:5060" target="_blank">3.4.5.6:5060</a>"/><br>
>>> >> >> <param name="username" value="foo"/><br>
>>> >> >> <param name="password" value="pass"/><br>
>>> >> >> <param name="register" value="false"/><br>
>>> >> >> <param name="retry-seconds" value="30"/><br>
>>> >> >> </gateway><br>
>>> >> >><br>
>>> >> >> </gateways><br>
>>> >> >><br>
>>> >> >> </profile><br>
>>> >> >><br>
>>> >> >> </configuration><br>
>>> >> >> </document><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> and i get:<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> freeswitch@internal> sofia xmlstatus gateway gw_1<br>
>>> >> >> Invalid Gateway!<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> Is my file correct?<br>
>>> >> >><br>
>>> >> >> It is not possible to find xml_curl gateways samples anywhere.<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> Thanks<br>
>>> >> >><br>
>>> >> >> David<br>
>>> >> >><br>
>>> >> >> _______________________________________________<br>
>>> >> >> FreeSWITCH-users mailing list<br>
>>> >> >> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> >> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> >> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > _______________________________________________<br>
>>> >> > FreeSWITCH-users mailing list<br>
>>> >> > <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> >> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> >> ><br>
>>> >> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> >> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>> >> ><br>
>>> >> ><br>
>>> >><br>
>>> >> _______________________________________________<br>
>>> >> FreeSWITCH-users mailing list<br>
>>> >> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> >> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> >><br>
>>> >> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> >> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > FreeSWITCH-users mailing list<br>
>>> > <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> > <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>>> ><br>
>>> ><br>
>>><br>
>>> _______________________________________________<br>
>>> FreeSWITCH-users mailing list<br>
>>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> FreeSWITCH-users mailing list<br>
>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>><br>
><br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>