<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1><pre><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Just Answering my Own Question here, I did the command &lt;action application=&quot;info&quot; /&gt; and found that I can use:<o:p></o:p></span></pre><pre><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></pre><pre>last_bridge_hangup_cause<o:p></o:p></pre><pre>originate_disposition<o:p></o:p></pre><pre>DIALSTATUS<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>and not hangup_cause in the dial plan<o:p></o:p></pre>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org]
<b>On Behalf Of </b>Bob McCarthy<br>
<b>Sent:</b> Friday, March 02, 2012 4:50 AM<br>
<b>To:</b> freeswitch-users@lists.freeswitch.org<br>
<b>Subject:</b> [Freeswitch-users] Hang Up Cause is Blank in Dial Plan<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>I am trying to play messages
for failures on outbound Calls.&nbsp; When I try to use ${hangup_cause} after
the failed bridge command it comes back as blank.<br>
<br>
what am I doing wrong ???<br>
<br>
&lt;extension name=&quot;Outbound_SwitchVox&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition regex=&quot;any&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;regex field=&quot;destination_number&quot;
expression=&quot;^(\d{10})$&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;regex field=&quot;destination_number&quot;
expression=&quot;^2001$&quot;/&gt;<br>
<br>
&lt;action application=&quot;set&quot; data=&quot;call_timeout=20&quot;/&gt;<br>
&lt;action application=&quot;set&quot;
data=&quot;hangup_after_bridge=false&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;action application=&quot;bridge&quot;
data=&quot;sofia/external/${destination_number}@$${Switchvox}&quot;/&gt;<br>
&lt;action application=&quot;set&quot; data=&quot;<b><span style='color:red'>test=${hangup_cause}</span></b>&quot;/&gt;<br>
&lt;action application=&quot;log&quot; data=&quot;1 A-leg hangup cause:
${hangup_cause}&quot;/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
application=&quot;execute_extension&quot;
data=&quot;hangup_reason-${hangup_cause} XML
features&quot;/&gt;&quot;/&gt;&nbsp;&nbsp;&nbsp; <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>
&nbsp; &lt;/extension&gt;<br>
<br>
<br>
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2850
(sofia/external/2001@192.168.1.195) Callstate Change RINGING -&gt; HANGUP<br>
2012-03-02 06:42:38.005915 [NOTICE] switch_ivr_originate.c:3183 Hangup
sofia/external/2001@192.168.1.195 [CS_CONSUME_MEDIA] [NO_ANSWER]<br>
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2873 Send signal
sofia/external/2001@192.168.1.195 [KILL]<br>
2012-03-02 06:42:38.005915 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2001@192.168.1.195 [BREAK]<br>
2012-03-02 06:42:38.005915 [INFO] mod_dptools.c:2922 <b><span style='color:
red'>Originate Failed.&nbsp; Cause: NO_ANSWER</span></b><br>
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 <b><span style='color:red'>set(test=)</span></b><br>
2012-03-02 06:42:38.005915 [DEBUG] mod_dptools.c:1281
sofia/internal/CO999x1001.1@192.168.57.211 <b><span style='color:red'>SET
[test]=[UNDEF]</span></b><br>
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 log(1 A-leg hangup cause: )<br>
2012-03-02 06:42:38.005915 [ALERT] mod_dptools.c:1420 A-leg hangup cause: <br>
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211
execute_extension(hangup_reason- XML features)<br>
2012-03-02 06:42:38.005915 [INFO] mod_dialplan_xml.c:485 Processing Dispatch 2
&lt;CO999x1001.1&gt;-&gt;hangup_reason- in context features<br>
Dialplan: sofia/internal/CO999x1001.1@192.168.57.211 parsing [features-&gt;dx]
continue=false<o:p></o:p></p>

</div>

</body>

</html>