[asterisk-bugs] [Asterisk 0016548]: [patch][regression] cmd Hangup issue

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 6 16:42:27 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16548 
====================================================================== 
Reported By:                hajekd
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16548
Category:                   Core/PBX
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.0.20 
JIRA:                       SWP-642 
Regression:                 Yes 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-05 15:51 CST
Last Modified:              2010-01-06 16:42 CST
====================================================================== 
Summary:                    [patch][regression] cmd Hangup issue
Description: 
Latest version 1.6.0.20 does not correctly hangup calls. We have some
dialplan under extension h which ends with cmd Hangup. Asterisk continue in
dialplan even after calling cmd Hangup. This is not the case with 1.6.0.19
and earlier. This is causing some issues with CDR, etc.

In this example, macro hangupcall is called twice!

- Executing [h at macro-dial:1] Macro("SIP/501-00000003", "hangupcall") in
new stack
    -- Executing [s at macro-hangupcall:1] ResetCDR("SIP/501-00000003", "w")
in new stack
    -- Executing [s at macro-hangupcall:2] NoCDR("SIP/501-00000003", "") in
new stack
    -- Executing [s at macro-hangupcall:3] GotoIf("SIP/501-00000003",
"1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s at macro-hangupcall:6] GotoIf("SIP/501-00000003",
"1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s at macro-hangupcall:9] GotoIf("SIP/501-00000003",
"1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s at macro-hangupcall:11] Hangup("SIP/501-00000003", "") in
new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on
'SIP/501-00000003' in macro 'hangupcall'
  == Spawn extension (macro-dial, h, 1) exited non-zero on
'SIP/501-00000003'
  == Spawn extension (macro-dial, s, 8) exited non-zero on
'SIP/501-00000003' in macro 'dial'
  == Spawn extension (macro-exten-vm, s, 9) exited non-zero on
'SIP/501-00000003' in macro 'exten-vm'
  == Spawn extension (from-internal, 502, 1) exited non-zero on
'SIP/501-00000003'
    -- Executing [h at from-internal:1] Macro("SIP/501-00000003",
"hangupcall") in new stack
    -- Executing [s at macro-hangupcall:1] ResetCDR("SIP/501-00000003", "w")
in new stack
    -- Executing [s at macro-hangupcall:2] NoCDR("SIP/501-00000003", "") in
new stack
    -- Executing [s at macro-hangupcall:3] GotoIf("SIP/501-00000003",
"1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s at macro-hangupcall:6] GotoIf("SIP/501-00000003",
"1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s at macro-hangupcall:9] GotoIf("SIP/501-00000003",
"1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s at macro-hangupcall:11] Hangup("SIP/501-00000003", "") in
new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on
'SIP/501-00000003' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on
'SIP/501-00000003'
====================================================================== 

---------------------------------------------------------------------- 
 (0116173) hajekd (reporter) - 2010-01-06 16:42
 https://issues.asterisk.org/view.php?id=16548#c116173 
---------------------------------------------------------------------- 
Patch does not seem to work. Same behaviour. This is the dialplan:

[macro-dial]
exten => s, something
exten => h, Macro(hangupcall)

[macro-hangupcall]
exten => s, some CDR stuff
exten => s, Hangup

Why the behaviour changed from 1.6.0.20? As I said, 1.6.0.19 and earlier
is fine and works as expected.


SIP/102-00000003 is ringing
    -- Remote UNIX connection
    -- SIP/102-00000003 is ringing
    -- Remote UNIX connection disconnected
    -- SIP/102-00000003 answered SIP/105-00000002
    -- Executing [s at macro-auto-blkvm:1] Set("SIP/102-00000003",
"__MACRO_RESULT=") in new stack
    -- Executing [s at macro-auto-blkvm:2] DBdel("SIP/102-00000003",
"BLKVM/102/SIP/105-00000002") in new stack
    -- DBdel: family=BLKVM, key=102/SIP/105-00000002
    -- Executing [h at macro-dial:1] Macro("SIP/105-00000002", "hangupcall")
in new stack
    -- Executing [s at macro-hangupcall:1] ResetCDR("SIP/105-00000002", "w")
in new stack
    -- Executing [s at macro-hangupcall:2] NoCDR("SIP/105-00000002", "") in
new stack
    -- Executing [s at macro-hangupcall:3] GotoIf("SIP/105-00000002",
"1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s at macro-hangupcall:6] GotoIf("SIP/105-00000002",
"0?skipblkvm") in new stack
    -- Executing [s at macro-hangupcall:7] NoOp("SIP/105-00000002", "Cleaning
Up Block VM Flag: BLKVM/102/SIP/105-00000002") in new stack
    -- Executing [s at macro-hangupcall:8] DBdel("SIP/105-00000002",
"BLKVM/102/SIP/105-00000002") in new stack
    -- DBdel: family=BLKVM, key=102/SIP/105-00000002
    -- DBdel: Error deleting key from database.
    -- Executing [s at macro-hangupcall:9] GotoIf("SIP/105-00000002",
"1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s at macro-hangupcall:11] Hangup("SIP/105-00000002", "") in
new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on
'SIP/105-00000002' in macro 'hangupcall'
  == Spawn extension (macro-dial, h, 1) exited non-zero on
'SIP/105-00000002'
  == Spawn extension (macro-dial, s, 8) exited non-zero on
'SIP/105-00000002' in macro 'dial'
  == Spawn extension (from-internal, 102, 16) exited non-zero on
'SIP/105-00000002'
    -- Executing [h at from-internal:1] Macro("SIP/105-00000002",
"hangupcall") in new stack
    -- Executing [s at macro-hangupcall:1] ResetCDR("SIP/105-00000002", "w")
in new stack
    -- Executing [s at macro-hangupcall:2] NoCDR("SIP/105-00000002", "") in
new stack
    -- Executing [s at macro-hangupcall:3] GotoIf("SIP/105-00000002",
"1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s at macro-hangupcall:6] GotoIf("SIP/105-00000002",
"0?skipblkvm") in new stack
    -- Executing [s at macro-hangupcall:7] NoOp("SIP/105-00000002", "Cleaning
Up Block VM Flag: BLKVM/102/SIP/105-00000002") in new stack
    -- Executing [s at macro-hangupcall:8] DBdel("SIP/105-00000002",
"BLKVM/102/SIP/105-00000002") in new stack
    -- DBdel: family=BLKVM, key=102/SIP/105-00000002
    -- DBdel: Error deleting key from database.
    -- Executing [s at macro-hangupcall:9] GotoIf("SIP/105-00000002",
"1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s at macro-hangupcall:11] Hangup("SIP/105-00000002", "") in
new stack 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-06 16:42 hajekd         Note Added: 0116173                          
======================================================================




More information about the asterisk-bugs mailing list