Hi,

I'm got a problem getting remote dtmf tones during MEDIA_REMOTE_DTMF. In my callback function, for event MEDIA_REMOTE_DTMF, and cause MEDIA_CAUSE_DTMF_STOP, I have:

SIPX_MEDIA_INFO* pCallInfo = static_cast<SIPX_MEDIA_INFO*>(pInfo);

    if((pCallInfo->event) == MEDIA_REMOTE_DTMF)
    {
        if((pCallInfo->cause) == MEDIA_CAUSE_DTMF_STOP)
        { 
            fprintf(stderr, "\t hCall=%d \t (char)toneID = %c \t (int)toneID = %d  (parsed)toneId=%c \n"
                , pCallInfo->hCall, (SIPX_TONE_ID)(pCallInfo->toneId)), (SIPX_TONE_ID)(pCallInfo->toneId);


            fprintf(stderr, "\t\t Example ID_TONE_1 == %c \n", ID_DTMF_1);
        }
    }

However, I'm not getting 'valid' toneIDs. For example, I get the following output when I dial 0-1, * and #:

         hCall=1         (char)toneID =          (int)toneID = -32768
         hCall=1         (char)toneID = ☺        (int)toneID = -32767
         hCall=1         (char)toneID = ☻        (int)toneID = -32766
.
.
.
         hCall=1         (char)toneID =          (int)toneID = -32758
         hCall=1         (char)toneID = ♂        (int)toneID = -32757


So as you can see, the toneIds don't come out correctly from SIPX_TONE_ID. On the other hand, the debug logs from the library does seem to indicate that its got the

"MpdPtAvt(0xE12EE0) Stop Rcv Tone key=0 dB=138 TS=0x00007b20+800 last key=0\n"
"MpdPtAvt(0xE12EE0) Stop Rcv Tone key=1 dB=138 TS=0x00009a60+800 last key=1\n"
"MpdPtAvt(0xE12EE0) Stop Rcv Tone key=2 dB=138 TS=0x0000ad20+800 last key=2\n"
.
.
.
.
"MpdPtAvt(0xE12EE0) Stop Rcv Tone key=11 dB=138 TS=0x00015860+800 last key=11\n"


I can't seem to figure out what I'm doing wrong and would appreciate some help =). I'm using today's revision /branches/sipXtapi/.



Thanks,


Paul Tran
VOIP Essential Dev. Solutions
3rd Year Software Engineering Undergraduate
University of Melbourne

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to