<div dir="ltr">Any takers of this challenge? :)<div><br></div><div>Jun</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun <span dir="ltr">&lt;<a href="mailto:jsun@junsun.net" target="_blank">jsun@junsun.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><br>
      Sorry! The 2nd &quot;NOT WORK&quot; example was meant to show setting
      &quot;effective_caller_id_number&quot;, not &quot;origination_caller_id_number&quot;.
      So the correct dialplan is as follows.<div class="im"><br>
      <br>
       &lt;extension name=&quot;<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>&quot;&gt;<br>
          &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>
          &lt;condition field=&quot;destination_number&quot;
      expression=&quot;^(\d{11})$&quot;&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;origination_caller_id_number=11111111&quot;/&gt; <br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>
            &lt;!--action application=&quot;bridge&quot;
      data=&quot;sofia/gateway/idt/$1&quot;/--&gt;   <font color="#990000">&lt;===

        NOT WORK</font><br></div>
            &lt;!--action application=&quot;bridge&quot;
      data=&quot;[effective_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;  
      <font color="#990000">&lt;=== NOT WORK</font><div class="im"><br>
            &lt;action application=&quot;bridge&quot;
      data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/&gt;
      <font color="#990000">&lt;=== WORKS!!</font><br>
          &lt;/condition&gt;<br>
        &lt;/extension&gt;<br>
      <br></div>
      Cheers.<span class="HOEnZb"><font color="#888888"><br>
      <br>
      Jun</font></span><div><div class="h5"><br>
      <br>
      On 12/29/2013 9:25 AM, Jun Sun wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
        <br>
      I have a very simple call plan to allow internal extension to call
      external PSTN numbers. See below.<br>
      <br>
       &lt;extension name=&quot;<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>&quot;&gt;<br>
          &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>
          &lt;condition field=&quot;destination_number&quot;
      expression=&quot;^(\d{11})$&quot;&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;origination_caller_id_number=11111111&quot;/&gt; <br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
            &lt;action application=&quot;set&quot;
      data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>
            &lt;!--action application=&quot;bridge&quot;
      data=&quot;sofia/gateway/idt/$1&quot;/--&gt;   <font color="#990000">&lt;===

        NOT WORK</font><br>
            &lt;!--action application=&quot;bridge&quot;
      data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;  

      <font color="#990000">&lt;=== NOT WORK</font><br>
            &lt;action application=&quot;bridge&quot;
      data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/&gt;
      <font color="#990000">&lt;=== WORKS!!</font><br>
          &lt;/condition&gt;<br>
        &lt;/extension&gt;<br>
      <br>
      There a couple of things strange here:<br>
      <br>
      1. I have to put origination_caller_id_number inside data field of
      &quot;bridge&quot; application in order for the dialing out to happen.  Why
      putting it outside as channel variable does not work?<br>
      <br>
      2. Actually because bridge command is for leg-B, really it should
      be &quot;effective_caller_id_number&quot; not
      &quot;origination_caller_id_number&quot;.  Is that right?<br>
      <br>
      I&#39;m using IDT express as SIP carrier. I don&#39;t know if they changed
      something or I changed configuration in freeswitch. Now it seems I
      have to set origination_caller_id_number if I want to use IDT for
      outbound calls.<br>
      <br>
      I&#39;d really appreciate your help.<br>
      <br>
      Cheers.<br>
      <br>
      Jun<br>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>