..

G723.1, Invalid parameter when calling imp_StartMedia

..

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 Media Gateways

G723.1, Invalid parameter when calling imp_StartMedia

  • Hi All

    Dialogic HMP 3.0 is running on a windows PC.

    I am going to change from G711 to G723. I have bought and installed license for G723.1.

    When imp_StartMedia is called I get an invalid parameter error. With G711 there is the following setup before the call:

    MediaInfo.MediaData[miCnt].eMediaType = MEDIATYPE_REMOTE_CODER_INFO;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eCoderType = CODER_TYPE_G711ULAW64K;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eFrameSize = (eIPM_CODER_FRAMESIZE) 10;//20;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unFramesPerPkt = 1;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eVadEnable = CODER_VAD_DISABLE;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unCoderPayloadType = 0;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unRedPayloadType = 0;
    miCnt++;

    MediaInfo.MediaData[miCnt].eMediaType = MEDIATYPE_LOCAL_CODER_INFO;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eCoderType = CODER_TYPE_G711ULAW64K;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eFrameSize = (eIPM_CODER_FRAMESIZE) 10;//20;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unFramesPerPkt = 1;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eVadEnable =CODER_VAD_DISABLE;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unCoderPayloadType = 0;
    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unRedPayloadType = 0; 
    miCnt++;


    MediaInfo.unCount = miCnt;

    // Strictly speaking, this ought to be done async, but this simplifies the process
    if (ipm_StartMedia(mediaDevHandle, &MediaInfo, DATA_IP_TDM_BIDIRECTIONAL, EV_SYNC) != 0) {
    pLogger->LogEvent(INFO_ERROR, "ipm_StartMedia() on device %d Failed - %s", mediaDevHandle, ATDV_ERRMSGP(mediaDevHandle));
    return false;
    }
    return true;

     

    I think is is very standard. With G723.1 I have made the following changes:

    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eCoderType = CODER_TYPE_G711ULAW64K;                 changed to CODER_TYPE_G7231_6_3K;

    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.eFrameSize = (eIPM_CODER_FRAMESIZE) 10;//20;         changed to (eIPM_CODER_FRAMESIZE) 30;

    MediaInfo.MediaData[miCnt].mediaInfo.CoderInfo.unCoderPayloadType = 0                                                         changed to 4;//G723

    When changed I get the invalid prameter error.

    Does anybody know why?

    Best Regards

    Kresten

  • This is not the right forum for this question. This forum is about Dialogic Media Gateways, DMG1000/2000, DMG4000.

    Please try there: www.dialogic.com/.../7.aspx