Hi in dialplan i see: <condition field="destination_number" expression="^(2[0-9])$"> -> check on variable destination_number and later <action application="bridge" data="user/${dialed_extension}@${domain_name}"></action> -> bridge to variable dialed_extension , other then checked destination_number or $1 from regexp try: <action application="bridge" data="user/${destination_number}%${sip_profile}"></action> or <action application="bridge" data="user/$1%${sip_profile}"></action> By Kleo On Tue, 22 Sep 2009, Filip Lyncker wrote:
Dear List,
I read the documentation, but Im still confused about how to dial a internal registered sip user.
I configured the both sip phones in the directory in my local.xml file :
<include> <domain name="$${domain}"> <user id="22" mailbox="22"> <params> <param name="password" value="Xk21%"></param> <param name="vm-password" value="22"></param> <param name="sip-port" value="5060"></param>
</params> <variables> <variable name="accountcode" value="22"></variable> <variable name="user_context" value="default"></variable> <variable name="effective_caller_id_name" value="Extension 22"></variable> <variable name="effective_caller_id_number" value="22"></variable> </variables> </user> <user id="24" mailbox="24"> <params> <param name="password" value="dudeldum"></param> <param name="vm-password" value="24"></param> <param name="sip-port" value="5060"></param>
</params> <variables> <variable name="accountcode" value="24"></variable> <variable name="user_context" value="default"></variable> <variable name="effective_caller_id_name" value="Extension 24"></variable> <variable name="effective_caller_id_number" value="24"></variable> </variables> </user> </domain> </include>
It seems, that they can connect to the freeswitch.
I configured the dialplan like following :
<include> <context name="default"> <extension name="diallocal"> <condition field="destination_number" expression="^(2[0-9])$"> <!--- The % behind the username tells FS to lookup the user in it's local sip_registration database --> <action application="bridge" data="user/${dialed_extension}@${domain_name}"></action> <!--- x.x.x.x in the line above is the IP address to the FreeSWITCH server/device --> <!--- If you don't want to bridge a call to a local registered user, but to a SIP URI, use the @ instead of %: <action application="bridge" data="sofia/profilename/500@x.x.x.x"/> --> </condition> </extension> ...
If I call from the sip user 24 to 22 , freeswitch logs the following and gives an busy tone immediately:
freeswitch@Bigfish> 2009-09-22 13:50:29.367114 [NOTICE] switch_channel.c:602 New Channel sofia/internal/24@192.168.1.34 [decc119c-a973-6b4c-bf11-ec251c653cda] 2009-09-22 13:50:29.372973 [INFO] mod_dialplan_xml.c:315 Processing 24->22 in context default 2009-09-22 13:50:29.372973 [WARNING] mod_dptools.c:2365 Can't find user [@192.168.1.34] 2009-09-22 13:50:29.372973 [ERR] switch_ivr_originate.c:1510 Cannot create outgoing channel of type [user] cause: [SUBSCRIBER_ABSENT] 2009-09-22 13:50:29.372973 [INFO] mod_dptools.c:2093 Originate Failed. Cause: SUBSCRIBER_ABSENT 2009-09-22 13:50:29.372973 [NOTICE] mod_dptools.c:2125 Hangup sofia/internal/24@192.168.1.34 [CS_EXECUTE] [SUBSCRIBER_ABSENT] 2009-09-22 13:50:29.390550 [NOTICE] switch_core_session.c:1086 Session 13 (sofia/internal/24@192.168.1.34) Ended 2009-09-22 13:50:29.390550 [NOTICE] switch_core_session.c:1088 Close Channel sofia/internal/24@192.168.1.34 [CS_DESTROY]
thanks again for your help ...
regards,
Filip
-- _____________________________________________________________ | You have moved the mouse. # | Windows must be restarted for the changes to take effect. # | <OK> # ##############################################################/ ~~ ~~ ~~ ~~ ~~ ~~ ~~ Vladimir `KLEO' Klejch Kleo'at'netbox.cz ... ... ... ...