<HTML><BODY>Thanks, it works.<br><br>But. how can I do it in multiple conditions (for example, if I want to check fo not equal some other field like "caller_id_name", ...)?<br>I.e. Something like:<br>&nbsp;&nbsp; &lt;condition field="caller_id_name" expression!="^!Extension 1001$"/&gt;&nbsp; &lt;!--NOT EQUAL--&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><br><br><br>Вторник, 26 февраля 2013, 10:53 +02:00 от Avi Marcus &lt;avi@avimarcus.net&gt;:<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;" class="mailru-blockquote">
        <div id=""><div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div id="style_13618691420000000325" class="mr_read__body">
                <base target="_self" href="https://e.mail.ru/cgi-bin/">
                
                        <div id="style_13618691420000000325_BODY"><div dir="ltr">Not necessarily the best answer, but you can use negative lookahead, e.g.:<div>(?!399|400)^(\d{3,16})$<br><div><br></div><div>See it here:&nbsp;<a href="http://www.rubular.com/r/XVTB40DPZZ" target="_blank">http://www.rubular.com/r/XVTB40DPZZ</a><br data-mce-bogus="1"></div>

<div><br></div><div>Alternatives...</div><div>1) A different extension that sets a variable record=false for 400, 399, and an anti-action sets it to true. (not sure that's exactly the same though)</div><div>2) a short lua script that sets the variable or actually starts the recording.</div>

<div>3) I'm sure there are other options...</div><div><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi Marcus</span><br></div></div>
<br><br><div>On Tue, Feb 26, 2013 at 10:01 AM, Dmitriy Shumaev <span dir="ltr">&lt;<a href="sentmsg?mailto=mailto%3apm_zefman_r@mail.ru" target="_blank">pm_zefman_r@mail.ru</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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="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="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></div>

</div>
                        <div>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="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="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 target="_self" href="https://e.mail.ru/cgi-bin/">
        </div>

        
</div>


</div>
</blockquote>
<br></BODY></HTML>