<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Steve, I think, you not absolutely correctly have understood me or I have written not clearly =)<BR>
&nbsp;<BR>
"Or mod_xml_cdr".<BR>
&nbsp;I have not understood why you mentioned about this module<BR>
&nbsp;<BR>
"But regardless of the method, you'll still want to use sofia_contact at least to see if the user is currently registered."<BR>
&nbsp;<BR>
FS can store the information on the registered users in a database through odbc.<BR>
http:// wiki.freeswitch.org/wiki/Using_ODBC_in_the_core<BR>
&nbsp;<BR>
Thus, we can not use sofia_contact for definition the user is registered or not. Instead of sofia_contact we do simple check in our database of an operating script.<BR>
&nbsp;<BR>
Such method is especially useful at work of several FS with a share database.<BR>
&nbsp;<BR>
If you use sofia_contact, check the user is registered or not occurs particularly on it FS.<BR>If check occurs in a shared database, we receive the information on that the user on one of our&nbsp;several FS is registered<BR>
&nbsp;<BR>
<BR>Regards,<BR>Nasida Yuriy<BR>&nbsp;<BR>
<HR id=stopSpelling>
Date: Mon, 13 Sep 2010 15:05:11 +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>Or mod_xml_cdr. But regardless of the method, you'll still want to use sofia_contact at least to see if the user is currently registered.<BR><BR>There'll probably be lower overhead to static XML if you don't need your dialplan generated dynamically.<BR><BR>It doesn'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=ecxgmail_quote>2010/9/12 Yuriy Nasida <SPAN dir=ltr>&lt;<A href="mailto:nasida@live.ru">nasida@live.ru</A>&gt;</SPAN><BR>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote>
<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)&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" target=_blank>http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration</A><BR><BR><BR>Regards,<BR>Nasida Yuriy<BR><BR><BR>&nbsp;<BR>
<HR>
Date: Fri, 10 Sep 2010 09:07:43 +0100<BR>From: <A href="mailto:steveayre@gmail.com">steveayre@gmail.com</A><BR>To: <A href="mailto:freeswitch-users@lists.freeswitch.org">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'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>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">&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></DIV></DIV>_______________________________________________ FreeSWITCH-users mailing list <A href="mailto:FreeSWITCH-users@lists.freeswitch.org">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><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>