<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.16.3">
</HEAD>
<BODY>
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;<FONT COLOR="#ff0000"><B>test=${hangup_cause}</B></FONT>&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 <FONT COLOR="#ff0000"><B>Originate Failed.&nbsp; Cause: NO_ANSWER</B></FONT><BR>
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 <FONT COLOR="#ff0000"><B>set(test=)</B></FONT><BR>
2012-03-02 06:42:38.005915 [DEBUG] mod_dptools.c:1281 sofia/internal/CO999x1001.1@192.168.57.211 <FONT COLOR="#ff0000"><B>SET [test]=[UNDEF]</B></FONT><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<BR>
<BR>
</BODY>
</HTML>