<div dir="ltr"><div><div><div>Switching to "{}" 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> <extension name="<a href="http://domestic.example.com">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=${outbound_calller_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/${default_gateway}/$1"/--> <span style="background-color:rgb(255,0,0)"><span style><== NOT WORK</span></span><br>
<!--action application="bridge" data="sofia/gateway/idt/$1"/--> <span style="background-color:rgb(255,0,0)"><span style><== NOT WORK</span></span><br> <!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/--> <span style="background-color:rgb(255,0,0)"><span style><== NOT WORK</span></span><br>
<action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/> <span style="background-color:rgb(255,0,0)"><span style><== NOT WORK</span></span><br>
<!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/--> <span style="background-color:rgb(0,255,0)"><span style><== WORKS</span></span><br>
<!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/--> <span style="background-color:rgb(0,255,0)"><span style><== WORKS</span></span><br>
</condition><br> </extension><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"><<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.com</a>></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:"Verdana","sans-serif";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">< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" /> <span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u> <u></u></span></p>
</div><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <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 <<a href="mailto:jsun@junsun.net" target="_blank">jsun@junsun.net</a>> 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 "NOT WORK" example was meant to show setting "effective_caller_id_number", not "origination_caller_id_number". So the correct dialplan is as follows.<u></u><u></u></p>
<div>
<p class="MsoNormal"><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"/--> <span style="color:#990000">
<=== NOT WORK</span><u></u><u></u></p>
</div>
<p class="MsoNormal"> <!--action application="bridge" data="[effective_caller_id_number=111111]sofia/gateway/idt/$1"/-->
<span style="color:#990000"><=== NOT WORK</span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/>
<span style="color:#990000"><=== WORKS!!</span><br>
</condition><br>
</extension><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>
<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"/--> <span style="color:#990000">
<=== NOT WORK</span><br>
<!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/-->
<span style="color:#990000"><=== NOT WORK</span><br>
<action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/idt/$1"/>
<span style="color:#990000"><=== WORKS!!</span><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<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>