<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<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,<o:p></o:p></span></p>
<p class="MsoNormal">&lt; action application=&quot;bridge&quot; data=&quot;{effective_caller_id_number=111111}sofia/gateway/idt/$1&quot; /&gt;&nbsp;<span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p>&nbsp;</o:p></span></p>
<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;"> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<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<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Any takers of this challenge? :)<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Jun<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></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:<o:p></o:p></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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
&nbsp;&lt;extension name=&quot;<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{11})$&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;origination_caller_id_number=11111111&quot;/&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--action application=&quot;bridge&quot; data=&quot;sofia/gateway/idt/$1&quot;/--&gt; &nbsp; <span style="color:#990000">
&lt;=== NOT WORK</span><o:p></o:p></p>
</div>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--action application=&quot;bridge&quot; data=&quot;[effective_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;&nbsp;&nbsp;
<span style="color:#990000">&lt;=== NOT WORK</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &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>
&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
&nbsp; &lt;/extension&gt;<o:p></o:p></p>
</div>
<p class="MsoNormal">Cheers.<span style="color:#888888"><br>
<br>
<span class="hoenzb">Jun</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 12/29/2013 9:25 AM, Jun Sun wrote:<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">&nbsp; <br>
I have a very simple call plan to allow internal extension to call external PSTN numbers. See below.<br>
<br>
&nbsp;&lt;extension name=&quot;<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;domestic&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{11})$&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;origination_caller_id_number=11111111&quot;/&gt; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--action application=&quot;bridge&quot; data=&quot;sofia/gateway/idt/$1&quot;/--&gt; &nbsp; <span style="color:#990000">
&lt;=== NOT WORK</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--action application=&quot;bridge&quot; data=&quot;[origination_caller_id_number=111111]sofia/gateway/idt/$1&quot;/--&gt;&nbsp;&nbsp;
<span style="color:#990000">&lt;=== NOT WORK</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &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>
&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
&nbsp; &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.&nbsp; 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;.&nbsp; Is that right?<br>
<br>
I'm using IDT express as SIP carrier. I don'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'd really appreciate your help.<br>
<br>
Cheers.<br>
<br>
Jun<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
</body>
</html>