[Freeswitch-users] Hang Up Cause is Blank in Dial Plan

Avi Marcus avi at avimarcus.net
Fri Mar 2 18:27:53 MSK 2012


Nah, it's executed after the bridge so that's fine Ken. The issue, as he
found, is you can't use the hangup_cause within the A leg.. because it's
not hung up yet. He found other variable that ARE set in the A leg, though.

-Avi


On Fri, Mar 2, 2012 at 4:40 PM, Ken Rice <krice at freeswitch.org> wrote:

>  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 at 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 at 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 at 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 at 192.168.1.195 [KILL]
> 2012-03-02 06:42:38.005915 [DEBUG] switch_core_session.c:1180 Send signal
> sofia/external/2001 at 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 at 192.168.57.211 *set(test=)
> *2012-03-02 06:42:38.005915 [DEBUG] mod_dptools.c:1281
> sofia/internal/CO999x1001.1 at 192.168.57.211 *SET [test]=[UNDEF]
> *EXECUTE sofia/internal/CO999x1001.1 at 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 at 192.168.57.211execute_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 at 192.168.57.211 parsing
> [features->dx] continue=false
>
>
> ------------------------------
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120302/e4ede9f3/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list