<HTML>
<HEAD>
<TITLE>Re: [Freeswitch-users] Hang Up Cause is Blank in Dial Plan</TITLE>
</HEAD>
<BODY>
<FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>Variables are not expanded during the actual execution phase of dialplan processing ... <BR>
<BR>
What you are trying to do here will most likely require a transfer... You should read up on the wiki how the dialplan is processed and how variables are expanded...<BR>
<BR>
<BR>
K<BR>
<BR>
<BR>
On 3/2/12 5:50 AM, &quot;Bob McCarthy&quot; &lt;<a href="bob.mccarthy@experient.com">bob.mccarthy@experient.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Monaco, Courier New"><SPAN STYLE='font-size:11pt'>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>
&nbsp;&lt;extension name=&quot;Outbound_SwitchVox&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;condition regex=&quot;any&quot;&gt;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;regex field=&quot;destination_number&quot; expression=&quot;^(\d{10})$&quot;/&gt;<BR>
&nbsp;&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;&nbsp;&lt;action application=&quot;bridge&quot; data=&quot;sofia/external/${destination_number}@$${Switchvox}&quot;/&gt;<BR>
&nbsp;&lt;action application=&quot;set&quot; data=&quot;<FONT COLOR="#FF0000"><B>test=${hangup_cause}</B></FONT>&quot;/&gt;<BR>
&nbsp;&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;&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;&nbsp;&lt;/condition&gt;<BR>
&nbsp;&nbsp;&lt;/extension&gt;<BR>
<BR>
<BR>
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2850 (<a href="sofia/external/2001@192.168.1.195">sofia/external/2001@192.168.1.195</a>) Callstate Change RINGING -&gt; HANGUP<BR>
2012-03-02 06:42:38.005915 [NOTICE] switch_ivr_originate.c:3183 Hangup <a href="sofia/external/2001@192.168.1.195">sofia/external/2001@192.168.1.195</a> [CS_CONSUME_MEDIA] [NO_ANSWER]<BR>
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2873 Send signal <a href="sofia/external/2001@192.168.1.195">sofia/external/2001@192.168.1.195</a> [KILL]<BR>
2012-03-02 06:42:38.005915 [DEBUG] switch_core_session.c:1180 Send signal <a href="sofia/external/2001@192.168.1.195">sofia/external/2001@192.168.1.195</a> [BREAK]<BR>
2012-03-02 06:42:38.005915 [INFO] mod_dptools.c:2922 <FONT COLOR="#FF0000"><B>Originate Failed. &nbsp;Cause: NO_ANSWER<BR>
</B></FONT>EXECUTE <a href="sofia/internal/CO999x1001.1@192.168.57.211">sofia/internal/CO999x1001.1@192.168.57.211</a> <FONT COLOR="#FF0000"><B>set(test=)<BR>
</B></FONT>2012-03-02 06:42:38.005915 [DEBUG] mod_dptools.c:1281 <a href="sofia/internal/CO999x1001.1@192.168.57.211">sofia/internal/CO999x1001.1@192.168.57.211</a> <FONT COLOR="#FF0000"><B>SET [test]=[UNDEF]<BR>
</B></FONT>EXECUTE <a href="sofia/internal/CO999x1001.1@192.168.57.211">sofia/internal/CO999x1001.1@192.168.57.211</a> 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 <a href="sofia/internal/CO999x1001.1@192.168.57.211">sofia/internal/CO999x1001.1@192.168.57.211</a> 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: <a href="sofia/internal/CO999x1001.1@192.168.57.211">sofia/internal/CO999x1001.1@192.168.57.211</a> parsing [features-&gt;dx] continue=false<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_________________________________________________________________________<BR>
Professional FreeSWITCH Consulting Services:<BR>
<a href="consulting@freeswitch.org">consulting@freeswitch.org</a><BR>
<a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a><BR>
<BR>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<BR>
<a href="http://www.cudatel.com">http://www.cudatel.com</a><BR>
<BR>
Official FreeSWITCH Sites<BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
<a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a><BR>
<a href="http://www.cluecon.com">http://www.cluecon.com</a><BR>
<BR>
FreeSWITCH-users mailing list<BR>
<a href="FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><BR>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><BR>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><BR>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>