Or mod_xml_cdr. But regardless of the method, you&#39;ll still want to use sofia_contact at least to see if the user is currently registered.<br><br>There&#39;ll probably be lower overhead to static XML if you don&#39;t need your dialplan generated dynamically.<br>
<br>It doesn&#39;t matter what method is used to serve the user directory - user_exists and sofia_contact will work with them all.<br><br>-Steve<br><br><br><div class="gmail_quote">2010/9/12 Yuriy Nasida <span dir="ltr">&lt;<a href="mailto:nasida@live.ru">nasida@live.ru</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



<div>
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" target="_blank">http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration</a><br>
<br><br>Regards,<br>Nasida Yuriy<br><br><br> <br>
<hr>
Date: Fri, 10 Sep 2010 09:07:43 +0100<br>From: <a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
Subject: Re: [Freeswitch-users] How to check user in directory<div><div></div><div class="h5"><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&#39;t exist, reject the call --&gt;<br>&lt;extension name=&quot;user_not_found&quot;&gt;<br>  &lt;condition field=&quot;${user_exists(id ${destination_number} $${domain})}&quot; expression=&quot;false&quot;&gt;<br>
    &lt;action application=&quot;hangup&quot; data=&quot;<i>UNALLOCATED_NUMBER</i>&quot; /&gt;<br>  &lt;/condition&gt;<br>&lt;/extension&gt;<br>&lt;!-- If the user is registered, forward the call to them --&gt;<br>&lt;extension name=&quot;user_registered&quot;&gt;<br>
  &lt;condition field=&quot;${sofia_contact(profile/${destination_number}@$${domain})}&quot; expression=&quot;(.+)&quot;&gt;<br>    &lt;action application=&quot;set&quot; data=&quot;hangup_on_bridge=true&quot; /&gt;<br>    &lt;action application=&quot;bridge&quot; data=&quot;$1&quot; /&gt;<br>
  &lt;/condition&gt;<br>&lt;/extension&gt;<br>&lt;!-- If the bridge fails, or the user wasn&#39;t registered, fall back to voicemail --&gt;<br>&lt;extension name=&quot;voicemail&quot;&gt;<br>  &lt;condition field=&quot;destination_number&quot; expression=&quot;.*&quot;&gt;<br>
    &lt;action application=&quot;voicemail&quot; data=&quot;profile $${domain} ${destination_number}&quot; /&gt;<br>  &lt;/condition&gt;<br>&lt;/extension&gt;<br><br>-Steve<br><br><br>
<div>On 10 September 2010 05:20, Boris Kovalenko <span dir="ltr">&lt;<a href="mailto:boris@tagnet.ru" target="_blank">boris@tagnet.ru</a>&gt;</span> wrote:<br>
<blockquote style="padding-left: 1ex;"> 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&#39;t in directory? I want to call voicemail in<br>first case and play &#39;invalid number&#39; 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" target="_blank">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></div></div>_______________________________________________ FreeSWITCH-users mailing list <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>                                               </div>

<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>
<br></blockquote></div><br>