<div dir="ltr"><div><div><div><div>Thanks for the all the helping. Now I have beaten this issue to death.<br><br></div>I did a SIP tracing. Peter is right on money. My SIP provider does not like "0000000000" to be caller id number. To be specific and to add confusion, their server doesn't like if it is 10 zero's. (All other cases are fine, e.g, 9 zero's!) Their server would return service not available . That is why we see NORMAL_TEMPORARY_FAILURE.<br>
<br></div>It is good to know the world is still sane, except for the little 10 zero quirk from IDT. :)<br><br></div>Cheers. And happy new year.<br><br></div>Jun<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Dec 31, 2013 at 9:44 AM, 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">Your first “set” line has a typo:<u></u><u></u></span></p><div class="im">
<p class="MsoNormal"> <action application="set" data="origination_caller_id_number=${outbound_calller_id_number"/><span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a">It is missing the closing “}” on
</span>${outbound_calller_id_number". So origination_caller_id_number is not being set.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I think that is why these fail:<span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u><u></u></span></p><div class="im">
<p class="MsoNormal"> <!--action application="bridge" data="sofia/gateway/${default_gateway}/$1"/-->
<span style="background:red"><== NOT WORK</span><br>
<!--action application="bridge" data="sofia/gateway/idt/$1"/--> <span style="background:red">
<== NOT WORK</span><br>
<br>
<span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u><u></u></span></p>
</div><p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a">As per the wiki, effective_caller_id_number cannot be set in an origination string, so this fails:<u></u><u></u></span></p>
<div class="im">
<p class="MsoNormal"><action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/>
<span style="background:red"><== NOT WORK</span><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"><span style="font-family:"Verdana","sans-serif";color:#44546a">And this works because you are finally assigning a value to
</span>origination_caller_id_number<span style="font-family:"Verdana","sans-serif";color:#44546a">:<u></u><u></u></span></p><div class="im">
<p class="MsoNormal"><!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/-->
<span style="background:lime"><== WORKS<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"><span style="font-family:"Verdana","sans-serif";color:#44546a">Use the LOG application to check your values before the bridge statement, like this:<u></u><u></u></span></p>
<div style="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:"Courier New""><action application="log" data="INFO
</span>origination_caller_id_number<span style="font-size:10.0pt;font-family:"Courier New""> is $</span>origination_caller_id_number<span style="font-size:10.0pt;font-family:"Courier New""> "/><u></u><u></u></span></p>
</div>
<p class="MsoNormal"><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">Hope that helps,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a">Sean<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a"><u></u> <u></u></span></p>
<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 5:59 PM</span></p><div><div class="h5"><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></div></div><p></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Switching to "{}" makes no difference here. See the updated rules below.
<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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" 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=${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:red"><== NOT WORK</span><br>
<!--action application="bridge" data="sofia/gateway/idt/$1"/--> <span style="background:red">
<== NOT WORK</span><br>
<!--action application="bridge" data="{origination_caller_id_number=$${outbound_caller_id_number}}sofia/gateway/${default_gateway}/$1"/-->
<span style="background:red"><== NOT WORK</span><br>
<action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/>
<span style="background:red"><== NOT WORK</span><br>
<!--action application="bridge" data="{origination_caller_id_number=111111}sofia/gateway/${default_gateway}/$1"/-->
<span style="background:lime"><== WORKS</span><br>
<!--action application="bridge" data="[origination_caller_id_number=111111]sofia/gateway/${default_gateway}/$1"/-->
<span style="background:lime"><== WORKS</span><br>
</condition><br>
</extension><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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/<a href="tel:15102991913" value="+15102991913" target="_blank">15102991913</a> [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]<u></u><u></u></p>
</div>
<p class="MsoNormal">Cheers.<br>
<br>
Jun<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Dec 30, 2013 at 12:13 PM, Sean Devoy <<a href="mailto:sdevoy@bizfocused.com" target="_blank">sdevoy@bizfocused.com</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"><span style="font-family:"Verdana","sans-serif";color:#44546a">I use {} and I am not familiar with [] in the bridge statement. Try,</span><u></u><u></u></p>
<div>
<p class="MsoNormal">< action application="bridge" data="{effective_caller_id_number=111111}sofia/gateway/idt/$1" /> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif";color:#44546a"> </span><u></u><u></u></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</span><u></u><u></u></p>
<div>
<div>
<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-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<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>
Jun</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>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" target="_blank">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><u></u><u></u></p>
</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>