<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you veeery much, I'll give it a try!<br>
<br>
Best,<br>
Cristian<br>
<br>
Peter P GMX wrote:
<blockquote cite="mid:48D1755D.30506@gmx.net" type="cite">
  <pre wrap="">Hello,

I have done it the following way:
xml_curl.conf.xml:

&lt;configuration name="xml_curl.conf" description="cURL XML Gateway"&gt;
&lt;bindings&gt;
&lt;binding name="example"&gt;
&lt;param name="gateway-url" 
value=<a class="moz-txt-link-rfc2396E" href="http://192.168.0.35:3000/xml_curls/directory">"http://192.168.0.35:3000/xml_curls/directory"</a> 
bindings="configuration|dialplan|directory"/&gt;
&lt;/binding&gt;
&lt;/bindings&gt;
&lt;/configuration&gt;

My Ruby on Rails server is listening on Port 3000. But https works also 
(but very very slow).

If a phone (e.g. 1002) tries to register I answer with

&lt;document type="freeswitch/xml"&gt;
&lt;section name="directory"&gt;
&lt;domain name="my.domain"&gt;
&lt;user id="1002"&gt;
&lt;params&gt;
&lt;param name="password" value="xxxx"/&gt;
&lt;/params&gt;

&lt;variables&gt;
&lt;variable name="accountcode" value="1002"/&gt;
&lt;variable name="user_context" value="default"/&gt;
&lt;variable name="effective_caller_id_name" value="Extension 1002"/&gt;
&lt;variable name="effective_caller_id_number" value="1002"/&gt;
&lt;/variables&gt;
&lt;/user&gt;
&lt;/domain&gt;
&lt;/section&gt;
&lt;/document&gt;

Hope this helps

Best regards
Peter


Cristian Talle schrieb:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Carl,

I am experiencing a similar problem, have you found any solution so far?

Thank you,
Cristian Talle

  
    </pre>
    <blockquote type="cite">
      <pre wrap="">I wonder if anybody could provide a complete set of configuration files for
a working xml_curl user directory lookup.

I have been trying using the default set of configuration files, added the
xml_curl module loading and modified the configuration like this:

&lt;configuration name="xml_curl.conf" description="cURL XML Gateway"&gt;
  &lt;bindings&gt;
    &lt;binding name="dialplan fetcher"&gt;
      &lt;param name="gateway-url" value=<a class="moz-txt-link-rfc2396E" href="http://172.16.26.10/apache2-default/dialplan.php">"
http://172.16.26.10/apache2-default/dialplan.php"</a> <a class="moz-txt-link-rfc2396E" href="http://172.16.26.10/apache2-default/dialplan.php%22">&lt;http://172.16.26.10/apache2-default/dialplan.php%22&gt;</a> bindings="dialplan"/&gt;
    &lt;/binding&gt;
    &lt;binding name="directory fetcher"&gt;
      &lt;param name="gateway-url" value=<a class="moz-txt-link-rfc2396E" href="http://172.16.26.10/apache2-default/directory.php">"
http://172.16.26.10/apache2-default/directory.php"</a> <a class="moz-txt-link-rfc2396E" href="http://172.16.26.10/apache2-default/directory.php%22">&lt;http://172.16.26.10/apache2-default/directory.php%22&gt;</a> bindings="directory"/&gt;
    &lt;/binding&gt;
  &lt;/bindings&gt;
&lt;/configuration&gt;

Both scripts just dump the expected XML result:

  &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;document type="freeswitch/xml"&gt;
  &lt;section name="dialplan" description="example_curl_dialplan"&gt;
    &lt;context name="default"&gt;
      &lt;extension name="curl_test"&gt;
        &lt;condition field="destination_number" expression="^999999999$"&gt;
          &lt;action application="answer"/&gt;
          &lt;action application="send_display" data="Echo Test"/&gt;
          &lt;action application="echo"/&gt;
        &lt;/condition&gt;
      &lt;/extension&gt;
    &lt;/context&gt;
  &lt;/section&gt;
&lt;/document&gt;

&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
&lt;document type="freeswitch/xml"&gt;
  &lt;section name="directory" description="example_curl_directory"&gt;
     &lt;domain name="172.26.16.10"&gt;
       &lt;user id="carl"&gt;
         &lt;params&gt;
           &lt;param name="password" value="1234"/&gt;
         &lt;/params&gt;
       &lt;/user&gt;
     &lt;/domain&gt;
  &lt;/section&gt;
&lt;/document&gt;

The sofia-sip parameter "accept-blind-reg" is set to false.

When using one of the default users (1000), I can register and the xml_curl
dialplan lookup works like expected. However, when trying to register as
user carl,
I can see that the XML is received by the xml_curl interface, but sofia-sip
complains that it cannot find the user. Here is a part of the console
output:

mod_xml_curl.c:194 xml_url_fetch() XML response is in
/tmp/6053a796-2bdb-11dd-9449-17a3c8baef50.tmp.xml
sofia_reg.c:1061 sofia_reg_parse_auth() can't find user [carl at 172.16.26.10 <a class="moz-txt-link-rfc2396E" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">&lt;http://lists.freeswitch.org/mailman/listinfo/freeswitch-users&gt;</a>]

When using the xml_locate cli command, I get a similar result:

    
      </pre>
      <blockquote type="cite">
        <pre wrap="">/ xml_locate directory domain name 172.16.26.10
      
        </pre>
      </blockquote>
      <pre wrap="">/mod_xml_curl.c:194 xml_url_fetch() XML response is in
/tmp/93d6019a-2bdb-11dd-9449-17a3c8baef50.tmp.xml
API CALL [xml_locate(directory domain name 172.16.26.10)] output:
&lt;domain name="172.16.26.10"&gt;
### contents of local XML file (users 1000 and up)
&lt;/domain&gt;

It fetches the XML from the webserver and dumps the contents of the local
XML files. Disabling the "directory" section in the default freeswitch.xml
file does not help,
as I initially thought it might be caused by the duplicate domain names.

I hope someone could help out here.

  
    
      </pre>
    </blockquote>
    <pre wrap="">
_______________________________________________
Freeswitch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>

  
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
Freeswitch-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>

  </pre>
</blockquote>
<br>
</body>
</html>