<html><body bgcolor="#FFFFFF"><div>I meant to say mod_xml_curl - Sorry, been working with _cdr a lot today so when I thought curl I typed cdr. :)<br><br>Steve on iPhone</div><div><br>On 13 Sep 2010, at 17:59, Yuriy Nasida &lt;<a href="mailto:nasida@live.ru">nasida@live.ru</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>
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:// <a href="http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core"><a href="http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core">wiki.freeswitch.org/wiki/Using_ODBC_in_the_core</a></a><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: <a href="mailto:steveayre@gmail.com"><a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a></a><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org"><a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a></a><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"><a href="mailto:nasida@live.ru">nasida@live.ru</a></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"><a href="http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration">http://wiki.freeswitch.org/wiki/Mod_lua/Serving_Configuration</a></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"><a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a></a><br>To: <a href="mailto:freeswitch-users@lists.freeswitch.org"><a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a></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"><a href="http://wiki.freeswitch.org/wiki/Mod_commands#user_exists">http://wiki.freeswitch.org/wiki/Mod_commands#user_exists</a></a><br><br>Is the user registered?<br><a href="http://wiki.freeswitch.org/wiki/Function_sofia_contact" target="_blank"><a href="http://wiki.freeswitch.org/wiki/Function_sofia_contact">http://wiki.freeswitch.org/wiki/Function_sofia_contact</a></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"><a href="mailto:boris@tagnet.ru">boris@tagnet.ru</a></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"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br><a href="http://www.freeswitch.org/" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a><br></blockquote></div><br><br></div></div>_______________________________________________ FreeSWITCH-users mailing list <a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a> <a href="http://www.freeswitch.org/" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a> </div><br>_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org"><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a><br><a href="http://www.freeswitch.org/" target="_blank"><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></a><br><br></blockquote></div><br><br>_______________________________________________ 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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <a href="http://www.freeswitch.org">http://www.freeswitch.org</a>                                               
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>