<!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. 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="<FONT COLOR="#ff0000"><B>test=${hangup_cause}</B></FONT>"/><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 <FONT COLOR="#ff0000"><B>Originate Failed. 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 <CO999x1001.1>->hangup_reason- in context features<BR>
Dialplan: sofia/internal/CO999x1001.1@192.168.57.211 parsing [features->dx] continue=false<BR>
<BR>
</BODY>
</HTML>