Fix DTMF detection from called end
Now DTMF detection called end. Imagine Paypal calls you and asks you to enter digits. The routing script can then enable dtmf detection on the called end (after answer) and forward digits via telephone events.
This commit is contained in:
parent
5b96cf935b
commit
4cf88b8ce8
|
@ -73,7 +73,11 @@
|
|||
* | |buffer |<-clock
|
||||
* | +-------+
|
||||
* | /|\
|
||||
* | |
|
||||
* | | +------+
|
||||
* | | \| |
|
||||
* | |---| DTMF |
|
||||
* | | /| |
|
||||
* | | +------+
|
||||
* \|/ |
|
||||
* +-------+ +-------+
|
||||
* |samples| |int to |
|
||||
|
@ -203,6 +207,10 @@ void receive_terminator(struct osmo_cc_session_codec *codec, uint8_t __attribute
|
|||
/* convert int16 to samples */
|
||||
int16_to_samples_speech(samples, (int16_t *)data, len);
|
||||
|
||||
/* dtmf decoding */
|
||||
if (relation->dtmf_dec_enable)
|
||||
dtmf_decode(&relation->dtmf_dec, samples, len);
|
||||
|
||||
/* store to terminator jitter buffer */
|
||||
jitter_save(&call->term_dejitter, samples, len, 1, sequence, timestamp, ssrc);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue