TF_SETINIT initial silence detection not working


Developer Group

Developer Group
Connect with thousands of other developers to brainstorm ideas, share best practices and tips - or just chat about the latest emerging technologies making noise in the field. And of course, get the most up-to-date service and support news from Dialogic.
Dialogic PowerMedia HMP GlobalCall and R4 API

TF_SETINIT initial silence detection not working

  • Thank you so much in advance if you can lend a hand on this. Should be simple, but...

    Centos, HMP V4. Code in C  All code in this app runs great async mode - just not this piece.

    The DX_MAXSIL takes effect and kills the record when it hits the parm even if it's less than the value of tp_data and the tp_flags are or'd with TF_SETINIT.

    Code Snippet:

    (this is the only tpt set in this case. I'm not allowing any digits. I just want to give the caller up to 4 seconds to start recording and then stop their recording if I see 2 seconds of silence after they speak.

    int idx=0;  // So here sometimes this codes adds other tpt conditions, but not in this case so the index = 0 and the IO_EOT is set on index 0 also.

    tpt[ch][idx].tp_termno = DX_MAXSIL;
    tpt[ch][idx].tp_length = 20;  // so this should be 2 seconds of silence after speech - I always get a MAXSIL in 2 seconds.
    tpt[ch][idx].tp_data = 40; // this so allow up to 4 seconds of silence before speech or I assume get a MAXSIL event.
    tpt[ch][idx++].tp_flags = TF_CLRBEG | TF_MAXSIL | TF_SETINIT;

    tpt[ch][--idx].tp_type = IO_EOT;

  • Switched over to ec_stream code.. Everything worked the first time.