First of all, your log output is different than your dialplan example. Second, you show only a tiny log snip taken after everything interesting occurred. All it shows is that you are having the issue you describe. Third, it seems like you are making multiple posts to the list for the same issue, and multiple emails within those requests. Slow down, take your time, try to learn as best you can (using the wiki), and give the list a reasonable amount of time to answer your questions. If you cant get a hangup cause in your XML dialplan, you dont need to start a seperate thread for how you cant do it in LUA either ... you see my point? :)<br>
<br>The other end has to answer the call in order to hang up on you, as far as I know. If the originate fails you don&#39;t get a hangup cause into the bridge_hangup_cause channel variable. For instance, the other end never answers the call and originate fails with NO_USER_RESPONSE .... you will not have any value in bridge_hangup_cause because nothing ever bridged. Check the variable originate_disposition: <a href="http://wiki.freeswitch.org/wiki/Variable_originate_disposition">http://wiki.freeswitch.org/wiki/Variable_originate_disposition</a><br>
<br>Try out this extension using the &quot;info&quot; app to debug variables after your bridge:<br>&lt;extension name=&quot;funwithvariables&quot;&gt;<br>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^1234$&quot;&gt;<br>
    &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br>    &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>    &lt;action application=&quot;bridge&quot; data=&quot;sofia/external/myfriend@myfriendsSIPserver.com&quot;/&gt;<br>
    &lt;action application=&quot;info&quot;/&gt;<br>  &lt;/condition&gt;<br>&lt;/extension&gt;<br><br><br><div class="gmail_quote">On Fri, Dec 17, 2010 at 11:12 PM, Sam <span dir="ltr">&lt;<a href="mailto:u2nsam@gmail.com">u2nsam@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;">Yes Bleg hangs up first but i am not able to fetch the hangupcause here,<div class="im"><br>
<br>hangup cause:
${bridge_hangup_cause}<br><br></div>in logs i get as :-<br><br><span style="background-color: rgb(255, 255, 204);">EXECUTE sofia/internal/<a href="mailto:7001@203.153.53.181" target="_blank">7001@203.153.53.181</a> log(1 B-leg hangup Q850 cause: )</span><br>

2010-12-18 09:37:08.342225 [DEBUG] switch_core_state_machine.c:449 (sofia/external/<a href="mailto:1234@203.153.53.188" target="_blank">1234@203.153.53.188</a>) Callstate Change HANGUP -&gt; DOWN<br><span style="background-color: rgb(255, 255, 204);">2010-12-18 09:37:08.342225 [ALERT] mod_dptools.c:1152 B-leg hangup Q850 cause:</span><br>

2010-12-18 09:37:08.342225 [DEBUG] switch_core_state_machine.c:452 (sofia/external/<a href="mailto:1234@203.153.53.188" target="_blank">1234@203.153.53.188</a>) Running State Change CS_DESTROY<br><br><span><span style="background-color: rgb(255, 255, 204);"></span></span><br>

Regds<br>Sam<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Sat, Dec 18, 2010 at 3:21 AM, Michael Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</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;">
You&#39;re almost there. First off, you can delete this line:<div><div>&lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;</div></div><div>That&#39;s the default behavior and you have to set it prior to the bridge anyway.</div>


<div><br></div><div>Move this line before the bridge:</div><div><div>&lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;</div></div><div>Otherwise it won&#39;t have any effect.</div>

<div><br></div><div>The other stuff should work if the b-leg hangs up first, but not if the a-leg does. </div><div><br></div><font color="#888888"><div>-MC</div></font><div><div></div><div><div><br><br><div class="gmail_quote">

On Thu, Dec 16, 2010 at 2:28 AM, Sam <span dir="ltr">&lt;<a href="mailto:u2nsam@gmail.com" target="_blank">u2nsam@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;"><br>I am not able to fetch the hangup cause in the dial-plan by using log function .<br>I would like to use that hangup cause variable for further routing so that<br>


the routing would be conditional to hangup cause. <br><br>
Regards<br>Sam<br><br><div class="gmail_quote">On Wed, Dec 15, 2010 at 9:48 AM, samir <span dir="ltr">&lt;<a href="mailto:u2nsam@gmail.com" target="_blank">u2nsam@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;">



<br>
Hello friends,<br>
<br>
was trying to create a routing rule to to route calls by accounting to the<br>
hangup causes,<br>
<br>
I have written below syntax but it fails to give the cause code to the<br>
varriable for routing.<br>
<br>
&lt;extension name=&quot;refer&quot;&gt;<br>
               &lt;condition field=&quot;destination_number&quot; expression=&quot;^1234$&quot;&gt;<br>
<br>
<br>
       &lt;action application=&quot;bridge&quot; data=&quot;sofia/external/1234@X.X.X.X&quot;/&gt;<br>
       &lt;action application=&quot;set&quot; data=&quot;hangup_after_bridge=false&quot;/&gt;<br>
       &lt;action application=&quot;set&quot; data=&quot;continue_on_fail=true&quot;/&gt;<br>
       &lt;action application=&quot;log&quot; data=&quot;1 B-leg hangup cause:<br>
${bridge_hangup_cause}&quot;/&gt;<br>
       &lt;action application=&quot;transfer&quot; data=&quot;${bridge_hangup_cause} XML<br>
conbridge&quot;/&gt;<br>
<br>
               &lt;/condition&gt;<br>
<br>
<br>
   &lt;/extension&gt;<br>
<br>
       &lt;extension name=&quot;no user&quot;&gt;<br>
               &lt;condition field=&quot;destination_number&quot;<br>
expression=&quot;^(NO_USER_RESPONSE)$&quot;&gt;<br>
               &lt;action application=&quot;bridge&quot;<br>
data=&quot;sofia/external/4567@X.X.X.X&quot;/&gt;<br>
<br>
               &lt;/condition&gt;<br>
       &lt;/extension&gt;<br>
<br>
<br>
here the ${bridge_hangup_cause} is not getting executed. Am I doing it right<br>
or is there any other way to do it.<br>
<br>
Regards<br>
Sam<br>
--<br>
View this message in context: <a href="http://freeswitch-users.2379917.n2.nabble.com/routing-via-hangup-cause-tp5837136p5837136.html" target="_blank">http://freeswitch-users.2379917.n2.nabble.com/routing-via-hangup-cause-tp5837136p5837136.html</a><br>




Sent from the freeswitch-users mailing list archive at Nabble.com.<br>
<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><br>
</blockquote></div><br>
<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><br>
<br></blockquote></div><br></div>
</div></div><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><br>
<br></blockquote></div><br>
</div></div><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>