<div dir="ltr"><div><div><div>Switching to &quot;{}&quot; makes no difference here. See the updated rules below. <br><br></div>This is driving me nuts because there is no way for me to set caller id dynamically (because I cannot do that inside the data field). Why would freeswitch ignore channel variable set? And why would it insist on origination_caller_id_number?<br>
<br>  &lt;extension name=&quot;<a href="http://domestic.example.com">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=${outbound_calller_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/${default_gateway}/$1&quot;/--&gt;  <span style="background-color:rgb(255,0,0)"><span style>&lt;== NOT WORK</span></span><br>
      &lt;!--action application=&quot;bridge&quot; data=&quot;sofia/gateway/idt/$1&quot;/--&gt; <span style="background-color:rgb(255,0,0)"><span style>&lt;== NOT WORK</span></span><br>      &lt;!--action application=&quot;bridge&quot; data=&quot;{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1&quot;/--&gt; <span style="background-color:rgb(255,0,0)"><span style>&lt;== NOT WORK</span></span><br>
      &lt;action application=&quot;bridge&quot; data=&quot;{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1&quot;/&gt;  <span style="background-color:rgb(255,0,0)"><span style>&lt;== NOT WORK</span></span><br>
      &lt;!--action application=&quot;bridge&quot; data=&quot;{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1&quot;/--&gt; <span style="background-color:rgb(0,255,0)"><span style>&lt;== WORKS</span></span><br>
      &lt;!--action application=&quot;bridge&quot; data=&quot;[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1&quot;/--&gt;  <span style="background-color:rgb(0,255,0)"><span style>&lt;== WORKS</span></span><br>
    &lt;/condition&gt;<br>  &lt;/extension&gt;<br><br></div>IN the case when it does not work, I got NORMAL_TEMPORARY_FAILURE:<br><br>2013-12-30 22:53:12.876331 [NOTICE] sofia.c:6623 Hangup sofia/external/15102991913 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]<br>
<br></div>Cheers.<br><br>Jun<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <span dir="ltr">&lt;<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.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 link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546a">I use {} and I am not familiar with [] in the bridge statement. Try,<u></u><u></u></span></p><div class="im">
<p class="MsoNormal">&lt; action application=&quot;bridge&quot; data=&quot;{effective_caller_id_number=111111}sofia/gateway/idt/$1&quot; /&gt; <span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546a"><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546a"><u></u> <u></u></span></p>
</div><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Jun Sun<br>
<b>Sent:</b> Monday, December 30, 2013 1:46 PM<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> Re: [Freeswitch-users] strange behavior in setting origination_caller_id_number<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Any takers of this challenge? :)<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Jun<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Sun, Dec 29, 2013 at 9:38 AM, Jun Sun &lt;<a href="mailto:jsun@junsun.net" target="_blank">jsun@junsun.net</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><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.<u></u><u></u></p>
<div>
<p class="MsoNormal"><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;   <span style="color:#990000">
&lt;=== NOT WORK</span><u></u><u></u></p>
</div>
<p class="MsoNormal">      &lt;!--action application=&quot;bridge&quot; data=&quot;[effective_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;  
<span style="color:#990000">&lt;=== NOT WORK</span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
      &lt;action application=&quot;bridge&quot; data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/&gt;
<span style="color:#990000">&lt;=== WORKS!!</span><br>
    &lt;/condition&gt;<br>
  &lt;/extension&gt;<u></u><u></u></p>
</div>
<p class="MsoNormal">Cheers.<span style="color:#888888"><br>
<br>
<span>Jun</span></span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 12/29/2013 9:25 AM, Jun Sun wrote:<u></u><u></u></p>
</div>
</div>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">  <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;   <span style="color:#990000">
&lt;=== NOT WORK</span><br>
      &lt;!--action application=&quot;bridge&quot; data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;  
<span style="color:#990000">&lt;=== NOT WORK</span><br>
      &lt;action application=&quot;bridge&quot; data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/&gt;
<span style="color:#990000">&lt;=== WORKS!!</span><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<u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto: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="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></div>