Hi Jonathan,<div><br></div><div>On a separate side note, that code is particularly unclean.</div><div><br></div><div>You may want to consider either building the XML response using an XML library, or use a template parsing language so you are not placing raw XML in your source.</div>
<div><br></div><div>In regards to your original email, the link Steven has provided is a good starting point.</div><div><br></div><div>Hope this helps.</div><div><br></div><div>Cal</div><div><br><div class="gmail_quote">On Sun, Jan 27, 2013 at 1:16 PM, johnthan123 <span dir="ltr">&lt;<a href="mailto:johnthan123@gmail.com" target="_blank">johnthan123@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"><div dir="ltr"><div><div><div><div><div>HI All,<br><br><br></div>  Can You Please any one help me To Write Directory and Dialplan and In XML_CURL Like Below <br>
<br></div>#################CODE########################<br>#!/usr/bin/perl<br>
use strict;<br>use warnings;<br>use Data::Dump qw(dump); <br>use CGI;<br>my $q = CGI-&gt;new;<br>my $section = $q-&gt;param(&#39;section&#39;);<br><br>if ($section eq &#39;directory&#39;){<br><br>$XML_STRING2 = &#39;<br>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;<br>
&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>  &lt;section name=&quot;directory&quot;&gt;<br>    &lt;domain name=&quot;192.168.4.32&quot;&gt;<br>      &lt;user id=&quot;1001&quot;&gt;<br>    &lt;params&gt;<br>        &lt;param name=&quot;password&quot; value=&quot;1001&quot;/&gt;<br>

       &lt;/params&gt;<br>         &lt;variables&gt;<br>           &lt;variable name=&quot;accountcode&quot; value=&quot;1001&quot;/&gt;<br>          &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;<br>

         &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;1001&quot;/&gt;<br>            &lt;variable name=&quot;nibble_rate&quot; value=&quot;0.05&quot;/&gt;<br>            &lt;variable name=&quot;nibble_account&quot; value=&quot;1&quot;/&gt;<br>

        &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;1001&quot;/&gt;<br>       &lt;/variables&gt;<br>      &lt;/user&gt;<br>    &lt;/domain&gt;<br>      &lt;/section&gt;<br>&#39;;<br>}<br>elsif ( $section eq &#39;dialplan&#39; ) {<br>

$XML_STRING = &#39;<br>  &lt;section name=&quot;dialplan&quot; description=&quot;example_curl_dialplan&quot;&gt;<br>    &lt;context name=&quot;public&quot;&gt;<br>      &lt;extension name=&quot;curl_test&quot;&gt;<br>        &lt;condition field=&quot;destination_number&quot; expression=&quot;^(80\d{2})$&quot;&gt;<br>

        &lt;action application=&quot;set&quot; data=&quot;dialed_extension=$1&quot;/&gt; <br>        &lt;action application=&quot;set&quot; data=&quot;nibble_account=${accountcode}&quot;/&gt;<br>        &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/peer_asterisk/$1&quot;/&gt;<br>

        &lt;/condition&gt;<br>      &lt;/extension&gt;<br>    &lt;/context&gt;<br>  &lt;/section&gt;<br>&lt;/document&gt;<br>&#39;;<br>} <br><br></div>###########################END#############################<br><br></div>

This is Working for Me But i cant able to take the Database values into XML file <br><br><br></div><div>Thanks In Advance <br><br><br></div><div>Thanks <br><br></div><div>J :: T<br></div><div><div><div><div><div><div><div>

<br> <br></div></div></div></div></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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></blockquote></div><br></div>