<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";}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:13.5pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Verdana","sans-serif";
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Verdana","sans-serif";
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Times New Roman","serif";
        font-weight:bold;}
span.mw-headline
        {mso-style-name:mw-headline;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.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" style="margin-bottom:12.0pt"><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A">From the wiki:&nbsp;
</span><a href="http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_number">http://wiki.freeswitch.org/wiki/Channel_Variables#effective_caller_id_number</a><span style="font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#44546A"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:.05in;line-height:14.4pt;background:white">
<b><span style="font-size:13.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"><a href="http://wiki.freeswitch.org/wiki/Variable_effective_caller_id_number" title="Variable effective caller id number"><span style="color:#0B0080;text-decoration:none">effective_caller_id_number</span></a><o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:4.8pt;margin-right:0in;margin-bottom:6.0pt;margin-left:0in;line-height:14.4pt;background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Sets the effective callerid number. This is automatically exported to the B-leg;
<span style="background:yellow;mso-highlight:yellow">however, it is not valid in an origination string.</span> In other words, set this before calling bridge, otherwise use
<a href="http://wiki.freeswitch.org/wiki/Variable_origination_caller_id_number" title="Variable origination caller id number">
<span style="color:#0B0080;text-decoration:none">origination_caller_id_number</span></a><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:4.8pt;margin-right:0in;margin-bottom:6.0pt;margin-left:0in;line-height:14.4pt;background:white">
<span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:4.8pt;margin-right:0in;margin-bottom:6.0pt;margin-left:0in;line-height:14.4pt;background:white">
<b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black">Usage:</span></b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:black"><o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:dashed #2F6FAB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#F9F9F9">
<p class="MsoNormal" style="line-height:15.6pt;background:#F9F9F9;border:none;padding:0in">
<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black">&lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=9185551212&quot;/&gt;<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></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>