<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 <action application="info" /> 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> </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> </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> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </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> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>I am trying to play messages
for failures on outbound Calls. 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>
<extension name="Outbound_SwitchVox"><br>
<condition regex="any"><br>
<regex field="destination_number"
expression="^(\d{10})$"/><br>
<regex field="destination_number"
expression="^2001$"/><br>
<br>
<action application="set" data="call_timeout=20"/><br>
<action application="set"
data="hangup_after_bridge=false"/><br>
<action application="bridge"
data="sofia/external/${destination_number}@$${Switchvox}"/><br>
<action application="set" data="<b><span style='color:red'>test=${hangup_cause}</span></b>"/><br>
<action application="log" data="1 A-leg hangup cause:
${hangup_cause}"/><br>
<action
application="execute_extension"
data="hangup_reason-${hangup_cause} XML
features"/>"/> <br>
<br>
</condition><br>
</extension><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 -> 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. 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
<CO999x1001.1>->hangup_reason- in context features<br>
Dialplan: sofia/internal/CO999x1001.1@192.168.57.211 parsing [features->dx]
continue=false<o:p></o:p></p>
</div>
</body>
</html>