Improve voice boundary detection

Decode Alerting and Progress messages and if the in-band information
flag is set start decoding the voice
This commit is contained in:
Vasil Velichkov 2018-05-15 21:36:14 +03:00 committed by Piotr Krysik
parent 2479152d5c
commit 4d300e9c61
1 changed files with 22 additions and 1 deletions

View File

@ -293,8 +293,29 @@ namespace gr {
// check if this is a call control message
if ((frameBuffer[3] & 0x0f) == 0x03)
{
// Alerting
if ((frameBuffer[4] & 0x3f) == 0x01)
{
if ((frameBuffer[5] == 0x1e) && //element id
(frameBuffer[6] == 2) && //length
((frameBuffer[8] & 0x7f) == 0x08))
{
//.000 1000 = Progress description: In-band information or appropriate pattern now available (8)
d_boundary_decode = true;
}
}
// Progress
else if ((frameBuffer[4] & 0x3f) == 0x03)
{
if ((frameBuffer[5] == 2) && //length
(frameBuffer[7] & 0x7f) == 0x08)
{
//.000 1000 = Progress description: In-band information or appropriate pattern now available (8)
d_boundary_decode = true;
}
}
// Connect specified in GSM 04.08, 9.3.5
if ((frameBuffer[4] & 0x3f) == 0x07)
else if ((frameBuffer[4] & 0x3f) == 0x07)
{
d_boundary_decode = true;
}