Once the response is nested in the correct document, section etc tags the XML syntax is identical to the static dialplan/directory/etc local files, except that you only need to return the parts relevant to the call.<div><br>

</div><div>-Steve</div><div><br><br><div class="gmail_quote">On 28 January 2013 13:49, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@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 need to return valid XML, your dialplan code path doesn&#39;t open the <span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">document tag.</span><div><font color="#222222" face="arial, sans-serif"><br>


</font></div><div><font color="#222222" face="arial, sans-serif">I suggest you read the Wiki page on the module, it gives several examples of the response you need to generate.</font></div><div><font color="#222222" face="arial, sans-serif"><br>


</font></div><div><font color="#222222" face="arial, sans-serif"><a href="http://wiki.freeswitch.org/wiki/Mod_xml_curl#XML_Usage" target="_blank">http://wiki.freeswitch.org/wiki/Mod_xml_curl#XML_Usage</a></font></div><div>

<font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif">-Steve</font></div><div class="HOEnZb"><div class="h5"><br><br><br>On 27 January 2013 13:16, johnthan123 &lt;<a href="mailto:johnthan123@gmail.com" target="_blank">johnthan123@gmail.com</a>&gt; wrote:<br>

&gt;<br>
&gt; HI All,<br>&gt;<br>&gt;<br>&gt;   Can You Please any one help me To Write Directory and Dialplan and In XML_CURL Like Below<br>&gt;<br>&gt; #################CODE########################<br>&gt; #!/usr/bin/perl<br>&gt; use strict;<br>


&gt; use warnings;<br>&gt; use Data::Dump qw(dump);<br>&gt; use CGI;<br>&gt; my $q = CGI-&gt;new;<br>&gt; my $section = $q-&gt;param(&#39;section&#39;);<br>&gt;<br>&gt; if ($section eq &#39;directory&#39;){<br>&gt;<br>&gt; $XML_STRING2 = &#39;<br>


&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;<br>&gt; &lt;document type=&quot;freeswitch/xml&quot;&gt;<br>&gt;   &lt;section name=&quot;directory&quot;&gt;<br>&gt;     &lt;domain name=&quot;192.168.4.32&quot;&gt;<br>


&gt;       &lt;user id=&quot;1001&quot;&gt;<br>&gt;     &lt;params&gt;<br>&gt;         &lt;param name=&quot;password&quot; value=&quot;1001&quot;/&gt;<br>&gt;        &lt;/params&gt;<br>&gt;          &lt;variables&gt;<br>

&gt;            &lt;variable name=&quot;accountcode&quot; value=&quot;1001&quot;/&gt;<br>
&gt;           &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;<br>&gt;          &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;1001&quot;/&gt;<br>&gt;             &lt;variable name=&quot;nibble_rate&quot; value=&quot;0.05&quot;/&gt;<br>


&gt;             &lt;variable name=&quot;nibble_account&quot; value=&quot;1&quot;/&gt;<br>&gt;         &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;1001&quot;/&gt;<br>&gt;        &lt;/variables&gt;<br>


&gt;       &lt;/user&gt;<br>&gt;     &lt;/domain&gt;<br>&gt;       &lt;/section&gt;<br>&gt; &#39;;<br>&gt; }<br>&gt; elsif ( $section eq &#39;dialplan&#39; ) {<br>&gt; $XML_STRING = &#39;<br>&gt;   &lt;section name=&quot;dialplan&quot; description=&quot;example_curl_dialplan&quot;&gt;<br>


&gt;     &lt;context name=&quot;public&quot;&gt;<br>&gt;       &lt;extension name=&quot;curl_test&quot;&gt;<br>&gt;         &lt;condition field=&quot;destination_number&quot; expression=&quot;^(80\d{2})$&quot;&gt;<br>&gt;         &lt;action application=&quot;set&quot; data=&quot;dialed_extension=$1&quot;/&gt;<br>


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


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


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

<div class="HOEnZb"><div class="h5">&gt; _________________________________________________________________________<br>
&gt; Professional FreeSWITCH Consulting Services:<br>&gt; <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>&gt; <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>


&gt;<br>&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>&gt; <a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>&gt;<br>&gt; Official FreeSWITCH Sites<br>&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>


&gt; <a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>&gt; <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>

&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
</div></div></blockquote></div><br></div>