<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I think it is better not to use the static xml config files (inside folders directiry\dialplan). Instead, use one of the available programming languages (e.g. lua) for realization realtime directory\dialplan. Thus you will be given all the information you want (user registered\exists or not) from a database by your management script.<BR>
<BR>
for help<BR>
<A href="http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration">http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration</A><BR>
<BR><BR>Regards,<BR>Nasida Yuriy<BR><BR><BR> <BR>
<HR id=stopSpelling>
Date: Fri, 10 Sep 2010 09:07:43 +0100<BR>From: steveayre@gmail.com<BR>To: freeswitch-users@lists.freeswitch.org<BR>Subject: Re: [Freeswitch-users] How to check user in directory<BR><BR>Does user exist in user directory?<BR><A href="http://wiki.freeswitch.org/wiki/Mod_commands#user_exists" target=_blank>http://wiki.freeswitch.org/wiki/Mod_commands#user_exists</A><BR><BR>Is the user registered?<BR><A href="http://wiki.freeswitch.org/wiki/Function_sofia_contact" target=_blank>http://wiki.freeswitch.org/wiki/Function_sofia_contact</A><BR><BR>Quick example (untested but would probably work):<BR><BR><!-- If the user doesn't exist, reject the call --><BR><extension name="user_not_found"><BR> <condition field="${user_exists(id ${destination_number} $${domain})}" expression="false"><BR> <action application="hangup" data="<I>UNALLOCATED_NUMBER</I>" /><BR> </condition><BR></extension><BR><!-- If the user is registered, forward the call to them --><BR><extension name="user_registered"><BR> <condition field="${sofia_contact(profile/${destination_number}@$${domain})}" expression="(.+)"><BR> <action application="set" data="hangup_on_bridge=true" /><BR> <action application="bridge" data="$1" /><BR> </condition><BR></extension><BR><!-- If the bridge fails, or the user wasn't registered, fall back to voicemail --><BR><extension name="voicemail"><BR> <condition field="destination_number" expression=".*"><BR> <action application="voicemail" data="profile $${domain} ${destination_number}" /><BR> </condition><BR></extension><BR><BR>-Steve<BR><BR><BR>
<DIV class=ecxgmail_quote>On 10 September 2010 05:20, Boris Kovalenko <SPAN dir=ltr><<A href="mailto:boris@tagnet.ru">boris@tagnet.ru</A>></SPAN> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote> Hello!<BR><BR> I have a set of local users registered to freeswitch. So, when user<BR>is not registered with switch I get USER_NOT_REGISTERED when route call<BR>to it. But is there a way to know is user present in directory and not<BR>registered, or even isn't in directory? I want to call voicemail in<BR>first case and play 'invalid number' message in second. Is this possible?<BR><BR>--<BR>Regards,<BR>Boris<BR><BR><BR><BR>_______________________________________________<BR>FreeSWITCH-users mailing list<BR><A href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</A><BR><A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target=_blank>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" target=_blank>http://www.freeswitch.org</A><BR></BLOCKQUOTE></DIV><BR><BR>_______________________________________________ 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                                            </body>
</html>