<HTML><BODY>Thanks, that is work. Can U explain? Can U do the same but with the help of several conditions with AND logic (!a &amp; !b &amp; d) and with <SPAN class=hps>separate <FONT style="BACKGROUND-COLOR: #ffff99" face="Courier New">^(\d{3,16})? - condition?</FONT></SPAN><BR><BR><BR>Среда, 27 февраля 2013, 5:33 -05:00 от Scott &lt;8f27e956@gmail.com&gt;:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #0857a6 1px solid; PADDING-BOTTOM: 0px; MARGIN: 10px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; PADDING-TOP: 0px" class=mailru-blockquote>
<DIV>
<DIV class="js-helper js-readmsg-msg">
<STYLE type=text/css></STYLE>

<DIV id=style_13619617110000000458 class=mr_read__body><BASE href="https://e.mail.ru/cgi-bin/" target=_self>
<DIV id=style_13619617110000000458_BODY><SPAN style="BACKGROUND-COLOR: rgb(255,255,153)"><SPAN style="FONT-FAMILY: courier new,monospace">&lt;!-- eavesdrop --&gt;<BR>&lt;extension name="record_3..16_digits" continue="true"&gt;<BR>&lt;condition field="${is_already_recording}</SPAN>" expression="^$"/&gt;<BR></SPAN>
<DIV><SPAN style="FONT-FAMILY: courier new,monospace"><SPAN style="BACKGROUND-COLOR: rgb(255,255,153)">&lt;condition field="destination_number" expression="(?!^399|400$)^\d{3,16}?$" &gt;&nbsp; <SPAN style="BACKGROUND-COLOR: rgb(255,0,0)">&lt;!-- regex#2 --&gt;</SPAN><BR>&nbsp; &lt;action ... /&gt;<BR>&lt;/condition&gt;<BR></SPAN><BR></SPAN><SPAN style="FONT-FAMILY: courier new,monospace"></SPAN></DIV>"regex#2", as written, returns TRUE providing that dest_num matches a '\d{3,16} pattern but is NOT 399 or 400.&nbsp; Therefore,<BR><BR>399 = false<BR>400 = false<BR>4001 = true<BR>4005551212 = true<BR>416 = true<BR>4165551212 = true<BR>1234 = true<BR>ANONYMOUS = false<BR><BR>There is very, very little that CANNOT be done with native regex.<BR><BR>If you need me to "explain" the regex construction, let me know.<BR><BR>Cheers,<BR>/Scott<BR><SPAN style="BACKGROUND-COLOR: rgb(153,153,153)"><SPAN></SPAN></SPAN><BR><BR><BR><BR><BR>
<DIV>On 26 February 2013 03:01, Dmitriy Shumaev <SPAN dir=ltr>&lt;<A href="https://e.mail.ru/cgi-bin/sentmsg?mailto=mailto%3apm_zefman_r@mail.ru" target=_blank>pm_zefman_r@mail.ru</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex">
<DIV>Hi<BR><BR>I want to record all sessions, except calls to group numbers and to IVR. So I need something like:<BR>&nbsp;&lt;!-- eavesdrop --&gt;<BR>&nbsp;&lt;extension name="record_3..16_digits" continue="true"&gt;<BR>&nbsp;&nbsp; &lt;condition field="${is_already_recording}" expression="^$"/&gt;<BR>&nbsp;&nbsp; &lt;condition field="destination_number" expression!="^(400)$"/&gt;&nbsp;&nbsp;&lt;!--NOT EQUAL--&gt;&lt;!-- IVR --&gt;<BR>&nbsp;&nbsp; &lt;condition field="destination_number" expression!="^(399)$"/&gt;&nbsp;&nbsp;&lt;!--NOT EQUAL--&gt;&lt;!-- Group number --&gt;<BR>&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(\d{3,16})$"&gt;<BR>&nbsp;&lt;action application="set" data="RECORD_TITLE=Recording ${caller_id_name} ${caller_id_number} to ${destination_number} at ${strftime(%Y-%m-%d %H:%M)}"/&gt;<BR>&nbsp;&lt;action application="set" data="RECORD_STEREO=true"/&gt;<BR>&nbsp;&lt;action application="export" data="ignore_early_media=true"/&gt;<BR>&nbsp;&lt;action application="set" data="media_bug_answer_req=true"/&gt;<BR>&nbsp;&lt;action application="record_session" data="$${base_dir}/recordings/archive/${strftime(%Y-%m-%d-%H-%M-%S)}_${caller_id_name}_${caller_id_number}_2_${destination_number}.mp3"/&gt;<BR>&nbsp;&lt;action application="export" data="is_already_recording=true"/&gt;<BR>&nbsp;&nbsp; &lt;/condition&gt;<BR>&nbsp;&lt;/extension&gt;<BR>. <SPAN>But the syntax</SPAN> <SPAN>of condition </SPAN><SPAN>does not allow the</SPAN> <SPAN>operator "</SPAN><SPAN>not equal" or "!=". What should I do?<BR><BR><BR>With best regards, Shumaev DA, KBR Ltd.</SPAN></DIV><BR>_________________________________________________________________________<BR>Professional FreeSWITCH Consulting Services:<BR><A href="https://e.mail.ru/cgi-bin/sentmsg?mailto=mailto%3aconsulting@freeswitch.org" target=_blank>consulting@freeswitch.org</A><BR><A href="http://www.freeswitchsolutions.com" target=_blank>http://www.freeswitchsolutions.com</A><BR><BR>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR><A href="http://www.cudatel.com" target=_blank>http://www.cudatel.com</A><BR><BR>Official FreeSWITCH Sites<BR><A href="http://www.freeswitch.org" target=_blank>http://www.freeswitch.org</A><BR><A href="http://wiki.freeswitch.org" target=_blank>http://wiki.freeswitch.org</A><BR><A href="http://www.cluecon.com" target=_blank>http://www.cluecon.com</A><BR><BR>FreeSWITCH-users mailing list<BR><A href="https://e.mail.ru/cgi-bin/sentmsg?mailto=mailto%3aFreeSWITCH%2dusers@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><BR></BLOCKQUOTE></DIV><BR></DIV>
<DIV>_________________________________________________________________________<BR>Professional FreeSWITCH Consulting Services:<BR><A href="https://e.mail.ru/cgi-bin/sentmsg?compose&amp;To=consulting@freeswitch.org">consulting@freeswitch.org</A><BR><A href="http://www.freeswitchsolutions.com" target=_blank>http://www.freeswitchsolutions.com</A><BR><BR>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR><A href="http://www.cudatel.com" target=_blank>http://www.cudatel.com</A><BR><BR>Official FreeSWITCH Sites<BR><A href="http://www.freeswitch.org" target=_blank>http://www.freeswitch.org</A><BR><A href="http://wiki.freeswitch.org" target=_blank>http://wiki.freeswitch.org</A><BR><A href="http://www.cluecon.com" target=_blank>http://www.cluecon.com</A><BR><BR>FreeSWITCH-users mailing list<BR><A href="https://e.mail.ru/cgi-bin/sentmsg?compose&amp;To=FreeSWITCH%2dusers@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></DIV><BASE href="https://e.mail.ru/cgi-bin/" target=_self></DIV></DIV></DIV></BLOCKQUOTE><BR></BODY></HTML>