<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"><<a href="mailto:jsun@junsun.net" target="_blank">jsun@junsun.net</a>></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 "NOT WORK" example was meant to show setting
"effective_caller_id_number", not "origination_caller_id_number".
So the correct dialplan is as follows.<div class="im"><br>
<br>
<extension name="<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>"><br>
<condition field="${toll_allow}" expression="domestic"/><br>
<condition field="destination_number"
expression="^(\d{11})$"><br>
<action application="set"
data="origination_caller_id_number=11111111"/> <br>
<action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/><br>
<action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/><br>
<action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/><br>
<!--action application="bridge"
data="sofia/gateway/idt/$1"/--> <font color="#990000"><===
NOT WORK</font><br></div>
<!--action application="bridge"
data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/-->
<font color="#990000"><=== NOT WORK</font><div class="im"><br>
<action application="bridge"
data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/>
<font color="#990000"><=== WORKS!!</font><br>
</condition><br>
</extension><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>
<extension name="<a href="http://domestic.example.com" target="_blank">domestic.example.com</a>"><br>
<condition field="${toll_allow}" expression="domestic"/><br>
<condition field="destination_number"
expression="^(\d{11})$"><br>
<action application="set"
data="origination_caller_id_number=11111111"/> <br>
<action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/><br>
<action application="set"
data="effective_caller_id_number=${outbound_caller_id_number}"/><br>
<action application="set"
data="effective_caller_id_name=${outbound_caller_id_name}"/><br>
<!--action application="bridge"
data="sofia/gateway/idt/$1"/--> <font color="#990000"><===
NOT WORK</font><br>
<!--action application="bridge"
data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/-->
<font color="#990000"><=== NOT WORK</font><br>
<action application="bridge"
data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/>
<font color="#990000"><=== WORKS!!</font><br>
</condition><br>
</extension><br>
<br>
There a couple of things strange here:<br>
<br>
1. I have to put origination_caller_id_number inside data field of
"bridge" 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 "effective_caller_id_number" not
"origination_caller_id_number". 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<br>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>