Variables are not expanded during the actual execution phase of dialplan processing ... 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... K On 3/2/12 5:50 AM, "Bob McCarthy" <bob.mccarthy@experient.com> wrote:
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org