[Freeswitch-users] xml_curl dynamically register users problem

JuanMa juanma.v82 at gmail.com
Wed Apr 22 09:31:56 PDT 2009


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 at 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 at 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 at 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 at 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 at 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:

> 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:
>> 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 at 200.49.25.11
>> <mailto:4000 at 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 at 200.49.25.11
>> <mailto:4000 at 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
>>
>>
>>> On Apr 17, 2009, at 12:07 PM, JuanMa wrote:
>>>
>>>> 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?
>>>
>>>
>>>>
>>>> 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 at freeswitch.org <mailto:brian at freeswitch.org>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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





More information about the FreeSWITCH-users mailing list