Thanks for your response Anthony,<div><br></div><div>I should of mentioned this in my previous email but The method signature for switch_xml_open_cfg looks like the following:</div><div><br></div><div><p class="p1"><b>public static switch_xml switch_xml_open_cfg(string file_path, SWIGTYPE_p_p_switch_xml node, switch_event arg2)</b></p>
</div><div><br></div><div>and i have been unable to figure out how to create an instance of <b>SWIGTYPE_p_p_switch_xml</b> to pass into that. As far as I can tell, is not instantiable unless you write an interface for swig to use before you build. Perhaps you can give me a hint on how to use that object or is there something that has to be changed on the mod_managed code itself? Sorry, I am pretty new to freeswitch and swig so I am not terribly sure why that object is not available for me to instantiate.</div>
<div><br></div><div>Thank you so much for your help.</div><div><br></div><div>Ryan</div><div><br></div><div><br><div class="gmail_quote">On Thu, Sep 15, 2011 at 9:26 AM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">you have to supply the 2nd arg too.<br>
<br>
the returned obj is the whole xml root, the 2nd param is a pointer to<br>
pointer of the section you searched for inside that root.<br>
<div><div></div><div class="h5"><br>
<br>
On Wed, Sep 14, 2011 at 3:41 PM, R H &lt;<a href="mailto:buscom123%2Bfs@gmail.com">buscom123+fs@gmail.com</a>&gt; wrote:<br>
&gt; Has anyone had success working with xml configuration files using<br>
&gt; mod_managed? I have several modules that DO NOT override the xml<br>
&gt; configuration but, rather, I actually want to configure them using the<br>
&gt; freeswitch conf directory structure. I have not even tried to parse the xml<br>
&gt; because I cant even load the xml. Here is a very basic example of what I<br>
&gt; tried and the result I got:<br>
&gt; The Code:<br>
&gt; ------------------------------------------------<br>
&gt; using System;<br>
&gt; using FreeSWITCH;<br>
&gt; using FreeSWITCH.Native;<br>
&gt; namespace PsiCallCenterAddon<br>
&gt; {<br>
&gt; public class FreeSwitchConfigLoader<br>
&gt; {<br>
&gt; public static void loadConfigTest()<br>
&gt; {<br>
&gt; try<br>
&gt; {<br>
&gt; switch_xml xml = freeswitch.switch_xml_open_cfg(&quot;freeswitch.conf&quot;, null,<br>
&gt; null);<br>
&gt; freeswitch.switch_xml_free(xml);<br>
&gt; Log.WriteLine(LogLevel.Alert, &quot;Config Loader Success!&quot;);<br>
&gt; }<br>
&gt; catch<br>
&gt; {<br>
&gt; Log.WriteLine(LogLevel.Alert, &quot;Config Loader Fail!&quot;);<br>
&gt; }<br>
&gt; }<br>
&gt; }<br>
&gt; }<br>
&gt; ------------------------------------------------<br>
&gt; The Result:<br>
&gt; ------------------------------------------------<br>
&gt; Stacktrace:<br>
&gt;   at (wrapper managed-to-native)<br>
&gt; FreeSWITCH.Native.freeswitchPINVOKE.switch_xml_open_cfg<br>
&gt; (string,System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)<br>
&gt; &lt;0x000a3&gt;<br>
&gt;   at (wrapper managed-to-native)<br>
&gt; FreeSWITCH.Native.freeswitchPINVOKE.switch_xml_open_cfg<br>
&gt; (string,System.Runtime.InteropServices.HandleRef,System.Runtime.InteropServices.HandleRef)<br>
&gt; &lt;0x000a3&gt;<br>
&gt;   at FreeSWITCH.Native.freeswitch.switch_xml_open_cfg<br>
&gt; (string,FreeSWITCH.Native.SWIGTYPE_p_p_switch_xml,FreeSWITCH.Native.switch_event)<br>
&gt; &lt;0x0004f&gt;<br>
&gt;   at PsiCallCenterAddon.FreeSwitchConfigLoader.loadConfigTest () &lt;0x0001b&gt;<br>
&gt;   at PsiCallCenterAddon.QueueMonitorLoader.Load () &lt;0x0000b&gt;<br>
&gt;   at FreeSWITCH.PluginManager.RunLoadNotify (System.Type[]) &lt;0x00190&gt;<br>
&gt;   at FreeSWITCH.AsmPluginManager.LoadInternal (string) &lt;0x001eb&gt;<br>
&gt;   at FreeSWITCH.PluginManager.Load (string) &lt;0x000a7&gt;<br>
&gt;   at (wrapper remoting-invoke-with-check) FreeSWITCH.PluginManager.Load<br>
&gt; (string) &lt;0x00067&gt;<br>
&gt;   at (wrapper xdomain-dispatch) FreeSWITCH.PluginManager.Load<br>
&gt; (object,byte[]&amp;,byte[]&amp;,string) &lt;0x0017b&gt;<br>
&gt;   at (wrapper xdomain-invoke) FreeSWITCH.PluginManager.Load (string)<br>
&gt; &lt;0x00126&gt;<br>
&gt;   at (wrapper remoting-invoke-with-check) FreeSWITCH.PluginManager.Load<br>
&gt; (string) &lt;0x00047&gt;<br>
&gt;   at FreeSWITCH.Loader.loadFile (string) &lt;0x004a3&gt;<br>
&gt;   at FreeSWITCH.Loader.Load () &lt;0x0027b&gt;<br>
&gt;   at (wrapper runtime-invoke) &lt;Module&gt;.runtime_invoke_bool<br>
&gt; (object,intptr,intptr,intptr) &lt;0x00046&gt;<br>
&gt; Native stacktrace:<br>
&gt;         /usr/lib64/libmono-2.0.so.1(+0xacba0) [0x7fc7ea58dba0]<br>
&gt;         /usr/lib64/libmono-2.0.so.1(+0xfcedf) [0x7fc7ea5ddedf]<br>
&gt;         /lib64/libpthread.so.0(+0xf2d0) [0x7fc7f1ceb2d0]<br>
&gt;<br>
&gt; /usr/local/freeswitch/lib/libfreeswitch.so.1(switch_xml_open_cfg+0x1a)<br>
&gt; [0x7fc7f260b0ea]<br>
&gt;         [0x40155804]<br>
&gt; Debug info from gdb:<br>
&gt; =================================================================<br>
&gt; Got a SIGSEGV while executing native code. This usually indicates<br>
&gt; a fatal error in the mono runtime or one of the native libraries<br>
&gt; used by your application.<br>
&gt; =================================================================<br>
&gt;<br>
</div></div>&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:<a href="tel:%2B19193869900" value="+19193869900">+19193869900</a><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>
</blockquote></div><br></div>