That variable is not available, it is not included with the CHANNEL_HANGUP_COMPLETE event info. However I discovered that when the bridge does not work, there are two CHANNEL_HANGUP_COMPLETE events, one for each leg, nevertheless for some reason the daemon I have watching the events misses the second leg event, so I was only seeing the result of the first leg hangup, which is NORMAL_CLEARING, and the second event&#39;s hangup_cause is ORIGINATOR_CANCEL. I don&#39;t know why my daemon is missing the event though. I&#39;ll have to dig into this further.<br>

<br><br><div class="gmail_quote">On Fri, Aug 7, 2009 at 1:28 PM, Phillip Jones <span dir="ltr">&lt;<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What does<br>
<br>
bridge_hangup_cause<br>
<br>
give you?<br>
<div><div></div><div class="h5"><br>
On Fri, Aug 7, 2009 at 12:43 PM, Nicolas Brenner &lt;<a href="mailto:nicolas@medularis.com">nicolas@medularis.com</a>&gt; wrote:<br>
&gt;<br>
&gt; I changed the script to set hangup_after_bridge to false, but still the same thing happens, I get this on the console:<br>
&gt;<br>
&gt; 2009-08-07 12:27:44.229091 [NOTICE] sofia.c:322 Hangup sofia/external/00569xxxxxxx [CS_SOFT_EXECUTE] [NORMAL_CLEARING]<br>
&gt; 2009-08-07 12:27:44.229091 [DEBUG] switch_channel.c:1683 Send signal sofia/external/00569xxxxxxx [KILL]<br>
&gt; 2009-08-07 12:27:44.229091 [DEBUG] switch_core_session.c:932 Send signal sofia/external/00569xxxxxxx [BREAK]<br>
&gt; 2009-08-07 12:27:44.231471 [NOTICE] switch_ivr_originate.c:1994 Hangup sofia/external/005622170039 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]<br>
&gt; 2009-08-07 12:27:44.231471 [DEBUG] switch_channel.c:1683 Send signal sofia/external/005622170039 [KILL]<br>
&gt; 2009-08-07 12:27:44.231471 [DEBUG] switch_core_session.c:932 Send signal sofia/external/005622170039 [BREAK]<br>
&gt; 2009-08-07 12:27:44.231471 [DEBUG] switch_ivr_originate.c:2134 Originate Cancelled by originator termination Cause: 487 [ORIGINATOR_CANCEL]<br>
&gt; 2009-08-07 12:27:44.231471 [DEBUG] switch_core_state_machine.c:398 (sofia/external/00569xxxxxxx) Running State Change CS_HANGUP<br>
&gt; 2009-08-07 12:27:44.231471 [INFO] mod_dptools.c:2092 Originate Failed.  Cause: ORIGINATOR_CANCEL<br>
&gt; 2009-08-07 12:27:44.231471 [NOTICE] c2c.js:1 *********** Leg2: NORMAL_CLEARING ***********<br>
&gt;<br>
&gt;<br>
&gt; The second to last line comes from the script, and prints the hangup_cause of he session, instead of getting ORIGINATOR_CANCEL, I&#39;m getting NORMAL_CLEARING. Where is the ORIGINATOR_CANCEL value set?<br>
&gt;<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; Nicolas<br>
&gt;<br>
&gt; On Thu, Aug 6, 2009 at 3:45 PM, Nicolas Brenner &lt;<a href="mailto:nicolas@medularis.com">nicolas@medularis.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Matt,<br>
&gt;&gt;<br>
&gt;&gt; Actually I&#39;m explicitly setting hangup_after_bridge to true, think setting it to false would help? I&#39;m going to try that.<br>
&gt;&gt;<br>
&gt;&gt; Here&#39;s the JS code:<br>
&gt;&gt; (Note: session.getVariable() doesn&#39;t work, FS complains saying it is not a function, also tried self.session.getVariable() - that&#39;s what the wiki says - and FS complains that self does not exist)<br>
&gt;&gt;<br>
&gt;&gt; ----------------<br>
&gt;&gt; var uuid = argv[0]; // Call identifier<br>
&gt;&gt; var dialstr1 = argv[1]; // Dial string obtained from previous call to LCR<br>
&gt;&gt; var dialstr2 = argv[2]; // Dial string obtained from previous call to LCR<br>
&gt;&gt; var greeting_snd = &quot;/var/audio/alert.wav&quot;;<br>
&gt;&gt;<br>
&gt;&gt; console_log(&quot;notice&quot;, &quot;*********** STARTING C2C Call ***********\n&quot;);<br>
&gt;&gt; timeout = 30;<br>
&gt;&gt;<br>
&gt;&gt; console_log(&quot;notice&quot;, &quot;*********** DIALING &quot;+dialstr1+&quot; ***********\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt; //var stUsRing = session.getVariable(&quot;us-ring&quot;);  // This doesn&#39;t work, self.session.getVariable doesn&#39;t work either<br>
&gt;&gt; var stUsRing = &quot;%(2000,4000,440,480)&quot;;<br>
&gt;&gt;<br>
&gt;&gt; // Create new_session<br>
&gt;&gt; new_session = new Session(originate_str1);<br>
&gt;&gt; console_log(&quot;notice&quot;, &quot;*********** Leg1: &quot; + new_session.cause + &quot; ***********\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt; if (new_session.ready()) {<br>
&gt;&gt;         // log to the console<br>
&gt;&gt;         console_log(&quot;notice&quot;, &quot;*********** Leg1 (&quot;+dialstr1+&quot;) CONNECTED! ***********\n&quot;);<br>
&gt;&gt;         console_log(&quot;notice&quot;, &quot;*********** Playing greeting sound: &quot;+greeting_snd+&quot; ***********\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt;         new_session.execute(&quot;sleep&quot;, 100);<br>
&gt;&gt;         new_session.execute(&quot;playback&quot;, greeting_snd);<br>
&gt;&gt;<br>
&gt;&gt;         // Originate second call and bridge<br>
&gt;&gt;     originate_str2 = &quot;{ignore_early_media=true,originate_timeout=&quot;+timeout+&quot;,hangup_after_bridge=true,medularis_uuid=&quot;+uuid+&quot;,c2c_call=true,leg=2}&quot;+dialstr2;<br>
&gt;&gt;<br>
&gt;&gt;         // Create new_session<br>
&gt;&gt;         new_session.execute(&quot;bridge&quot;, originate_str2);<br>
&gt;&gt;         console_log(&quot;notice&quot;, &quot;*********** Leg2: &quot; + new_session.cause + &quot; ***********\n&quot;);<br>
&gt;&gt;<br>
&gt;&gt;         if (new_session.ready()) {<br>
&gt;&gt;                 console_log(&quot;notice&quot;, &quot;*********** Leg2 (&quot;+dialstr2+&quot;) CONNECTED! ***********\n&quot;);<br>
&gt;&gt;         }<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; exit();<br>
&gt;&gt; ----------------<br>
&gt;&gt;<br>
&gt;&gt; Thanks!<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Nicolas<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Aug 6, 2009 at 2:25 PM, Matthew Fong &lt;<a href="mailto:mattdfong@gmail.com">mattdfong@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Nicolas,<br>
&gt;&gt;&gt; do you have a copy of the .js code you can paste. I would guess tho, that ORIGINATOR_CANCLE might be related to not setting hangup_after_bridge to false. Just a guess tho.<br>
&gt;&gt;&gt; Hangup causes can be found here:<br>
&gt;&gt;&gt; <a href="http://wiki.freeswitch.org/wiki/Hangup_causes" target="_blank">http://wiki.freeswitch.org/wiki/Hangup_causes</a><br>
&gt;&gt;&gt; --matt<br>
&gt;&gt;&gt; hello hunter - hosted predictive dialer &amp; voice broadcasting<br>
&gt;&gt;&gt; <a href="http://www.hellohunter.com" target="_blank">http://www.hellohunter.com</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Thu, Aug 6, 2009 at 9:38 AM, Nicolas Brenner &lt;<a href="mailto:nicolas@medularis.com">nicolas@medularis.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I&#39;m bridging 2 calls in a javascript file, I originate the first call and then execute a bridge with an origination string for the second call. If I hangup the first call while trying to make the second call, I get this on the console:<br>

&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 2009-08-05 16:44:05.69122 [NOTICE] switch_ivr_originate.c:1994 Hangup sofia/external/005622170039 [CS_CONSUME_MEDIA] [ORIGINATOR_CANCEL]<br>
&gt;&gt;&gt;&gt; 2009-08-05 16:44:05.69122 [DEBUG] switch_channel.c:1683 Send signal sofia/external/005622170039 [KILL]<br>
&gt;&gt;&gt;&gt; 2009-08-05 16:44:05.69122 [DEBUG] switch_core_session.c:932 Send signal sofia/external/005622170039 [BREAK]<br>
&gt;&gt;&gt;&gt; 2009-08-05 16:44:05.69122 [DEBUG] switch_ivr_originate.c:2134 Originate Cancelled by originator termination Cause: 487 [ORIGINATOR_CANCEL]<br>
&gt;&gt;&gt;&gt; 2009-08-05 16:44:05.69122 [INFO] mod_dptools.c:2092 Originate Failed.  Cause: ORIGINATOR_CANCEL<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; But if I check hangup_cause in the CHANNEL_HANGUP_COMPLETE event, I see NORMAL_CLEARING. And the variable_originate_disposition has a value of &quot;failure&quot;. Where can I get the detail of the call/bridge failure due to &#39;ORIGINATOR_CANCEL&#39; as reported through the console?<br>

&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks!<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Nicolas<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
<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>
</div></div></blockquote></div><br>