[asterisk-commits] branch russell/hold_handling r37834 - in
/team/russell/hold_handling: channel...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jul 17 16:47:31 MST 2006
Author: russell
Date: Mon Jul 17 18:47:30 2006
New Revision: 37834
URL: http://svn.digium.com/view/asterisk?rev=37834&view=rev
Log:
implement mohinterpret=passthrough for chan_zap
Modified:
team/russell/hold_handling/channels/chan_zap.c
team/russell/hold_handling/configs/zapata.conf.sample
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=37834&r1=37833&r2=37834&view=diff
==============================================================================
--- team/russell/hold_handling/channels/chan_zap.c (original)
+++ team/russell/hold_handling/channels/chan_zap.c Mon Jul 17 18:47:30 2006
@@ -206,7 +206,7 @@
static char defaultozz[64] = "";
static char language[MAX_LANGUAGE] = "";
-static char mohinterpret[MAX_MUSICCLASS] = "";
+static char mohinterpret[MAX_MUSICCLASS] = "default";
static char mohsuggest[MAX_MUSICCLASS] = "";
static char progzone[10] = "";
@@ -5021,27 +5021,30 @@
#endif
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_CONGESTION);
break;
+ case AST_CONTROL_HOLD:
#ifdef HAVE_PRI
- /* XXX MOHTODO implement "passthrough" option for mohinterpret */
- case AST_CONTROL_HOLD:
- if (p->pri) {
+ if (p->pri && !strcasecmp(p->mohinterpret, "passthrough")) {
if (!pri_grab(p, p->pri)) {
res = pri_notify(p->pri->pri, p->call, p->prioffset, PRI_NOTIFY_REMOTE_HOLD);
pri_rel(p->pri);
} else
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
- }
+ } else
+#endif
+ ast_moh_start(chan, data, p->mohinterpret);
break;
case AST_CONTROL_UNHOLD:
- if (p->pri) {
+#ifdef HAVE_PRI
+ if (p->pri && !strcasemp(p->mohinterpret, "passthrough")) {
if (!pri_grab(p, p->pri)) {
res = pri_notify(p->pri->pri, p->call, p->prioffset, PRI_NOTIFY_REMOTE_RETRIEVAL);
pri_rel(p->pri);
} else
ast_log(LOG_WARNING, "Unable to grab PRI on span %d\n", p->span);
- }
+ } else
+#endif
+ ast_moh_stop(chan);
break;
-#endif
case AST_CONTROL_RADIO_KEY:
if (p->radio)
res = zt_set_hook(p->subs[index].zfd, ZT_OFFHOOK);
Modified: team/russell/hold_handling/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/russell/hold_handling/configs/zapata.conf.sample?rev=37834&r1=37833&r2=37834&view=diff
==============================================================================
--- team/russell/hold_handling/configs/zapata.conf.sample (original)
+++ team/russell/hold_handling/configs/zapata.conf.sample Mon Jul 17 18:47:30 2006
@@ -486,6 +486,10 @@
; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
; channel putting this one on hold did not suggest a music class.
;
+; If this option is set to "passthrough", then the hold message will always be
+; passed through as signalling instead of generating hold music locally. This
+; setting is only valid when used on a channel that uses digital signalling.
+;
; This option may be specified globally, or on a per-user or per-peer basis.
;
;mohinterpret=default
More information about the asterisk-commits
mailing list