[Freeswitch-users] mod_perl vs mod_xml_curl

Eugene Prokopiev enp at itx.ru
Thu Nov 22 13:59:59 MSK 2012


Hi,

I tried to to authenticate users from external source with mod_perl or
mod_xml_curl. Configuration and code looks like:

mod_perl:

<configuration name="perl.conf">
  <settings>
    <param name="xml-handler-script" value="/var/lib/freeswitch/scripts/
directory.pl"/>
    <param name="xml-handler-bindings" value="directory"/>
  </settings>
</configuration>

$XML_STRING = '
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
  <section name="directory">
    <domain name="$${local_address}">
      <params>
        <param name="dial-string" value="${sofia_contact(${dialed_user}@
${dialed_domain})}"/>
      </params>
      <groups>
        <group name="local">
          <users>
            <user id="123"><params><param name="password"
value="123"/></params></user>
           </users>
        </group>
      </groups>
    </domain>
  </section>
</document>
';

mod_xml_curl:

<configuration name="xml_curl.conf">
  <bindings>
    <binding name="directory">
      <param name="gateway-url" value="http://localhost:5000"
bindings="directory"/>
    </binding>
  </bindings>
</configuration>

use Mojolicious::Lite;
post '/' => 'index';
app->start;
__DATA__
@@ index.html.ep
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
  <section name="directory">
    <domain name="$${local_address}">
      <params>
        <param name="dial-string" value="${sofia_contact(${dialed_user}@
${dialed_domain})}"/>
      </params>
      <groups>
        <group name="local">
          <users>
            <user id="123"><params><param name="password"
value="123"/></params></user>
           </users>
        </group>
      </groups>
    </domain>
  </section>
</document>

Authentication via mod_xml_curl was succeeded, authentication via mod_perl
was failed. What is wring with it?

--
Regards,
Eugene Prokopiev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20121122/ccec9ea2/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list