<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->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></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>