comparison mtctest/sig_handler.c @ 39:64b9f0f90726

themwi-test-mtc: handle DTMF from MS
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 03 Sep 2022 14:44:19 -0800
parents e8e82a4bf12b
children 0967f67c6ac3
comparison
equal deleted inserted replaced
38:020ba624bdd8 39:64b9f0f90726
214 print_fields(msg); 214 print_fields(msg);
215 return; 215 return;
216 case MNCC_START_DTMF_IND: 216 case MNCC_START_DTMF_IND:
217 printf("MNCC_START_DTMF_IND: MS sending DTMF start\n"); 217 printf("MNCC_START_DTMF_IND: MS sending DTMF start\n");
218 print_fields(msg); 218 print_fields(msg);
219 msg->msg_type = MNCC_START_DTMF_REJ; 219 if (msg->fields & MNCC_F_KEYPAD &&
220 mncc_set_cause(msg, GSM48_CAUSE_LOC_PRN_S_LU, 220 is_valid_dtmf_digit(msg->keypad)) {
221 GSM48_CC_CAUSE_SERV_OPT_UNIMPL); 221 printf("Responding with ACK\n");
222 msg->msg_type = MNCC_START_DTMF_RSP;
223 } else {
224 printf("Responding with Reject\n");
225 msg->msg_type = MNCC_START_DTMF_REJ;
226 mncc_set_cause(msg, GSM48_CAUSE_LOC_PRN_S_LU,
227 GSM48_CC_CAUSE_INVAL_MAND_INF);
228 }
222 send_mncc_to_gsm(msg, sizeof(struct gsm_mncc)); 229 send_mncc_to_gsm(msg, sizeof(struct gsm_mncc));
223 return; 230 return;
224 case MNCC_STOP_DTMF_IND: 231 case MNCC_STOP_DTMF_IND:
225 printf("MNCC_STOP_DTMF_IND: MS sending DTMF stop\n"); 232 printf("MNCC_STOP_DTMF_IND: MS sending DTMF stop\n");
226 msg->msg_type = MNCC_STOP_DTMF_RSP; 233 msg->msg_type = MNCC_STOP_DTMF_RSP;