juanma.v82 at gmail.com Guest
|
Posted: Mon Apr 20, 2009 2:42 pm Post subject: [Freeswitch-users] xml_curl dynamically register users pro |
|
|
Brian thx for you help.
404 was my mistake it is "user not found"
2009-04-20 12:16:24 [WARNING] mod_dptools.c:2171 user_outgoing_channel() Can't find user [4000@200.49.25.11 (4000@200.49.25.11)]
To explain better my problem:
i have two users, one 1000 and another 4000,the user 1000 is physically in the user directory of Freeswitch(FS) and the user 4000 is dynamically registered througth xml_curl.
The request of FS when user 4000 wants to register is:
sip_to_user:4000
tag_name:domain
key_value:200.49.25.11
sip_contact_user:4000
section:directory
sip_auth_method:REGISTER
sip_auth_realm:200.49.25.11
sip_auth_username:4000
sip_user_agent:eyeBeam release 1004p stamp 31962
sip_auth_cnonce:f63211853d983216
sip_request_host:200.49.25.11
hostname:FreeSwitch_curl_XML
ip:200.123.150.217
user:4000
action:sip_auth
sip_profile:internal
key_name:name
sip_auth_qop:auth
sip_from_user:4000
sip_to_host:200.49.25.11
key:id
sip_auth_nonce:8fad7fae-2db9-11de-83c7-b10c5224858b
domain:200.49.25.11
sip_auth_nc:00000006
sip_from_host:200.49.25.11
sip_auth_response:4db7a5476e949c8d133f55279d837b2f
sip_auth_uri:[url=sip:200.49.25.11]sip:200.49.25.11[/url]
sip_contact_host:200.123.150.217
and the reply is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="200.49.25.11">
<user id="4000">
<params>
<param name"password" value="4000"/>
<param name="vm-password" value="4000"/>
</params>
<variables>
<variable name="user_context" value="cualquiera"/>
<variable name="sip-force-contact" value="NDLB-connectile-dysfunction"/>
<variable name="user_context" value="default"/>
</variables>
</user>
</domain>
</section>
</document>
and the user 4000 register without problems.
I made two calls.
From user 4000 to 1000
<?xml version="1.0" encoding="UTF-8"?>
<document type="freeswitch/xml">
<section name="dialplan" description="asdasd">
<context name="default">
<extension name="llamando">
<condition field="destination_number" expresion="^1000$">
<action application="bridge" data="user/1000" />
</condition>
</extension>
</context>
</section>
</document>
The call is ok the two user can talk without problems.
Another from user 1000 to 4000
<?xml version="1.0" encoding="UTF-8"?>
<document type="freeswitch/xml">
<section name="dialplan" description="asdasd">
<context name="default">
<extension name="llamando">
<condition field="destination_number" expresion="^4000$">
<action application="bridge" data="user/4000" />
</condition>
</extension>
</context>
</section>
</document>
And get this error:
2009-04-20 12:16:24 [WARNING] mod_dptools.c:2171 user_outgoing_channel() Can't find user [4000@200.49.25.11 (4000@200.49.25.11)].
To resolve this problem users be must defined on boot time. But i want to do it dynamically, how was explain before.
Thanks
Juan Manuel
Quote: | On Apr 17, 2009, at 12:07 PM, JuanMa wrote:
Quote: | Hi,
I am using xml_curl, and what I'm trying to do is dynamically register
the users to the platform, instead of bulking all the users on the FS
boot time. So far I have successfully register the users and also make
calls through gateways or to static users (those users that are in the
physical files), however every time that I want to reach a User who
has been registered and configured through this method, It seams that
the FS could not find it (404). For what I have read in the mailings
list (http://lists.freeswitch.org/pipermail/freeswitch-users/2009-January/009863.html
) I've seen that theoretically the users MUST be defined on boot time
in order to be found, is this correct?
|
Looks like you're confusing dialplan with user directory.
Can you provide examples of what you're returning and what is
resulting in a 404?
Quote: |
For instance if I do have 10.000 users I will be forcing the FS to
have all of them in its database when perhaps I only have 1000 online
in that specific moment/switch. Perhaps this is something meaningless
for the server(in terms of cost or performance), but my first
impression is that is far from optimal.
So far it seams to be a really cool approach to make the systems
scale, how ever It's been very difficult to me to find accurate
information and in general I've ended looking at the code, and make my
own contribution to the docs.
If anyone can give any tip or direction I would really appreciate.
Thanks in advance.
Juan Manuel
|
Brian West
brian@freeswitch.org (brian@freeswitch.org) |
|
|