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"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></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'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 <<a href="mailto:johnthan123@gmail.com" target="_blank">johnthan123@gmail.com</a>> wrote:<br>
><br>
> HI All,<br>><br>><br>> Can You Please any one help me To Write Directory and Dialplan and In XML_CURL Like Below<br>><br>> #################CODE########################<br>> #!/usr/bin/perl<br>> use strict;<br>
> use warnings;<br>> use Data::Dump qw(dump);<br>> use CGI;<br>> my $q = CGI->new;<br>> my $section = $q->param('section');<br>><br>> if ($section eq 'directory'){<br>><br>> $XML_STRING2 = '<br>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?><br>> <document type="freeswitch/xml"><br>> <section name="directory"><br>> <domain name="192.168.4.32"><br>
> <user id="1001"><br>> <params><br>> <param name="password" value="1001"/><br>> </params><br>> <variables><br>
> <variable name="accountcode" value="1001"/><br>
> <variable name="user_context" value="default"/><br>> <variable name="effective_caller_id_name" value="1001"/><br>> <variable name="nibble_rate" value="0.05"/><br>
> <variable name="nibble_account" value="1"/><br>> <variable name="effective_caller_id_number" value="1001"/><br>> </variables><br>
> </user><br>> </domain><br>> </section><br>> ';<br>> }<br>> elsif ( $section eq 'dialplan' ) {<br>> $XML_STRING = '<br>> <section name="dialplan" description="example_curl_dialplan"><br>
> <context name="public"><br>> <extension name="curl_test"><br>> <condition field="destination_number" expression="^(80\d{2})$"><br>> <action application="set" data="dialed_extension=$1"/><br>
> <action application="set" data="nibble_account=${accountcode}"/><br>> <action application="bridge" data="sofia/gateway/peer_asterisk/$1"/><br>> </condition><br>
> </extension><br>> </context><br>> </section><br>> </document><br>> ';<br>> }<br>><br>> ###########################END#############################<br>><br>
> This is Working for Me But i cant able to take the Database values into XML file<br>><br>><br>> Thanks In Advance<br>><br>><br>> Thanks<br>><br>> J :: T<br>><br>> <br>><br></div></div>
<div class="HOEnZb"><div class="h5">> _________________________________________________________________________<br>
> Professional FreeSWITCH Consulting Services:<br>> <a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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>
</div></div></blockquote></div><br></div>