Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] xml_curl dynamically register users problem


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
juanma.v82 at gmail.com
Guest





PostPosted: Fri Apr 17, 2009 12:16 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with 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?

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

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Fri Apr 17, 2009 12:42 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with 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)



-- Meet us at ClueCon! http://www.cluecon.com
Back to top
Prometheus001 at gmx.net
Guest





PostPosted: Mon Apr 20, 2009 6:22 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with quote

I had the same problem some time ago.

Setting the
<param name="dial-string"
value="{presence_id=${dialed_user}@${dialed_domain},transfer_fallback_extension=${dialed_user}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>

in the xml-curl answer solved my problem.
In the config files this is set in
/usr/local/freeswitch/conf/directory/default.xml
and you also need it in your xml-curl.

Best regards
Peter

JuanMa schrieb:
Quote:
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
<mailto: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:sip:200.49.25.11
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
<mailto: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 <mailto:brian@freeswitch.org>

------------------------------------------------------------------------

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
juanma.v82 at gmail.com
Guest





PostPosted: Wed Apr 22, 2009 1:09 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with quote

Peter Thanks for your reply:

I did what you said but FS still with the same problem, cant found the
user.

This is my reply to registration request

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="$${domain}">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>
<groups>
<group name="default">
<users>
<user id="5000">
<params>
<param name="password" value="5000"/>
<param name="vm-password" value="5000"/>
</params>
<variables>
<variable name="sip-force-contact" value="NDLB-
connectile-dysfunction"/>
<variable name="user_context" value="default"/>
</variables>
</user>
</users>
</group>
</groups>
</domain>
</section>
</document>

I have made some changes but the result is the same, the registration
is ok.

My dial plan reply, call from user 1000 to user 5000 registered
through xml_curl

<document type="freeswitch/xml">
<section name="dialplan" description="default">
<context name="default">
<extension name="llamando">
<condition field="destination_number" expresion="^5000$">
<action application="bridge" data="user/5000"/>
</condition>
</extension>
</context>
</section>
</document>

console returns:

2009-04-22 13:28:45 [NOTICE] switch_channel.c:565
switch_channel_set_name() New Channel sofia/internal/1000@200.49.25.11
[a6bb1f88-2f5a-11de-b18a-8fd11ffefe88]
2009-04-22 13:28:45 [INFO] mod_dialplan_xml.c:233 dialplan_hunt()
Processing 1000->5000 in context default
2009-04-22 13:28:45 [ERR] switch_xml.c:1532 switch_xml_locate()
Error[[error near line 1]: root tag missing]
2009-04-22 13:28:45 [WARNING] mod_dptools.c:2171
user_outgoing_channel() Can't find user [5000@200.49.25.11]
2009-04-22 13:28:45 [ERR] switch_ivr_originate.c:1116
switch_ivr_originate() Cannot create outgoing channel of type [user]
cause: [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [INFO] mod_dptools.c:1909 audio_bridge_function()
Originate Failed. Cause: SUBSCRIBER_ABSENT
2009-04-22 13:28:45 [NOTICE] mod_dptools.c:1936
audio_bridge_function() Hangup sofia/internal/1000@200.49.25.11
[CS_EXECUTE] [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:957
switch_core_session_thread() Session 10 (sofia/internal/1000@200.49.25.11
) Ended
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:959
switch_core_session_thread() Close Channel sofia/internal/1000@200.49.25.11
[CS_HANGUP]

Any idea what is i am doing wrong?

Thanks
Juan Manuel

On Apr 20, 2009, at 8:14 PM, Peter P GMX wrote:

Quote:
I had the same problem some time ago.

Setting the
<param name="dial-string"
value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>

in the xml-curl answer solved my problem.
In the config files this is set in
/usr/local/freeswitch/conf/directory/default.xml
and you also need it in your xml-curl.

Best regards
Peter

JuanMa schrieb:
Quote:
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
<mailto: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:sip:200.49.25.11
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
<mailto: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 <mailto:brian@freeswitch.org>

------------------------------------------------------------------------

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
mike at jerris.com
Guest





PostPosted: Wed Apr 22, 2009 1:17 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with quote

$${domain} (or any other preprocessor vars) will not be expanded on an
xml_curl return.

Mike

On Apr 22, 2009, at 12:31 PM, JuanMa wrote:

Quote:
Peter Thanks for your reply:

I did what you said but FS still with the same problem, cant found the
user.

This is my reply to registration request

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="$${domain}">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>
<groups>
<group name="default">
<users>
<user id="5000">
<params>
<param name="password" value="5000"/>
<param name="vm-password" value="5000"/>
</params>
<variables>
<variable name="sip-force-contact" value="NDLB-
connectile-dysfunction"/>
<variable name="user_context" value="default"/>
</variables>
</user>
</users>
</group>
</groups>
</domain>
</section>
</document>

I have made some changes but the result is the same, the registration
is ok.

My dial plan reply, call from user 1000 to user 5000 registered
through xml_curl

<document type="freeswitch/xml">
<section name="dialplan" description="default">
<context name="default">
<extension name="llamando">
<condition field="destination_number" expresion="^5000$">
<action application="bridge" data="user/5000"/>
</condition>
</extension>
</context>
</section>
</document>

console returns:

2009-04-22 13:28:45 [NOTICE] switch_channel.c:565
switch_channel_set_name() New Channel sofia/internal/1000@200.49.25.11
[a6bb1f88-2f5a-11de-b18a-8fd11ffefe88]
2009-04-22 13:28:45 [INFO] mod_dialplan_xml.c:233 dialplan_hunt()
Processing 1000->5000 in context default
2009-04-22 13:28:45 [ERR] switch_xml.c:1532 switch_xml_locate()
Error[[error near line 1]: root tag missing]
2009-04-22 13:28:45 [WARNING] mod_dptools.c:2171
user_outgoing_channel() Can't find user [5000@200.49.25.11]
2009-04-22 13:28:45 [ERR] switch_ivr_originate.c:1116
switch_ivr_originate() Cannot create outgoing channel of type [user]
cause: [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [INFO] mod_dptools.c:1909 audio_bridge_function()
Originate Failed. Cause: SUBSCRIBER_ABSENT
2009-04-22 13:28:45 [NOTICE] mod_dptools.c:1936
audio_bridge_function() Hangup sofia/internal/1000@200.49.25.11
[CS_EXECUTE] [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:957
switch_core_session_thread() Session 10 (sofia/internal/1000@200.49.25.11
) Ended
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:959
switch_core_session_thread() Close Channel sofia/internal/1000@200.49.25.11
[CS_HANGUP]

Any idea what is i am doing wrong?

Thanks
Juan Manuel

On Apr 20, 2009, at 8:14 PM, Peter P GMX wrote:

Quote:
I had the same problem some time ago.

Setting the
<param name="dial-string"
value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>

in the xml-curl answer solved my problem.
In the config files this is set in
/usr/local/freeswitch/conf/directory/default.xml
and you also need it in your xml-curl.

Best regards
Peter

JuanMa schrieb:
Quote:
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
<mailto: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:sip:200.49.25.11
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
<mailto: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 <mailto:brian@freeswitch.org>

------------------------------------------------------------------------

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
juanma.v82 at gmail.com
Guest





PostPosted: Wed Apr 22, 2009 4:44 pm    Post subject: [Freeswitch-users] xml_curl dynamically register users probl Reply with quote

Yes, I saw that after send that email.

This is the corrected one


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="directory">
<domain name="200.49.25.11">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain},transfer _fallback_extension=${dialed_user}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>
<groups>
    <group name="default">
<users>
<user id="5000">
<params>
<param name="password" value="5000"/>
<param name="vm-password" value="5000"/>
</params>
<variables>
       <variable name="sip-force-contact" value="NDLB-connectile-dysfunction"/>
     <variable name="user_context" value="default"/>
     </variables>
</user>
</users>
</group>
</groups>
</domain>
</section>
</document>


And the dial plan:


<document type="freeswitch/xml">
<section name="dialplan" description="default">
<context name="default">
<extension name="llamando">
<condition field="destination_number" expresion="^5000$">
<action application="bridge" data="user/5000"/>
</condition>
</extension>
</context>
</section>
</document>




I tried with:


<action application="bridge" data="user/5000"/>

<action application="bridge" data="user/5000@200.49.25.11 (5000@200.49.25.11)"/>

<action application="bridge" data="user/5000%200.49.25.11"/>



The console is the same:


2009-04-22 18:00:28 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 1000->5000 in context default
2009-04-22 18:00:28 [ERR] switch_xml.c:1532 switch_xml_locate() Error[[error near line 1]: root tag missing]
2009-04-22 18:00:28 [WARNING] mod_dptools.c:2171 user_outgoing_channel() Can't find user [5000@200.49.25.11 (5000@200.49.25.11)]
2009-04-22 18:00:28 [ERR] switch_ivr_originate.c:1116 switch_ivr_originate() Cannot create outgoing channel of type [user] cause: [SUBSCRIBER_ABSENT]
2009-04-22 18:00:28 [INFO] mod_dptools.c:1909 audio_bridge_function() Originate Failed.  Cause: SUBSCRIBER_ABSENT
2009-04-22 18:00:28 [NOTICE] mod_dptools.c:1936 audio_bridge_function() Hangup sofia/internal/1000@200.49.25.11 (1000@200.49.25.11) [CS_EXECUTE] [SUBSCRIBER_ABSENT]
2009-04-22 18:00:28 [NOTICE] switch_core_session.c:957 switch_core_session_thread() Session 17 (sofia/internal/1000@200.49.25.11 (1000@200.49.25.11)) Ended
2009-04-22 18:00:28 [NOTICE] switch_core_session.c:959 switch_core_session_thread() Close Channel sofia/internal/1000@200.49.25.11 (1000@200.49.25.11) [CS_HANGUP]
2009-04-22 18:00:52 [NOTICE] switch_channel.c:565 switch_channel_set_name() New Channel sofia/internal/1000@200.49.25.11 (1000@200.49.25.11) [a9e8b0d2-2f80-11de-90e9-8b6680def56e]


also i was trying with the dialplan hardcode in /usr/local/freeswitch/conf/dialplan/default.xml.



Thanks in advance.


On Wed, Apr 22, 2009 at 3:03 PM, Michael Jerris <mike@jerris.com (mike@jerris.com)> wrote:
Quote:
$${domain} (or any other preprocessor vars) will not be expanded on an
xml_curl return.

Mike


On Apr 22, 2009, at 12:31 PM, JuanMa wrote:

Quote:
Peter Thanks for your reply:

I did what you said but FS still with the same problem, cant found the
user.

This is my reply to registration request

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
      <section name="directory">
              <domain name="$${domain}">
              <params>
              <param name="dial-string" value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>
              </params>
                      <groups>
                      <group name="default">
                                      <users>
                                              <user id="5000">
                                                      <params>
                                                              <param name="password" value="5000"/>
                                                              <param name="vm-password" value="5000"/>
                                                      </params>
                                                      <variables>
                                                              <variable name="sip-force-contact" value="NDLB-
connectile-dysfunction"/>
                                                      <variable name="user_context" value="default"/>
                                              </variables>
                                              </user>
                                      </users>
                              </group>
                      </groups>
              </domain>
      </section>
</document>

I have made some changes but the result is the same, the registration
is ok.

My dial plan reply, call from user 1000 to user 5000 registered
through xml_curl

<document type="freeswitch/xml">
      <section name="dialplan" description="default">
              <context name="default">
                      <extension name="llamando">
                              <condition field="destination_number" expresion="^5000$">
                                      <action application="bridge" data="user/5000"/>
                              </condition>
                      </extension>
              </context>
      </section>
</document>

console returns:

2009-04-22 13:28:45 [NOTICE] switch_channel.c:565
switch_channel_set_name() New Channel sofia/internal/1000@200.49.25.11 (1000@200.49.25.11)
[a6bb1f88-2f5a-11de-b18a-8fd11ffefe88]
2009-04-22 13:28:45 [INFO] mod_dialplan_xml.c:233 dialplan_hunt()
Processing 1000->5000 in context default
2009-04-22 13:28:45 [ERR] switch_xml.c:1532 switch_xml_locate()
Error[[error near line 1]: root tag missing]
2009-04-22 13:28:45 [WARNING] mod_dptools.c:2171
user_outgoing_channel() Can't find user [5000@200.49.25.11 (5000@200.49.25.11)]
2009-04-22 13:28:45 [ERR] switch_ivr_originate.c:1116
switch_ivr_originate() Cannot create outgoing channel of type [user]
cause: [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [INFO] mod_dptools.c:1909 audio_bridge_function()
Originate Failed.  Cause: SUBSCRIBER_ABSENT
2009-04-22 13:28:45 [NOTICE] mod_dptools.c:1936
audio_bridge_function() Hangup sofia/internal/1000@200.49.25.11 (1000@200.49.25.11)
[CS_EXECUTE] [SUBSCRIBER_ABSENT]
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:957
switch_core_session_thread() Session 10 (sofia/internal/1000@200.49.25.11 (1000@200.49.25.11)
) Ended
2009-04-22 13:28:45 [NOTICE] switch_core_session.c:959
switch_core_session_thread() Close Channel sofia/internal/1000@200.49.25.11 (1000@200.49.25.11)
 [CS_HANGUP]

Any idea what is i am doing wrong?

Thanks
Juan Manuel

On Apr 20, 2009, at 8:14 PM, Peter P GMX wrote:

Quote:
I had the same problem some time ago.

Setting the
<param name="dial-string"
value="{presence_id=${dialed_user}@$
{dialed_domain},transfer_fallback_extension=${dialed_user}}$
{sofia_contact(${dialed_user}@${dialed_domain})}"/>

in the xml-curl answer solved my problem.
In the config files this is set in
  /usr/local/freeswitch/conf/directory/default.xml
and you also need it in your xml-curl.

Best regards
Peter

JuanMa schrieb:
Quote:
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)
<mailto: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:sip:200.49.25.11
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)
<mailto: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) <mailto:brian@freeswitch.org (brian@freeswitch.org)>

------------------------------------------------------------------------

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services