[asterisk-commits] branch russell/hold_handling r37730 -
/team/russell/hold_handling/res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jul 16 09:05:16 MST 2006
Author: russell
Date: Sun Jul 16 11:05:16 2006
New Revision: 37730
URL: http://svn.digium.com/view/asterisk?rev=37730&view=rev
Log:
indicate to a channel that they are bein put on hold when they are parked
instead of explicitly turning on MOH on the channel
Modified:
team/russell/hold_handling/res/res_features.c
Modified: team/russell/hold_handling/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/res/res_features.c?rev=37730&r1=37729&r2=37730&view=diff
==============================================================================
--- team/russell/hold_handling/res/res_features.c (original)
+++ team/russell/hold_handling/res/res_features.c Sun Jul 16 11:05:16 2006
@@ -359,9 +359,11 @@
pu->chan = chan;
- /* Start music on hold if we have two different channels */
- if (chan != peer)
- ast_moh_start(pu->chan, parkmohclass, NULL);
+ /* Put the parked channel on hold if we have two different channels */
+ if (chan != peer) {
+ ast_indicate_data(pu->chan, AST_CONTROL_HOLD,
+ !ast_strlen_zero(parkmohclass) ? parkmohclass : NULL, strlen(parkmohclass));
+ }
pu->start = ast_tvnow();
pu->parkingnum = x;
@@ -423,7 +425,8 @@
ast_say_digits(peer, pu->parkingnum, "", peer->language);
if (pu->notquiteyet) {
/* Wake up parking thread if we're really done */
- ast_moh_start(pu->chan, parkmohclass, NULL);
+ ast_indicate_data(pu->chan, AST_CONTROL_HOLD,
+ !ast_strlen_zero(parkmohclass) ? parkmohclass : NULL, strlen(parkmohclass));
pu->notquiteyet = 0;
pthread_kill(parking_thread, SIGURG);
}
@@ -1613,7 +1616,9 @@
if (pu->moh_trys < 3 && !chan->generatordata) {
if (option_debug)
ast_log(LOG_DEBUG, "MOH on parked call stopped by outside source. Restarting.\n");
- ast_moh_start(chan, parkmohclass, NULL);
+ ast_indicate_data(pu->chan, AST_CONTROL_HOLD,
+ !ast_strlen_zero(parkmohclass) ? parkmohclass : NULL,
+ strlen(parkmohclass));
pu->moh_trys++;
}
goto std; /*! \todo XXX Ick: jumping into an else statement??? XXX */
More information about the asterisk-commits
mailing list