<br><br><div class="gmail_quote">On Thu, Oct 27, 2011 at 7:14 PM, Trever L. Adams <span dir="ltr">&lt;<a href="mailto:trever.adams@gmail.com">trever.adams@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><div class="im">
    On 10/27/2011 04:07 PM, Michael Collins wrote:
    <blockquote type="cite">Trever,
      <div><br>
      </div>
      <div>You&#39;re in one of those gray areas where xml_curl may actually
        be easier in the long run unless you have just this one single
        set of goofy conditions to handle. However, if I understand your
        question correctly you should be able to do this in the
        dialplan.</div>
      <div><br>
      </div>
      <div>I can&#39;t be exactly certain why your call is failing since the
        debug log snippet you gave was a bit small, however my guess is
        that you don&#39;t actually have any actions inside of a matching
        &lt;condition&gt; for the call that was made. It looks like it
        was a &quot;private&quot; caller so this line would no doubt match:</div>
      <div><br>
      </div>
      <div><font face="&#39;courier new&#39;,
          monospace" size="1"><span style="background-color:rgb(255, 255, 255)">&lt;condition
            field=&quot;caller_id_name&quot; expression=&quot;.*rivate.*&quot;</span><br style="background-color:rgb(255, 255, 255)">
          <span style="background-color:rgb(255, 255, 255)">break=&quot;on-true&quot;/&gt;</span></font></div>
      <div><font face="arial, sans-serif"><br>
        </font></div>
      <div><font face="arial, sans-serif">When
          that condition matches, the dialplan processing will stop
          checking for any more conditions inside of the extension named
          &quot;screen&quot; and simply move on in the dialplan. (That behavior is
          caused by the break=&quot;on-true&quot; directive.) So, do you have any
          other extensions in this context? Whether you do or not, it
          seems like none of your conditions that actually have actions
          inside them is being matched, therefore you have no actions
          for this call and get the no route error.</font></div>
      <div><font face="arial, sans-serif"><br>
        </font></div>
      <div><font face="arial, sans-serif">My
          recommendation is to pastebin the entire Incoming-FXO context
          as well as debug level output for the incoming call. Paste the
          call log from start to finish. That will help us see what&#39;s
          really going on.</font></div>
      <div><font face="arial, sans-serif"><br>
        </font></div>
      <div><font face="arial, sans-serif">-MC<br>
        </font><br>
      </div>
    </blockquote></div>
    MC,<br>
    <br>
    Thank you, I will have to look into xml_curl. Apparently I
    misunderstood the documentation. If ANY of these things match, the
    actions to screen the call should be taken. Am I messing this up?<br></div></blockquote><div><br></div><div>To be frank, yes, you are messing it up. :)</div><div><br></div><div>The &quot;proper&quot; way to do an OR is by using the | (pipe) char in the regex. However, you are checking two different fields and you want the same actions if either field matches the values you have supplied. In this case I&#39;d do something like the following:</div>
<div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;extension name=&quot;screen&quot;&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;caller_id_name&quot; expression=&quot;^$|</font><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">nonymous|nknown|rivate|PSTN|oll|restricted|.--.*|,.*|000.*</span><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">&quot;&gt;</span></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;private_caller=true&quot; inline=&quot;true&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/condition&gt; </font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;caller_id_number&quot; expression=&quot;^$|nonymous|nknown|rivate|PSTN|oll&quot;&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;private_caller=true&quot; inline=&quot;true&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/condition&gt; </font></div>
</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;condition field=&quot;${private_caller}&quot; expression=&quot;^true$&quot;&gt;</font></div>
<div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;call_screen_filename=/tmp/${caller_id_number}-name.wav&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;answer&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;sleep&quot; data=&quot;1000&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;phrase&quot; data=&quot;voicemail_record_name&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;playback&quot; data=&quot;tone_stream://%(500, 0, 640)&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;playback_terminators=#*0123456789&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;record&quot; data=&quot;${call_screen_filename} 7 200 2&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;group_confirm_key=1&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;fail_on_single_reject=true&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;group_confirm_file=phrase:screen_confirm:${call_screen_filename}&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;bridge&quot; data=&quot;user/${dialed_number}&quot;/&gt;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;voicemail&quot; data=&quot;default $${domain} ${dialed_number}&quot;/&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    &lt;action application=&quot;hangup&quot;/&gt;</font></div>
</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  &lt;/condition&gt;</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&lt;/extension&gt;</font></div>
<div><br></div><div>NOTE: I took some liberties with your regex patterns. You may need to tweak the expressions depending on exactly what comes down the pipe.</div><div><br></div><div>Bonus question: why did I replace $1 with ${dialed_number}? :)  Be sure that you route the call properly. I&#39;m making an assumption about what the dialed number is, but you won&#39;t have that luxury - you will need to make sure that you have a user ID that is the same as the dialed number or you will need to parse the dialed number and relate it somehow to one of your users.</div>
<div><br></div><div>-MC</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div text="#000000" bgcolor="#FFFFFF">
    <br>
    At the moment I have no other processing of incoming calls. Still
    working on things.<br>
    <br>
    <blockquote type="cite">
      <div>
        <div class="gmail_quote"><div class="im">On Thu, Oct 27, 2011 at 1:44 PM, Trever
          L. Adams <span dir="ltr">&lt;<a href="mailto:trever.adams@gmail.com" target="_blank">trever.adams@gmail.com</a>&gt;</span>
          wrote:<br>
          </div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The
            dialplan:<br>
            <br>
            &lt;include&gt;<br>
               &lt;context name=&quot;Incoming-FXO&quot;&gt;<br>
                   &lt;extension name=&quot;screen&quot;&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;^$&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;.nonymous.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;.nknown.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;.*rivate.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;<br>
            expression=&quot;.estricted.*&quot; break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;PTSN.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_number&quot;
            expression=&quot;.oll.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.nonymous.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.nknown.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.*rivate.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.estricted.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;PTSN.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.oll.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;.--.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;,.*&quot;<br>
            break=&quot;on-true&quot;/&gt;<br>
                       &lt;condition field=&quot;caller_id_name&quot;
            expression=&quot;000.*&quot;&gt;<br>
                           &lt;action application=&quot;set&quot;<br>
data=&quot;call_screen_filename=/tmp/${caller_id_number}-name.wav&quot;/&gt;<br>
                           &lt;action application=&quot;answer&quot;/&gt;<br>
                           &lt;action application=&quot;sleep&quot;
            data=&quot;1000&quot;/&gt;<br>
                           &lt;action application=&quot;phrase&quot;
            data=&quot;voicemail_record_name&quot;/&gt;<br>
                           &lt;action application=&quot;playback&quot;<br>
            data=&quot;tone_stream://%(500, 0, 640)&quot;/&gt;<br>
                           &lt;action application=&quot;set&quot;<br>
            data=&quot;playback_terminators=#*0123456789&quot;/&gt;<br>
                           &lt;action application=&quot;record&quot;<br>
            data=&quot;${call_screen_filename} 7 200 2&quot;/&gt;<br>
                           &lt;action application=&quot;set&quot;
            data=&quot;group_confirm_key=1&quot;/&gt;<br>
                           &lt;action application=&quot;set&quot;<br>
            data=&quot;fail_on_single_reject=true&quot;/&gt;<br>
                           &lt;action application=&quot;set&quot;<br>
data=&quot;group_confirm_file=phrase:screen_confirm:${call_screen_filename}&quot;/&gt;<br>
                           &lt;action application=&quot;set&quot;
            data=&quot;continue_on_fail=true&quot;/&gt;<br>
            &lt;!--                &lt;action application=&quot;bridge&quot;
            data=&quot;user/$1&quot;/&gt; --&gt;<br>
                           &lt;action application=&quot;voicemail&quot;
            data=&quot;default $${domain}<br>
            $1&quot;/&gt;<br>
                           &lt;action application=&quot;hangup&quot;/&gt;<br>
                       &lt;/condition&gt;<br>
                   &lt;/extension&gt;<br>
               &lt;/context&gt;<br>
            &lt;/include&gt;<br>
          </blockquote>
        </div></div></div>
      </div>
    </blockquote>
    <br>
  </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>