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

Bob McCarthy bob.mccarthy at experient.com
Fri Mar 2 21:18:40 MSK 2012


I did notice that during a CALL_REJECTED that the execute_extension
statement did not get executed ..

But it does work for NO_ANSWER.  Would using a Transfer change that behavior
???

 

2012-03-02 13:04:32.569026 [DEBUG] mod_dptools.c:1281
sofia/internal/CO999x1001.1 at 192.168.57.211 SET [hangup_after_bridge]=[false]
EXECUTE sofia/internal/CO999x1001.1 at 192.168.57.211
bridge(sofia/external/2010 at 192.168.1.195)
2012-03-02 13:04:32.589032 [DEBUG] switch_channel.c:1047
sofia/internal/CO999x1001.1 at 192.168.57.211 EXPORTING[export_vars]
[RFC2822_DATE]=[Fri, 02 Mar 2012 13:04:32 -0500] to event
2012-03-02 13:04:32.589032 [DEBUG] switch_ivr_originate.c:1884 Parsing
global variables
2012-03-02 13:04:32.589032 [NOTICE] switch_channel.c:926 New Channel
sofia/external/2010 at 192.168.1.195 [29bcf518-6492-11e1-b71d-ddc06b002bf3]
2012-03-02 13:04:32.589032 [DEBUG] mod_sofia.c:4679
(sofia/external/2010 at 192.168.1.195) State Change CS_NEW -> CS_INIT
2012-03-02 13:04:32.589032 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.589032 [DEBUG] switch_core_state_machine.c:362
(sofia/external/2010 at 192.168.1.195) Running State Change CS_INIT
2012-03-02 13:04:32.589032 [DEBUG] switch_core_state_machine.c:401
(sofia/external/2010 at 192.168.1.195) State INIT
2012-03-02 13:04:32.589032 [DEBUG] mod_sofia.c:85
sofia/external/2010 at 192.168.1.195 SOFIA INIT
2012-03-02 13:04:32.609021 [DEBUG] mod_sofia.c:125
(sofia/external/2010 at 192.168.1.195) State Change CS_INIT -> CS_ROUTING
2012-03-02 13:04:32.609021 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:401
(sofia/external/2010 at 192.168.1.195) State INIT going to sleep
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:362
(sofia/external/2010 at 192.168.1.195) Running State Change CS_ROUTING
2012-03-02 13:04:32.609021 [DEBUG] switch_channel.c:1886
(sofia/external/2010 at 192.168.1.195) Callstate Change DOWN -> RINGING
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:410
(sofia/external/2010 at 192.168.1.195) State ROUTING
2012-03-02 13:04:32.609021 [DEBUG] mod_sofia.c:148
sofia/external/2010 at 192.168.1.195 SOFIA ROUTING
2012-03-02 13:04:32.609021 [DEBUG] switch_ivr_originate.c:66
(sofia/external/2010 at 192.168.1.195) State Change CS_ROUTING ->
CS_CONSUME_MEDIA
2012-03-02 13:04:32.609021 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:410
(sofia/external/2010 at 192.168.1.195) State ROUTING going to sleep
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:362
(sofia/external/2010 at 192.168.1.195) Running State Change CS_CONSUME_MEDIA
2012-03-02 13:04:32.609021 [DEBUG] switch_core_session.c:875 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:429
(sofia/external/2010 at 192.168.1.195) State CONSUME_MEDIA
2012-03-02 13:04:32.609021 [DEBUG] switch_core_state_machine.c:429
(sofia/external/2010 at 192.168.1.195) State CONSUME_MEDIA going to sleep
2012-03-02 13:04:32.609021 [DEBUG] sofia.c:5526 Channel
sofia/external/2010 at 192.168.1.195 entering state [calling][0]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:875 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:875 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:875 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] sofia.c:5526 Channel
sofia/external/2010 at 192.168.1.195 entering state [terminated][603]
2012-03-02 13:04:32.692026 [DEBUG] switch_channel.c:2850
(sofia/external/2010 at 192.168.1.195) Callstate Change RINGING -> HANGUP
2012-03-02 13:04:32.692026 [NOTICE] sofia.c:6293 Hangup
sofia/external/2010 at 192.168.1.195 [CS_CONSUME_MEDIA] [CALL_REJECTED]
2012-03-02 13:04:32.692026 [DEBUG] switch_channel.c:2873 Send signal
sofia/external/2010 at 192.168.1.195 [KILL]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:362
(sofia/external/2010 at 192.168.1.195) Running State Change CS_HANGUP
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:602
(sofia/external/2010 at 192.168.1.195) State HANGUP
2012-03-02 13:04:32.692026 [DEBUG] mod_sofia.c:469 Channel
sofia/external/2010 at 192.168.1.195 hanging up, cause: CALL_REJECTED
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:47
sofia/external/2010 at 192.168.1.195 Standard HANGUP, cause: CALL_REJECTED
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:602
(sofia/external/2010 at 192.168.1.195) State HANGUP going to sleep
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:393
(sofia/external/2010 at 192.168.1.195) State Change CS_HANGUP -> CS_REPORTING
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:362
(sofia/external/2010 at 192.168.1.195) Running State Change CS_REPORTING
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:662
(sofia/external/2010 at 192.168.1.195) State REPORTING
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:79
sofia/external/2010 at 192.168.1.195 Standard REPORTING, cause: CALL_REJECTED
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:662
(sofia/external/2010 at 192.168.1.195) State REPORTING going to sleep
2012-03-02 13:04:32.692026 [DEBUG] switch_core_state_machine.c:387
(sofia/external/2010 at 192.168.1.195) State Change CS_REPORTING -> CS_DESTROY
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:1180 Send signal
sofia/external/2010 at 192.168.1.195 [BREAK]
2012-03-02 13:04:32.692026 [DEBUG] switch_core_session.c:1380 Session 2
(sofia/external/2010 at 192.168.1.195) Locked, Waiting on external entities
2012-03-02 13:04:32.712027 [DEBUG] switch_ivr_originate.c:3365 Originate
Resulted in Error Cause: 21 [CALL_REJECTED]
2012-03-02 13:04:32.712027 [INFO] mod_dptools.c:2922 Originate Failed.
Cause: CALL_REJECTED
2012-03-02 13:04:32.712027 [DEBUG] switch_channel.c:2850
(sofia/internal/CO999x1001.1 at 192.168.57.211) Callstate Change RINGING ->
HANGUP
2012-03-02 13:04:32.712027 [NOTICE] mod_dptools.c:3041 Hangup
sofia/internal/CO999x1001.1 at 192.168.57.211 [CS_EXECUTE] [CALL_REJECTED]
2012-03-02 13:04:32.712027 [DEBUG] switch_channel.c:2873 Send signal
sofia/internal/CO999x1001.1 at 192.168.57.211 [KILL]
2012-03-02 13:04:32.712027 [DEBUG] switch_core_session.c:1180 Send signal
sofia/internal/CO999x1001.1 at 192.168.57.211 [BREAK]
2012-03-02 13:04:32.712027 [DEBUG] switch_core_session.c:2285
sofia/internal/CO999x1001.1 at 192.168.57.211 skip receive message
[APPLICATION_EXEC_COMPLETE] (channel is hungup already)

 

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Avi
Marcus
Sent: Friday, March 02, 2012 8:28 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Hang Up Cause is Blank in Dial Plan

 

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.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 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/c01cb1cc/attachment-0001.html 


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