Review Board 1.7.16

Fix directed group pickup feature code *8 with pickupsounds enabled , deadlock and segfault, affects 1.8.0 and trunk

Review Request #1185 - Created April 17, 2011 and submitted

Alec Davis
Since 1.8, the new pickupsound and pickupfailsound in features.conf cause many issues.

1). chan_sip:handle_request_invite() shouldn't be playing out the fail/success audio, as it has 'netlock' locked.
2). dialplan applications for directed_pickups shouldn't beep.
3). feature code for directed pickup should beep on success/failure if configured.

Moved app_directed:pickup_do() to features:ast_do_pickup().

Functions below, all now use the new ast_do_pickup()

Created a sip_pickup() thread to handle the pickup and playout the audio, spawned from handle_request_invite.
pickup using *8 feature code, with pickup sounds enabled/disabled

exten => 71,1,Pickup()           ; any ringing extension in same pickupgroup 
exten => 72,1,Pickup(85@phones)  ; dahdi extension
exten => 73,1,Pickup(823@phones) ; sip extension
Review request changed
Updated (May 13, 2011, 1:09 p.m.)
Posted (May 13, 2011, 1:10 p.m.)


trunk/main/features.c (Diff revision 16)
the locks around this stream_and_wait need to go. They stopped the choppy audio, which happens with DAHDI and SIP, seems as though it's an unrelated issue, induced by Pickup.

Using tt_monkeys to exagerate to problem, no other channels are able to dial out.
  1. The locks are needed because we are injecting the pickupsound outside the thread running the bridge.  Without the locks on my setup, the calls got disconnected because chan_dahdi complained about incompatible audio frames.  We need to get the bridge to inject the pickupsound for us somehow.
    A follow-up patch is needed.
  2. This review needs to be closed.  It has been submitted.  Another issue needs to be created for the held lock problem identified above. runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to