[Freeswitch-users] How to load user account from databse ?
freeswitch noob
freeswitch.noob at gmail.com
Mon Oct 26 07:59:37 PDT 2009
Lei,
I am still learning myself, but I think I can help enough and others can
chime in where I am wrong.
If you have FS up and running you will need to install xml_curl (
http://wiki.freeswitch.org/wiki/Mod_xml_curl).
Then you will need to edit the config for it in your
conf/autoload_configs/xml_curl_conf.xml and add the following to the file.
<binding name="externalDir">
<param name="gateway-url" value="http://my.webserver.com/index.php"
bindings="directory"/>
</binding>
Then for every registered user call, a request will be posted to that script
location.
The posts vary but look something like:
[hostname] =>
test.local
[section] =>
directory
[tag_name] =>
domain
[key_name] =>
name
[key_value] =>
company1.test.local
[action] =>
sip_auth
[sip_profile] =>
internal
[sip_user_agent] => eyeBeam release 1100v stamp
47073
[sip_auth_username] =>
100
[sip_auth_realm] =>
company1.test.local
[sip_auth_nonce] =>
37bd639a-d181-4df3-b53d-ab4172ca3be9
[sip_auth_uri] =>
sip:company1.test.local;transport=udp
[sip_contact_user] =>
100
[sip_contact_host] =>
10.43.43.2
[sip_to_user] =>
100
[sip_to_host] =>
company1.test.local
[sip_from_user] =>
100
[sip_from_host] =>
company1.test.local
[sip_request_host] =>
company1.test.local
[sip_auth_qop] =>
auth
[sip_auth_cnonce] =>
207aae18a2af959346f87a2a3c2c7f8a
[sip_auth_nc] =>
00000001
[sip_auth_response] =>
770a1519789ba7606b3dcc6c4b7a99c5
[sip_auth_method] =>
REGISTER
[key] =>
id
[user] =>
100
[domain] =>
company1.test.local
[ip] => 10.43.43.2
Then your script can handle the connection to the DB and the verification of
the user information. My example uses PHP but any server side language that
can be posted to can be used in the above scenario.
On Sun, Oct 25, 2009 at 8:58 AM, Lei Tang <lei.tlfly at gmail.com> wrote:
> Hi All:
> I'm a newbie to FS. I'm using FS as a sbc and have about 20000 user
> account . Does somebody can tell me how to make FS load use account
> information from a database such as mssql or mysql? Could you give me a
> sample configuration file?
> Thanks a lots.
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091026/b36b59e3/attachment-0001.html
More information about the FreeSWITCH-users
mailing list