<div dir="ltr">







<p class=""><span class="">This is how I originate my calls with originate:</span></p><p class=""><span class="">







</span></p><p class=""><span class="">originate {sip_h_X-UUID=5c35e46e-ygoe-xdk4-upt2-2db3-5c35eefa6a,sip_h_X-Campaign=OYWS8285XR,ignore_early_media=false,bridge_early_media=false,originate_timeout=24,call_timeout=24,leg_timeout=30,execute_on_answer_1=&#39;sched_hangup 18 ALLOTTED_TIMEOUT&#39;,origination_uuid=5c35e46e-ygoe-xdk4-upt2-2db3-5c35eefa6a,origination_caller_id_number=+55214042XXYY}sofia/gateway/twilio/+55213497ZZWW handle_calls</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">&lt;extension </span><span class="">name</span><span class="">=</span><span class="">&quot;telephonist&quot;</span><span class="">&gt;</span></p>
<p class=""><span class="">         </span><span class="">&lt;condition </span><span class="">field</span><span class="">=</span><span class="">&quot;destination_number&quot;</span><span class=""> </span><span class="">expression</span><span class="">=</span><span class="">&quot;^handle_calls$&quot;</span><span class="">&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;answer&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;log&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;INFO handle_calls application match&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;set&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;transfer_ringback=${us-ring}&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;spandsp_start_fax_detect&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;transfer &#39;fax&#39; 10 ced&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;spandsp_start_tone_detect&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;55&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;playback&quot;</span><span class=""> </span><span class="">data</span><span class="">=</span><span class="">&quot;silence_stream://20000&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">                </span><span class="">&lt;action </span><span class="">application</span><span class="">=</span><span class="">&quot;spandsp_stop_tone_detect&quot;</span><span class="">/&gt;</span></p>
<p class=""><span class="">           </span><span class="">&lt;/condition&gt;</span></p>
<p class=""><span class="">   </span><span class="">&lt;/extension&gt;</span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 24, 2016 at 8:15 PM, Gonzalo Gasca Meza <span dir="ltr">&lt;<a href="mailto:gascagonzalo@gmail.com" target="_blank">gascagonzalo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi guys,</div><div><br></div><div>I&#39;m getting the following BYE reason code from my Service Provider:</div><div><br></div><div><div>recv 740 bytes from udp/[177.71.206.193]:5060 at 02:57:50.740042:</div><div>   -----------------------------<wbr>------------------------------<wbr>-------------</div><div>   BYE <a href="http://sip:gw+twilio@52.1.1.1:5090">sip:gw+twilio@52.1.1.1:5090</a>;<wbr>transport=udp;gw=twilio SIP/2.0</div><div>   CSeq: 1 BYE</div><div>   From: &lt;<a href="mailto:sip%3A%2B551121174769@turn2data-telephonist.pstn.br1.twilio.com" target="_blank">sip:+551121174769@turn2data-<wbr>telephonist.pstn.br1.twilio.<wbr>com</a>&gt;;tag=76430350_6772d868_<wbr>ebbbd5d1-d9b1-49db-981e-<wbr>ec4b3e238564</div><div>   To: &quot;&quot; &lt;<a href="mailto:sip%3A%2B55114XXXYYYY@172.31.3.166" target="_blank">sip:+55114XXXYYYY@172.31.3.<wbr>166</a>&gt;;tag=mjZyjF9Ute8DD</div><div>   Call-ID: 7d8a1944-e512-1234-4eaf-<wbr>02d310a86cb3</div><div>   Max-Forwards: 68</div><div>   Via: SIP/2.0/UDP 177.71.206.193:5060;branch=<wbr>z9hG4bKfaa.6c72ded1.0</div><div>   Via: SIP/2.0/UDP 172.19.147.73:5060;rport=5060;<wbr>received=177.71.206.215;<wbr>branch=z9hG4bKebbbd5d1-d9b1-<wbr>49db-981e-ec4b3e238564_<wbr>6772d868_205642673073712</div><div> <b>  Reason: MVTSLocal;cause=10;text=&quot;BYE received&quot;,SIP;cause=406;text=&quot;<wbr>Service Unavailable&quot;</b></div><div><b> </b>  User-Agent: Twilio Gateway</div><div>   X-Twilio-CallSid: CA5411d5015d3df04541c6e14e9fb4<wbr>1719</div><div>   Content-Length: 0</div></div><div>   </div><div>When placing call via ESL I get reported NORMAL_CLEARING vs 406 </div><div><br></div><div>I don&#39;t see 406 Listed in Wiki:<br></div><div><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/Hangup+Cause+Code+Table" target="_blank">https://freeswitch.org/<wbr>confluence/display/FREESWITCH/<wbr>Hangup+Cause+Code+Table</a></div><div><br></div><div>According to RFC seems to be valid <a href="https://tools.ietf.org/html/rfc3326" target="_blank">https://tools.ietf.org/html/<wbr>rfc3326</a></div><div><br></div><div><pre style="font-size:13.3333px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">Examples are:

      Reason: SIP ;cause=200 ;text=&quot;Call completed elsewhere&quot;
      Reason: Q.850 ;cause=16 ;text=&quot;Terminated&quot;
      Reason: SIP ;cause=600 ;text=&quot;Busy Everywhere&quot;
      Reason: SIP ;cause=580 ;text=&quot;Precondition Failure&quot;
</pre></div><div><br></div><div>Can we add support to handle these type of reasons to a common one ? Like Unknown?</div><div>I will talk to my SP to see if they can change it to 503.</div><div><br></div><div>Any suggestions?</div></div>
</blockquote></div><br></div>