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.
what am I doing wrong ???
<extension name="Outbound_SwitchVox">
<condition regex="any">
<regex field="destination_number" expression="^(\d{10})$"/>
<regex field="destination_number" expression="^2001$"/>
<action application="set" data="call_timeout=20"/>
<action application="set" data="hangup_after_bridge=false"/>
<action application="bridge" data="sofia/external/${destination_number}@$${Switchvox}"/>
<action application="set" data="test=${hangup_cause}"/>
<action application="log" data="1 A-leg hangup cause: ${hangup_cause}"/>
<action application="execute_extension" data="hangup_reason-${hangup_cause} XML features"/>"/>
</condition>
</extension>
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2850 (sofia/external/2001@192.168.1.195) Callstate Change RINGING -> HANGUP
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]
2012-03-02 06:42:38.005915 [DEBUG] switch_channel.c:2873 Send signal sofia/external/2001@192.168.1.195 [KILL]
2012-03-02 06:42:38.005915 [DEBUG] switch_core_session.c:1180 Send signal sofia/external/2001@192.168.1.195 [BREAK]
2012-03-02 06:42:38.005915 [INFO] mod_dptools.c:2922 Originate Failed. Cause: NO_ANSWER
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 set(test=)
2012-03-02 06:42:38.005915 [DEBUG] mod_dptools.c:1281 sofia/internal/CO999x1001.1@192.168.57.211 SET [test]=[UNDEF]
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 log(1 A-leg hangup cause: )
2012-03-02 06:42:38.005915 [ALERT] mod_dptools.c:1420 A-leg hangup cause:
EXECUTE sofia/internal/CO999x1001.1@192.168.57.211 execute_extension(hangup_reason- XML features)
2012-03-02 06:42:38.005915 [INFO] mod_dialplan_xml.c:485 Processing Dispatch 2 <CO999x1001.1>->hangup_reason- in context features
Dialplan: sofia/internal/CO999x1001.1@192.168.57.211 parsing [features->dx] continue=false