[asterisk-commits] branch russell/hold_handling r37729 -
/team/russell/hold_handling/channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jul 16 08:58:19 MST 2006
Author: russell
Date: Sun Jul 16 10:58:19 2006
New Revision: 37729
URL: http://svn.digium.com/view/asterisk?rev=37729&view=rev
Log:
add some more HOLD/UNHOLD handling ... a few minor tweaks, and a comment to
remind me to implement something later
Modified:
team/russell/hold_handling/channels/chan_h323.c
team/russell/hold_handling/channels/chan_jingle.c
team/russell/hold_handling/channels/chan_phone.c
team/russell/hold_handling/channels/chan_skinny.c
team/russell/hold_handling/channels/chan_vpb.cc
team/russell/hold_handling/channels/chan_zap.c
Modified: team/russell/hold_handling/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_h323.c?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_h323.c (original)
+++ team/russell/hold_handling/channels/chan_h323.c Sun Jul 16 10:58:19 2006
@@ -702,6 +702,16 @@
if (token)
free(token);
return -1;
+ case AST_CONTROL_HOLD:
+ ast_moh_start(c, data, NULL);
+ if (token)
+ free(token);
+ return 0;
+ case AST_CONTROL_UNHOLD:
+ ast_moh_stop(c);
+ if (token)
+ free(token);
+ return 0;
case AST_CONTROL_PROCEEDING:
case -1:
if (token)
Modified: team/russell/hold_handling/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_jingle.c?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_jingle.c (original)
+++ team/russell/hold_handling/channels/chan_jingle.c Sun Jul 16 10:58:19 2006
@@ -1116,9 +1116,21 @@
static int jingle_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
{
- ast_log(LOG_NOTICE, "XXX Implement jingle indicate XXX\n");
-
- return -1;
+ int res = 0;
+
+ switch (condition) {
+ case AST_CONTROL_HOLD:
+ ast_moh_start(ast, data, NULL);
+ break;
+ case AST_CONTROL_UNHOLD:
+ ast_moh_stop(ast);
+ break;
+ default:
+ ast_log(LOG_NOTICE, "Don't know how to indicate condition '%d'\n", condition);
+ res = -1;
+ }
+
+ return res;
}
static int jingle_digit(struct ast_channel *ast, char digit)
Modified: team/russell/hold_handling/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_phone.c?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_phone.c (original)
+++ team/russell/hold_handling/channels/chan_phone.c Sun Jul 16 10:58:19 2006
@@ -218,6 +218,12 @@
ioctl(p->fd, IXJCTL_PSTN_SET_STATE, PSTN_OFF_HOOK);
p->lastformat = -1;
res = 0;
+ break;
+ case AST_CONTROL_HOLD:
+ ast_moh_start(chan, data, NULL);
+ break;
+ case AST_CONTROL_UNHOLD:
+ ast_moh_stop(chan);
break;
default:
ast_log(LOG_WARNING, "Condition %d is not supported on channel %s\n", condition, chan->name);
Modified: team/russell/hold_handling/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_skinny.c?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_skinny.c (original)
+++ team/russell/hold_handling/channels/chan_skinny.c Sun Jul 16 10:58:19 2006
@@ -2503,7 +2503,7 @@
transmit_tone(s, SKINNY_SILENCE);
break;
case AST_CONTROL_HOLD:
- ast_moh_start(ast, NULL, NULL);
+ ast_moh_start(ast, data, NULL);
break;
case AST_CONTROL_UNHOLD:
ast_moh_stop(ast);
Modified: team/russell/hold_handling/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_vpb.cc?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_vpb.cc (original)
+++ team/russell/hold_handling/channels/chan_vpb.cc Sun Jul 16 10:58:19 2006
@@ -1779,7 +1779,7 @@
}
break;
case AST_CONTROL_HOLD:
- ast_moh_start(ast, NULL, NULL);
+ ast_moh_start(ast, data, NULL);
break;
case AST_CONTROL_UNHOLD:
ast_moh_stop(ast);
Modified: team/russell/hold_handling/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/channels/chan_zap.c?rev=37729&r1=37728&r2=37729&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_zap.c (original)
+++ team/russell/hold_handling/channels/chan_zap.c Sun Jul 16 10:58:19 2006
@@ -5017,6 +5017,7 @@
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
break;
#ifdef HAVE_PRI
+ /* XXX MOHTODO implement "passthrough" option for mohinterpret */
case AST_CONTROL_HOLD:
if (p->pri) {
if (!pri_grab(p, p->pri)) {
More information about the asterisk-commits
mailing list