[Home]

Summary:ASTERISK-15017: [patch] Hangup extension executed twice in 1.6.2 RC2
Reporter:agjohnson (agjohnson)Labels:
Date Opened:2009-10-20 16:09:29Date Closed:2011-05-09 14:09:17
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 16106_v1.diff
( 1) bug16106.patch
Description:When a user hangs up a call, in certain circumstances, the hangup extension can end up being executed twice.

If I comment out this section of my dialplan, the hangup extension is only executed once:

exten => _X.,n,Goto(s-${DIALSTATUS})

exten => s-CONGESTION,1,Congestion(5)
exten => s-BUSY,1,Busy(5)
exten => s-.,1,Congestion(5)

Otherwise, the hangup extension is executed twice.  The odd thing is that the console output does not display that the code above is being executed.

****** ADDITIONAL INFORMATION ******

[outbound-intelesight]
exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
exten => _X.,n,Goto(s-${DIALSTATUS})

exten => s-CONGESTION,1,Congestion(5)
exten => s-BUSY,1,Busy(5)
exten => s-.,1,Congestion(5)

exten => _s-.,2,Hangup()

exten => h,1,Set(uid=${CDR(uniqueid)})
exten => h,n,Set(src=${CDR(src)})
exten => h,n,Set(dst=${CDR(dst)})
exten => h,n,Set(userfield=${CDR(userfield)})
exten => h,n,Set(duration=${MATH(${EPOCH}-${start},int)})
exten => h,n,Set(user=${DB_USER_FROM_EXTEN(${CDR(src)})})
exten => h,n,Set(DB_SET(${uid})=uid,${uid})
exten => h,n,Set(DB_SET(${uid})=OrganizationName,${QUOTE(${OrganizationName})})
exten => h,n,Set(DB_SET(${uid})=CampaignName,${QUOTE(${CampaignName})})
exten => h,n,Set(DB_SET(${uid})=src,${QUOTE(${src})})
exten => h,n,Set(DB_SET(${uid})=dst,${QUOTE(${dst})})
exten => h,n,Set(DB_SET(${uid})=userfield,${QUOTE(${userfield})})
exten => h,n,Set(DB_SET(${uid})=duration,${QUOTE(${duration})})
exten => h,n,Set(DB_SET(${uid})=user,${QUOTE(${user})})
exten => h,n,Set(DB_SET(${uid})=PersonName,${QUOTE(${PersonName})})
exten => h,n,Set(DB_ITSENTRY(${uid})=${userfield})




   -- SIP/sbc-09632dc8 answered SIP/jnewman-09629870
   -- Executing [h@outbound-intelesight:1] Set("SIP/jnewman-09629870", "uid=pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:2] Set("SIP/jnewman-09629870", "src=8604") in new stack
   -- Executing [h@outbound-intelesight:3] Set("SIP/jnewman-09629870", "dst=18456278468") in new stack
   -- Executing [h@outbound-intelesight:4] Set("SIP/jnewman-09629870", "userfield=CALL-20091020-133651-pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:5] Set("SIP/jnewman-09629870", "duration=34") in new stack
   -- Executing [h@outbound-intelesight:6] Set("SIP/jnewman-09629870", "user=jnewman") in new stack
   -- Executing [h@outbound-intelesight:7] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=uid,pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:8] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=OrganizationName,"Blue Hill Data Services"") in new stack
   -- Executing [h@outbound-intelesight:9] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=CampaignName,"Arrow NTAP TAP Siwel"") in new stack
   -- Executing [h@outbound-intelesight:10] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=src,"8604"") in new stack
   -- Executing [h@outbound-intelesight:11] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=dst,"18456278468"") in new stack
   -- Executing [h@outbound-intelesight:12] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=userfield,"CALL-20091020-133651-pbx2-1256071010.836"") in new stack
   -- Executing [h@outbound-intelesight:13] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=duration,"34"") in new stack
   -- Executing [h@outbound-intelesight:14] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=user,"jnewman"") in new stack
   -- Executing [h@outbound-intelesight:15] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=PersonName,"TOM LAUDATI<span class='campaignPersonTitle'> - CTO </span>"") in new stack
   -- Executing [h@outbound-intelesight:16] Set("SIP/jnewman-09629870", "DB_ITSENTRY(pbx2-1256071010.836)=CALL-20091020-133651-pbx2-1256071010.836") in new stack
 == Spawn extension (outbound-intelesight, 18456278468, 1) exited non-zero on 'SIP/jnewman-09629870'
   -- Executing [h@outbound-intelesight:1] Set("SIP/jnewman-09629870", "uid=pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:2] Set("SIP/jnewman-09629870", "src=8604") in new stack
   -- Executing [h@outbound-intelesight:3] Set("SIP/jnewman-09629870", "dst=18456278468") in new stack
   -- Executing [h@outbound-intelesight:4] Set("SIP/jnewman-09629870", "userfield=CALL-20091020-133651-pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:5] Set("SIP/jnewman-09629870", "duration=34") in new stack
   -- Executing [h@outbound-intelesight:6] Set("SIP/jnewman-09629870", "user=jnewman") in new stack
   -- Executing [h@outbound-intelesight:7] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=uid,pbx2-1256071010.836") in new stack
   -- Executing [h@outbound-intelesight:8] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=OrganizationName,"Blue Hill Data Services"") in new stack
   -- Executing [h@outbound-intelesight:9] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=CampaignName,"Arrow NTAP TAP Siwel"") in new stack
   -- Executing [h@outbound-intelesight:10] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=src,"8604"") in new stack
   -- Executing [h@outbound-intelesight:11] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=dst,"18456278468"") in new stack
   -- Executing [h@outbound-intelesight:12] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=userfield,"CALL-20091020-133651-pbx2-1256071010.836"") in new stack
   -- Executing [h@outbound-intelesight:13] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=duration,"34"") in new stack
   -- Executing [h@outbound-intelesight:14] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=user,"jnewman"") in new stack
   -- Executing [h@outbound-intelesight:15] Set("SIP/jnewman-09629870", "DB_SET(pbx2-1256071010.836)=PersonName,"TOM LAUDATI<span class='campaignPersonTitle'> - CTO </span>"") in new stack
   -- Executing [h@outbound-intelesight:16] Set("SIP/jnewman-09629870", "DB_ITSENTRY(pbx2-1256071010.836)=CALL-20091020-133651-pbx2-1256071010.836") in new stack
 == MixMonitor close filestream
 == End MixMonitor Recording SIP/jnewman-09629870
Comments:By: Elazar Broad (ebroad) 2009-10-20 16:14:17

That's because Congestion(5) will Hangup() after 5 seconds, so you don't need the additional Hangup().

By: agjohnson (agjohnson) 2009-10-20 16:30:58

I corrected several dialplan errors.  The new dialplan looks like this:

exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
exten => _X.,n,Goto(s-${DIALSTATUS},1)

exten => s-CONGESTION,1,Congestion(5)
exten => s-BUSY,1,Busy(5)
exten => _s-.,1,Congestion(5)

exten => _s-.,2,Hangup()


The hangup extension is still being called twice.

By: Elazar Broad (ebroad) 2009-10-20 16:54:09

What happens if you take out:
exten => _s-.,1,Congestion(5)

By: agjohnson (agjohnson) 2009-10-20 18:09:46

Example 1:
[general]
static=yes
writeprotect=no
;autofallthrough=no
;extenpatternmatchnew=no
clearglobalvars=no
;priorityjumping=yes
;userscontext=default
;#include "filename.conf"

[default]

[from-test]
exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
exten => _X.,n,Goto(s-${DIALSTATUS})

exten => s-CONGESTION,1,Congestion(5)
exten => s-BUSY,1,Busy(5)
exten => s-.,1,Congestion(5)

exten => _s-.,2,Hangup()

exten => h,1,NoOp(Hangup!)

 == Using SIP RTP CoS mark 5
   -- Executing [6026251615@from-test:1] Dial("SIP/ajohnson-b79aab20", "SIP/sbc/6026251615)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called sbc/6026251615)
   -- SIP/sbc-b77033e0 answered SIP/cbates-0933c748
   -- SIP/sbc-094ee6a0 is ringing
   -- SIP/sbc-094ee6a0 is making progress passing it to SIP/ajohnson-b79aab20
   -- SIP/sbc-094ee6a0 answered SIP/ajohnson-b79aab20
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b79aab20", "Hangup!") in new stack
 == Spawn extension (from-test, 6026251615, 1) exited non-zero on 'SIP/ajohnson-b79aab20'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b79aab20", "Hangup!") in new stack

===========================================================================================
Example 2:

[from-test]
exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
;exten => _X.,n,Goto(s-${DIALSTATUS})

exten => s-CONGESTION,1,Congestion(5)
exten => s-BUSY,1,Busy(5)
exten => s-.,1,Congestion(5)

exten => _s-.,2,Hangup()

exten => h,1,NoOp(Hangup!)


 == Using SIP RTP CoS mark 5
   -- Executing [6026251615@from-test:1] Dial("SIP/ajohnson-09524620", "SIP/sbc/6026251615)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called sbc/6026251615)
   -- SIP/sbc-0951c250 is ringing
   -- SIP/sbc-0951c250 is making progress passing it to SIP/ajohnson-09524620
   -- SIP/sbc-0951c250 answered SIP/ajohnson-09524620
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-09524620", "Hangup!") in new stack
 == Spawn extension (from-test, 6026251615, 1) exited non-zero on 'SIP/ajohnson-09524620'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-09524620", "Hangup!") in new stack

===========================================================================================
Example 3:

[from-test]
exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
;exten => _X.,n,Goto(s-${DIALSTATUS})

;exten => s-CONGESTION,1,Congestion(5)
;exten => s-BUSY,1,Busy(5)
;exten => s-.,1,Congestion(5)

;exten => _s-.,2,Hangup()

exten => h,1,NoOp(Hangup!)

 == Using SIP RTP CoS mark 5
   -- Executing [6026251615@from-test:1] Dial("SIP/ajohnson-b7b77808", "SIP/sbc/6026251615)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called sbc/6026251615)
   -- SIP/sbc-0933b460 is ringing
   -- SIP/sbc-0933b460 is making progress passing it to SIP/ajohnson-b7b77808
   -- SIP/sbc-0933b460 answered SIP/ajohnson-b7b77808
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b7b77808", "Hangup!") in new stack
 == Spawn extension (from-test, 6026251615, 1) exited non-zero on 'SIP/ajohnson-b7b77808'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b7b77808", "Hangup!") in new stack


===========================================================================================
[from-test]
exten => _X.,1,Dial(SIP/sbc/${EXTEN}))
;exten => _X.,n,Goto(s-${DIALSTATUS})

;exten => s-CONGESTION,1,Congestion(5)
;exten => s-BUSY,1,Busy(5)
;exten => s-.,1,Congestion(5)

;exten => _s-.,2,Hangup()

exten => h,1,NoOp(Hangup!)
exten => h,n,Hangup()

 == Using SIP RTP CoS mark 5
   -- Executing [6026251615@from-test:1] Dial("SIP/ajohnson-b7b777b8", "SIP/sbc/6026251615)") in new stack
 == Using SIP RTP CoS mark 5
   -- Called sbc/6026251615)
   -- SIP/sbc-09339250 is ringing
   -- SIP/sbc-09339250 is making progress passing it to SIP/ajohnson-b7b777b8
   -- SIP/sbc-09339250 answered SIP/ajohnson-b7b777b8
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b7b777b8", "Hangup!") in new stack
   -- Executing [h@from-test:2] Hangup("SIP/ajohnson-b7b777b8", "") in new stack
 == Spawn extension (from-test, h, 2) exited non-zero on 'SIP/ajohnson-b7b777b8'
 == Spawn extension (from-test, 6026251615, 1) exited non-zero on 'SIP/ajohnson-b7b777b8'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b7b777b8", "Hangup!") in new stack
   -- Executing [h@from-test:2] Hangup("SIP/ajohnson-b7b777b8", "") in new stack
 == Spawn extension (from-test, h, 2) exited non-zero on 'SIP/ajohnson-b7b777b8'

By: agjohnson (agjohnson) 2009-10-20 18:22:05

I can't post the entire debug because it is too large, so here is the section from the hangup:

[Oct 20 16:00:17] DEBUG[32335]: manager.c:1636 action_waitevent: Starting waiting for an event!
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:3041 sip_alreadygone: Setting SIP_ALREADYGONE on dialog 1891CD4E316346B49CA163F9AE348E500x0ad214c0
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:21947 stop_session_timer: Session timer stopped: -1 - 1891CD4E316346B49CA163F9AE348E500x0ad214c0
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:20607 handle_request_bye: Received bye, issuing owner hangup
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:3316 __sip_xmit: Trying to put 'SIP/2.0 200' onto UDP socket destined for 10.210.20.192:5060
[Oct 20 16:00:19] DEBUG[32335]: manager.c:1660 action_waitevent: Finished waiting for an event!
[Oct 20 16:00:19] DEBUG[32333]: manager.c:1660 action_waitevent: Finished waiting for an event!
[Oct 20 16:00:19] DEBUG[32334]: manager.c:1660 action_waitevent: Finished waiting for an event!
[Oct 20 16:00:19] DEBUG[32286]: channel.c:4822 ast_generic_bridge: Didn't get a frame from channel: SIP/ajohnson-b79aaaf8
[Oct 20 16:00:19] DEBUG[32286]: channel.c:5246 ast_channel_bridge: Bridge stops bridging channels SIP/ajohnson-b79aaaf8 and SIP/sbc-09339250
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:3671 pbx_extension_helper: Launching 'NoOp'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b79aaaf8", "Hangup!") in new stack
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:3671 pbx_extension_helper: Launching 'Hangup'
   -- Executing [h@from-test:2] Hangup("SIP/ajohnson-b79aaaf8", "") in new stack
[Oct 20 16:00:19] DEBUG[32286]: features.c:2803 ast_bridge_call: Spawn extension (from-test,h,2) exited non-zero on 'SIP/ajohnson-b79aaaf8'
 == Spawn extension (from-test, h, 2) exited non-zero on 'SIP/ajohnson-b79aaaf8'
[Oct 20 16:00:19] DEBUG[32286]: cdr.c:1257 ast_cdr_detach: CDR detaching from this thread
[Oct 20 16:00:19] DEBUG[32286]: channel.c:1738 ast_hangup: Hanging up channel 'SIP/sbc-09339250'
[Oct 20 16:00:19] DEBUG[32286]: chan_sip.c:5765 sip_hangup: Hangup call SIP/sbc-09339250, SIP callid 36bbf2625ee78fe1435dd25f6ba473c2@10.210.10.79
[Oct 20 16:00:19] DEBUG[32286]: chan_sip.c:3316 __sip_xmit: Trying to put 'BYE sip:602' onto UDP socket destined for 10.230.10.90:5060
[Oct 20 16:00:19] DEBUG[32286]: rtp.c:2110 ast_rtp_early_bridge: Channel '<unspecified>' has no RTP, not doing anything
[Oct 20 16:00:19] DEBUG[32286]: app_dial.c:2230 dial_exec_full: Exiting with DIALSTATUS=ANSWER.
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:4280 __ast_pbx_run: Spawn extension (from-test,6026251615,1) exited non-zero on 'SIP/ajohnson-b79aaaf8'
 == Spawn extension (from-test, 6026251615, 1) exited non-zero on 'SIP/ajohnson-b79aaaf8'
[Oct 20 16:00:19] DEBUG[32286]: channel.c:1633 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/ajohnson-b79aaaf8'
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:3671 pbx_extension_helper: Launching 'NoOp'
   -- Executing [h@from-test:1] NoOp("SIP/ajohnson-b79aaaf8", "Hangup!") in new stack
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:3671 pbx_extension_helper: Launching 'Hangup'
   -- Executing [h@from-test:2] Hangup("SIP/ajohnson-b79aaaf8", "") in new stack
[Oct 20 16:00:19] DEBUG[32286]: pbx.c:4423 __ast_pbx_run: Spawn extension (from-test,h,2) exited non-zero on 'SIP/ajohnson-b79aaaf8'
 == Spawn extension (from-test, h, 2) exited non-zero on 'SIP/ajohnson-b79aaaf8'
[Oct 20 16:00:19] DEBUG[32286]: channel.c:1738 ast_hangup: Hanging up channel 'SIP/ajohnson-b79aaaf8'
[Oct 20 16:00:19] DEBUG[32286]: chan_sip.c:5765 sip_hangup: Hangup call SIP/ajohnson-b79aaaf8, SIP callid 1891CD4E316346B49CA163F9AE348E500x0ad214c0
[Oct 20 16:00:19] DEBUG[30892]: chan_sip.c:22394 sip_devicestate: Checking device state for peer sbc
[Oct 20 16:00:19] DEBUG[30892]: devicestate.c:460 do_state_change: Changing state for SIP/sbc - state 1 (Not in use)
[Oct 20 16:00:19] DEBUG[30892]: devicestate.c:440 devstate_event: device 'SIP/sbc' state '1'
[Oct 20 16:00:19] DEBUG[30892]: chan_sip.c:22394 sip_devicestate: Checking device state for peer ajohnson
[Oct 20 16:00:19] DEBUG[30900]: app_queue.c:1060 handle_statechange: Device 'SIP/sbc' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Oct 20 16:00:19] DEBUG[30892]: res_config_odbc.c:73 custom_prepare: Skip: 0; SQL: SELECT * FROM sip_peers WHERE name = ? AND host = ?
[Oct 20 16:00:19] DEBUG[30892]: res_config_odbc.c:88 custom_prepare: Parameter 1 ('name') = 'ajohnson'
[Oct 20 16:00:19] DEBUG[30892]: res_config_odbc.c:88 custom_prepare: Parameter 2 ('host') = 'dynamic'
[Oct 20 16:00:19] DEBUG[30892]: res_odbc.c:984 odbc_release_obj2: odbc_release_obj2(0x92849d8) called (obj->txf = (nil))
[Oct 20 16:00:19] DEBUG[30892]: chan_sip.c:23105 build_peer: -REALTIME- peer built. Name: ajohnson. Peer objects: 15
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:3863 __sip_ack: Stopping retransmission on '36bbf2625ee78fe1435dd25f6ba473c2@10.210.10.79' of Request 103: Match Found
[Oct 20 16:00:19] DEBUG[30892]: chan_sip.c:11674 reg_source_db: SIP Seeding peer from astdb: 'ajohnson' at ajohnson@10.210.20.192:5060 for 120
[Oct 20 16:00:19] DEBUG[30892]: chan_sip.c:4666 realtime_peer: -REALTIME- loading peer from database to memory. Name: ajohnson. Peer objects: 15
[Oct 20 16:00:19] DEBUG[30892]: devicestate.c:460 do_state_change: Changing state for SIP/ajohnson - state 1 (Not in use)
[Oct 20 16:00:19] DEBUG[30892]: devicestate.c:440 devstate_event: device 'SIP/ajohnson' state '1'
[Oct 20 16:00:19] DEBUG[30900]: app_queue.c:1060 handle_statechange: Device 'SIP/ajohnson' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:5548 sip_destroy: Destroying SIP dialog 36bbf2625ee78fe1435dd25f6ba473c2@10.210.10.79
[Oct 20 16:00:19] DEBUG[30977]: chan_sip.c:5548 sip_destroy: Destroying SIP dialog 1891CD4E316346B49CA163F9AE348E500x0ad214c0

By: agjohnson (agjohnson) 2009-10-20 18:22:29

I am using SIP realtime.

By: Elazar Broad (ebroad) 2009-10-20 18:44:27

Please attach your debug/trace as file, its a little confusing inline. I am going to acknowledge this as the output from example 3 doesn't look right.

By: Elazar Broad (ebroad) 2009-10-22 13:44:05

I can confirm this on SVN trunk as well. The interesting thing is, if I comment out the following while loop in pbx.c(line 4777 or so):

while ((res = ast_spawn_extension(c, c->context, c->exten, c->priority, c->cid.cid_num, &found, 1)) == 0) {
c->priority++;
}

the h extension works as expected. A cursory look at the code looks like the h extension would never get executed if that code is missing...

By: Elazar Broad (ebroad) 2009-10-22 15:48:48

I'm not sure if the attached patch goes about it correctly, but its worth a try...

By: agjohnson (agjohnson) 2009-10-23 12:45:11

The patch has correct the double hangup issue on our server.

By: Jeff Peeler (jpeeler) 2009-11-11 18:28:26.000-0600

ajohnson: is the issue fixed if you just delete the if around the "ast_set_flag(chan, AST_FLAG_BRIDGE_HANGUP_RUN)"? The if was put there to solve the exact opposite problem, so we have to be careful.

By: Jeff Peeler (jpeeler) 2009-11-12 16:04:07.000-0600

Can you please test bug16106.patch that I uploaded? The current chan priority check shouldn't have been added in the first place.

By: agjohnson (agjohnson) 2009-11-13 15:00:04.000-0600

I won't be able to test this until Monday.

By: agjohnson (agjohnson) 2009-11-19 14:15:42.000-0600

I might be able to test this today

By: Michael Cramer (micc) 2009-11-19 18:23:16.000-0600

I believe this might be related to my crash in issue 0016085. Is that possible?

By: Jeff Peeler (jpeeler) 2009-11-23 13:01:44.000-0600

ajohnson: were you able to test this patch yet?
Micc: doubtful

By: agjohnson (agjohnson) 2009-11-23 17:28:34.000-0600

The patch is in place, but I will have to wait for activity in order to know if it fixes the problem.

By: agjohnson (agjohnson) 2009-11-24 07:53:16.000-0600

The patch fixed the issue for me.

By: Digium Subversion (svnbot) 2009-11-24 12:57:36.000-0600

Repository: asterisk
Revision: 231095

U   trunk/main/features.c

------------------------------------------------------------------------
r231095 | jpeeler | 2009-11-24 12:57:35 -0600 (Tue, 24 Nov 2009) | 11 lines

Fix erroneous hangup extension execution

ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
that do not exist do not return an error, whereas in 1.6 it does. This is now
taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
properly.

(closes issue ASTERISK-15017)
Reported by: ajohnson
Tested by: ajohnson

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=231095

By: Digium Subversion (svnbot) 2009-11-24 13:00:43.000-0600

Repository: asterisk
Revision: 231096

_U  branches/1.6.0/
U   branches/1.6.0/main/features.c

------------------------------------------------------------------------
r231096 | jpeeler | 2009-11-24 13:00:43 -0600 (Tue, 24 Nov 2009) | 18 lines

Merged revisions 231095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r231095 | jpeeler | 2009-11-24 12:50:36 -0600 (Tue, 24 Nov 2009) | 11 lines
 
 Fix erroneous hangup extension execution
 
 ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
 that do not exist do not return an error, whereas in 1.6 it does. This is now
 taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
 properly.
 
 (closes issue ASTERISK-15017)
 Reported by: ajohnson
 Tested by: ajohnson
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=231096

By: Digium Subversion (svnbot) 2009-11-24 13:01:00.000-0600

Repository: asterisk
Revision: 231097

_U  branches/1.6.1/
U   branches/1.6.1/main/features.c

------------------------------------------------------------------------
r231097 | jpeeler | 2009-11-24 13:01:00 -0600 (Tue, 24 Nov 2009) | 18 lines

Merged revisions 231095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r231095 | jpeeler | 2009-11-24 12:50:36 -0600 (Tue, 24 Nov 2009) | 11 lines
 
 Fix erroneous hangup extension execution
 
 ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
 that do not exist do not return an error, whereas in 1.6 it does. This is now
 taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
 properly.
 
 (closes issue ASTERISK-15017)
 Reported by: ajohnson
 Tested by: ajohnson
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=231097

By: Digium Subversion (svnbot) 2009-11-24 13:01:25.000-0600

Repository: asterisk
Revision: 231098

_U  branches/1.6.2/
U   branches/1.6.2/main/features.c

------------------------------------------------------------------------
r231098 | jpeeler | 2009-11-24 13:01:25 -0600 (Tue, 24 Nov 2009) | 18 lines

Merged revisions 231095 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r231095 | jpeeler | 2009-11-24 12:50:36 -0600 (Tue, 24 Nov 2009) | 11 lines
 
 Fix erroneous hangup extension execution
 
 ast_spawn_extension behaves differently from 1.4 in that hangups and extensions
 that do not exist do not return an error, whereas in 1.6 it does. This is now
 taken into account so that the AST_FLAG_BRIDGE_HANGUP_RUN flag gets set
 properly.
 
 (closes issue ASTERISK-15017)
 Reported by: ajohnson
 Tested by: ajohnson
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=231098

By: Digium Subversion (svnbot) 2011-05-09 14:07:02

Repository: asterisk
Revision: 318282

U   branches/1.8/main/features.c

------------------------------------------------------------------------
r318282 | rmudgett | 2011-05-09 14:07:02 -0500 (Mon, 09 May 2011) | 24 lines

Hangup extension executed twice.

When a user hangs up a call, in certain circumstances, the hangup
extension can end up being executed twice:

1) If a call is bridged and the 'h' extension executes the Hangup
application, then the 'h' extension will be executed twice.

2) If a call is bridged within a macro (Dial or Queue), it has its own 'h'
extension, the main context also has an 'h' extension, and the macro 'h'
extension executes the Hangup application, then both 'h' extensions will
be executed.

* Revert originally commited fix for ASTERISK-15017 and just set
AST_FLAG_BRIDGE_HANGUP_RUN unconditionally in ast_bridge_call().  The
bridge code just executed an 'h' extension so the main PBX loop does not
need to execute one as well.

(issue ASTERISK-15017)
Reported by: ajohnson

(issue ASTERISK-15399)
Reported by: hajekd

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=318282

By: Digium Subversion (svnbot) 2011-05-09 14:09:17

Repository: asterisk
Revision: 318283

_U  trunk/
U   trunk/main/features.c

------------------------------------------------------------------------
r318283 | rmudgett | 2011-05-09 14:09:17 -0500 (Mon, 09 May 2011) | 31 lines

Merged revisions 318282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r318282 | rmudgett | 2011-05-09 14:07:01 -0500 (Mon, 09 May 2011) | 24 lines
 
 Hangup extension executed twice.
 
 When a user hangs up a call, in certain circumstances, the hangup
 extension can end up being executed twice:
 
 1) If a call is bridged and the 'h' extension executes the Hangup
 application, then the 'h' extension will be executed twice.
 
 2) If a call is bridged within a macro (Dial or Queue), it has its own 'h'
 extension, the main context also has an 'h' extension, and the macro 'h'
 extension executes the Hangup application, then both 'h' extensions will
 be executed.
 
 * Revert originally commited fix for ASTERISK-15017 and just set
 AST_FLAG_BRIDGE_HANGUP_RUN unconditionally in ast_bridge_call().  The
 bridge code just executed an 'h' extension so the main PBX loop does not
 need to execute one as well.
 
 (issue ASTERISK-15017)
 Reported by: ajohnson
 
 (issue ASTERISK-15399)
 Reported by: hajekd
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=318283