<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)&nbsp;for realization realtime directory\dialplan. Thus you will be given all the information you want (user registered\exists&nbsp;or not) from a database by&nbsp;your management script.<BR>
&nbsp;<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>&nbsp;<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>&lt;!-- If the user doesn't exist, reject the call --&gt;<BR>&lt;extension name="user_not_found"&gt;<BR>&nbsp; &lt;condition field="${user_exists(id ${destination_number} $${domain})}" expression="false"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;action application="hangup" data="<I>UNALLOCATED_NUMBER</I>" /&gt;<BR>&nbsp; &lt;/condition&gt;<BR>&lt;/extension&gt;<BR>&lt;!-- If the user is registered, forward the call to them --&gt;<BR>&lt;extension name="user_registered"&gt;<BR>&nbsp; &lt;condition field="${sofia_contact(profile/${destination_number}@$${domain})}" expression="(.+)"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;action application="set" data="hangup_on_bridge=true" /&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;action application="bridge" data="$1" /&gt;<BR>&nbsp; &lt;/condition&gt;<BR>&lt;/extension&gt;<BR>&lt;!-- If the bridge fails, or the user wasn't registered, fall back to voicemail --&gt;<BR>&lt;extension name="voicemail"&gt;<BR>&nbsp; &lt;condition field="destination_number" expression=".*"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;action application="voicemail" data="profile $${domain} ${destination_number}" /&gt;<BR>&nbsp; &lt;/condition&gt;<BR>&lt;/extension&gt;<BR><BR>-Steve<BR><BR><BR>
<DIV class=ecxgmail_quote>On 10 September 2010 05:20, Boris Kovalenko <SPAN dir=ltr>&lt;<A href="mailto:boris@tagnet.ru">boris@tagnet.ru</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote>&nbsp;Hello!<BR><BR>&nbsp; &nbsp; 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>