[Freeswitch-users] Problems in using mod_xml_curl at user authentication.
rakib 0000
rakib0000 at hotmail.com
Mon Dec 19 08:02:23 MSK 2011
Hello list,
I'm a newbie FreeSwitch user, trying to learn how
mod_xml_curl works. I've done the basics things mentioned in FreeSwitch
wiki pages about using mod_xml_curl. Now my plan to use mod_xml_curl for
user registration. So, what I've done is - I wrote a server end
application which reads POST request from mod_xml_curl and tries to find
whether it's a valid post request (REGISTER) or not. If the request is a
REGISTER request - then the application extracts the user id, domain.
Then, it queries the database and extracts password and creates xml
response. One of my sample response are like below (the following
response has been taken from /tmp):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="192.168.0.108">
<groups>
<group name="default">
<users>
<user id="1100">
<params>
<param name="password" value="sakib"/>
</params>
<variables>
<variable name="user_context" value="default"/>
</variables>
</user>
</users>
</group>
</groups>
</domain>
</section>
</document>
With above response, I didn't had any luck. It fails to register, with following response:
2011-12-18 14:51:29.253474 [WARNING] sofia_reg.c:2446 Can't find user [1100 at 192.168.0.108]
You must define a domain called '192.168.0.108' in your directory and add a user with the id="1100" attribute
and you must configure your device to use the proper domain in it's authentication credentials.
To
figure it out, I've tried in different ways too. Like, I've used the
above response patterns to create a user under conf/directory/default/
directory, but didn't work. Then I tried the following xml response
pattern :
<include>
<user id="1003">
<params>
<param name="password" value="$${default_password}"/>
</params>
<variables>
<variable name="user_context" value="default"/>
</variables>
</user>
</include>
with
the above xml I manage to create a user and authenticate perfectly.
But, I've modified my server end application to give a that kind of
response, but didn't work though. I've copied the server response (from
the content dumped under /tmp) to create an user under
conf/directory/default/ directory - but it works. So, my question is
what am I missing here? FreeSwitch tries to get the response from the
server, it gets the response too, but somehow not interpreting the
response (or something else?) and gives "can't find user" error. Any
hint's , suggestion will be very helpful. (note, I'm not using any
webserver here.)
Thanks in advance,
Rakib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111219/34813b6d/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list