AMPS: Add DTX support
When DTX is enabled (-S dtx=2 or 3), a missing SAT tone causes the receiver to mute audio and insert a low level of comfort noise. Also the missing SAT tone will not cause the connection to be terminated.
This commit is contained in:
@@ -680,7 +680,10 @@ void amps_rx_sat(amps_t *amps, int tone, double quality)
|
||||
if (tone) {
|
||||
timer_stop(&trans->timer);
|
||||
} else {
|
||||
timer_start(&trans->timer, SAT_TO2);
|
||||
if (!trans->dtx)
|
||||
timer_start(&trans->timer, SAT_TO2);
|
||||
else
|
||||
timer_stop(&trans->timer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,6 +772,14 @@ reject:
|
||||
trans_new_state(trans, TRANS_CALL_MT_ASSIGN);
|
||||
trans->chan = vc->sender.kanal;
|
||||
}
|
||||
/* if we support DTX and also the phone does, we set DTX state of transaction */
|
||||
if (amps->si.word2.dtx) {
|
||||
if ((scm & 4)) {
|
||||
PDEBUG(DAMPS, DEBUG_INFO, " -> Use DTX for this call\n");
|
||||
trans->dtx = 1;
|
||||
} else
|
||||
PDEBUG(DAMPS, DEBUG_INFO, " -> Requested DTX, but not supported by phone\n");
|
||||
}
|
||||
} else
|
||||
PDEBUG_CHAN(DAMPS, DEBUG_NOTICE, "Unsupported RECC messages: ORDER: %d ORDQ: %d MSG TYPE: %d (See Table 4 of specs.)\n", order, ordq, msg_type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user