aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sig_analog.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/sig_analog.c')
-rw-r--r--channels/sig_analog.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index 29ea11680..aa0d441c9 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -1331,7 +1331,7 @@ int analog_answer(struct analog_pvt *p, struct ast_channel *ast)
static int analog_handles_digit(struct ast_frame *f)
{
- char subclass = toupper(f->subclass);
+ char subclass = toupper(f->subclass.integer);
switch (subclass) {
case '1':
@@ -1363,13 +1363,13 @@ void analog_handle_dtmfup(struct analog_pvt *p, struct ast_channel *ast, enum an
/* Upon receiving a DTMF digit, consider this an answer confirmation instead
of a DTMF digit */
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_ANSWER;
+ p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
*dest = &p->subs[index].f;
/* Reset confirmanswer so DTMF's will behave properly for the duration of the call */
analog_set_confirmanswer(p, 0);
}
if (p->callwaitcas) {
- if ((f->subclass == 'A') || (f->subclass == 'D')) {
+ if ((f->subclass.integer == 'A') || (f->subclass.integer == 'D')) {
ast_log(LOG_ERROR, "Got some DTMF, but it's for the CAS\n");
p->cid.cid_name = p->callwait_name;
p->cid.cid_num = p->callwait_num;
@@ -1378,7 +1378,7 @@ void analog_handle_dtmfup(struct analog_pvt *p, struct ast_channel *ast, enum an
if (analog_handles_digit(f))
p->callwaitcas = 0;
p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
*dest = &p->subs[index].f;
} else {
analog_cb_handle_dtmfup(p, ast, index, dest);
@@ -2117,8 +2117,8 @@ static void *__analog_ss_thread(void *data)
break;
}
if (f->frametype == AST_FRAME_DTMF) {
- dtmfbuf[i++] = f->subclass;
- ast_debug(1, "CID got digit '%c'\n", f->subclass);
+ dtmfbuf[i++] = f->subclass.integer;
+ ast_debug(1, "CID got digit '%c'\n", f->subclass.integer);
res = 2000;
}
ast_frfree(f);
@@ -2354,7 +2354,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
mysig = p->outsigmod;
}
p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
p->subs[index].f.datalen = 0;
p->subs[index].f.samples = 0;
p->subs[index].f.mallocd = 0;
@@ -2380,7 +2380,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
ast_debug(1, "Detected %sdigit '%c'\n", (res & ANALOG_EVENT_PULSEDIGIT) ? "pulse ": "", res & 0xff);
analog_confmute(p, 0);
p->subs[index].f.frametype = AST_FRAME_DTMF_END;
- p->subs[index].f.subclass = res & 0xff;
+ p->subs[index].f.subclass.integer = res & 0xff;
analog_handle_dtmfup(p, ast, index, &f);
return f;
}
@@ -2390,7 +2390,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
/* Mute conference */
analog_confmute(p, 1);
p->subs[index].f.frametype = AST_FRAME_DTMF_BEGIN;
- p->subs[index].f.subclass = res & 0xff;
+ p->subs[index].f.subclass.integer = res & 0xff;
return f;
}
@@ -2438,7 +2438,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
if (ast->_state == AST_STATE_DIALING_OFFHOOK) {
ast_setstate(ast, AST_STATE_UP);
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_ANSWER;
+ p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
break;
} else { /* if to state wait for offhook to dial rest */
/* we now wait for off hook */
@@ -2451,7 +2451,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
} else if (!p->answeronpolarityswitch) {
ast_setstate(ast, AST_STATE_UP);
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_ANSWER;
+ p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
/* If aops=0 and hops=1, this is necessary */
p->polarity = POLARITY_REV;
} else {
@@ -2623,7 +2623,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
analog_set_echocanceller(p, 1);
analog_train_echocanceller(p);
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_ANSWER;
+ p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
/* Make sure it stops ringing */
analog_off_hook(p);
ast_debug(1, "channel %d answered\n", p->channel);
@@ -2633,7 +2633,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
if (analog_check_confirmanswer(p)) {
/* Ignore answer if "confirm answer" is enabled */
p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
} else if (!ast_strlen_zero(p->dop.dialstr)) {
/* nick@dccinc.com 4/3/03 - fxo should be able to do deferred dialing */
res = analog_dial_digits(p, ANALOG_SUB_REAL, &p->dop);
@@ -2644,7 +2644,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
} else {
ast_debug(1, "Sent FXO deferred digit string: %s\n", p->dop.dialstr);
p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
analog_set_dialing(p, 1);
}
p->dop.dialstr[0] = '\0';
@@ -2657,7 +2657,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
ast_setstate(ast, AST_STATE_RING);
ast->rings = 1;
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_OFFHOOK;
+ p->subs[index].f.subclass.integer = AST_CONTROL_OFFHOOK;
ast_debug(1, "channel %d picked up\n", p->channel);
return &p->subs[index].f;
case AST_STATE_UP:
@@ -2709,15 +2709,15 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
if ((ast->_state == AST_STATE_DOWN) || (ast->_state == AST_STATE_RING)) {
ast_debug(1, "Ring detected\n");
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_RING;
+ p->subs[index].f.subclass.integer = AST_CONTROL_RING;
} else if (p->outgoing && ((ast->_state == AST_STATE_RINGING) || (ast->_state == AST_STATE_DIALING))) {
ast_debug(1, "Line answered\n");
if (analog_check_confirmanswer(p)) {
p->subs[index].f.frametype = AST_FRAME_NULL;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
} else {
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_ANSWER;
+ p->subs[index].f.subclass.integer = AST_CONTROL_ANSWER;
ast_setstate(ast, AST_STATE_UP);
}
} else if (ast->_state != AST_STATE_RING) {
@@ -2753,7 +2753,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
p->callwaitcas = 0;
}
p->subs[index].f.frametype = AST_FRAME_CONTROL;
- p->subs[index].f.subclass = AST_CONTROL_RINGING;
+ p->subs[index].f.subclass.integer = AST_CONTROL_RINGING;
break;
case ANALOG_EVENT_RINGERON:
break;
@@ -3160,7 +3160,7 @@ struct ast_frame *analog_exception(struct analog_pvt *p, struct ast_channel *ast
p->subs[index].f.samples = 0;
p->subs[index].f.mallocd = 0;
p->subs[index].f.offset = 0;
- p->subs[index].f.subclass = 0;
+ p->subs[index].f.subclass.integer = 0;
p->subs[index].f.delivery = ast_tv(0,0);
p->subs[index].f.src = "dahdi_exception";
p->subs[index].f.data.ptr = NULL;