diff options
author | Richard Mudgett <rmudgett@digium.com> | 2012-10-29 19:31:36 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2012-10-29 19:31:36 +0000 |
commit | 8d65c777c845c4854f9a57cf51d89caf1ad35d2c (patch) | |
tree | 2b130d541ad1e8cbc95099eae5021c71015f0954 /main | |
parent | e2702177a436339b622b430f2c93dde65a68a5a0 (diff) |
Fix the Park 'r' option when a channel parks itself.
When a channel uses the Park appliation to park itself with the 'r'
option, the channel hears music-on-hold instead of the requested ringing.
* Added a missing check for the 'r' option when a channel parks itself.
(closes issue ASTERISK-19382)
Reported by: James Stocks
Patches by: dsessions
Review: https://reviewboard.asterisk.org/r/2148/
........
Merged revisions 375388 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 375389 from http://svn.asterisk.org/svn/asterisk/branches/10
........
Merged revisions 375390 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/features.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/main/features.c b/main/features.c index 42aaa7c5f..e9f84eae1 100644 --- a/main/features.c +++ b/main/features.c @@ -1817,10 +1817,15 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, st } if (peer == chan) { /* pu->notquiteyet = 1 */ /* Wake up parking thread if we're really done */ - pu->hold_method = AST_CONTROL_HOLD; - ast_indicate_data(chan, AST_CONTROL_HOLD, - S_OR(pu->parkinglot->cfg.mohclass, NULL), - !ast_strlen_zero(pu->parkinglot->cfg.mohclass) ? strlen(pu->parkinglot->cfg.mohclass) + 1 : 0); + if (ast_test_flag(args, AST_PARK_OPT_RINGING)) { + pu->hold_method = AST_CONTROL_RINGING; + ast_indicate(chan, AST_CONTROL_RINGING); + } else { + pu->hold_method = AST_CONTROL_HOLD; + ast_indicate_data(chan, AST_CONTROL_HOLD, + S_OR(pu->parkinglot->cfg.mohclass, NULL), + !ast_strlen_zero(pu->parkinglot->cfg.mohclass) ? strlen(pu->parkinglot->cfg.mohclass) + 1 : 0); + } pu->notquiteyet = 0; pthread_kill(parking_thread, SIGURG); } |