Just a little feedback for new APS-DIRECT. If I just put this piece of code in early state the players and sound device fails. I am not doing anything fancy here but just closing the sound device and opening it...?and using your code as reference. Any thought???? else if (ci.state==PJSIP_INV_STATE_EARLY){ #define SAMPLES_PER_FRAME 64 #define ON_DURATION 1500 #define OFF_DURATION 2500 pjmedia_port * conf; conf = pjsua_set_no_snd_dev(); pjmedia_snd_setting setting; conf->info.samples_per_frame =SAMPLES_PER_FRAME; conf->info.clock_rate = 8000; conf->info.channel_count = 1; conf->info.bits_per_sample = 16; conf->info.format.u32 = PJMEDIA_FORMAT_L16; pj_bzero(&setting, sizeof(setting)); setting.format.u32 = PJMEDIA_FORMAT_L16; setting.bitrate = 8000; setting.cng = 0; setting.vad = 0; setting.plc = 0; pj_status_t status; status = pjmedia_snd_port_create2(app_pool, PJMEDIA_DIR_CAPTURE_PLAYBACK, 0, 0, 8000, 1, SAMPLES_PER_FRAME, 16, &setting, &g_snd_port); if (status != PJ_SUCCESS) { PJ_LOG(1,(THIS_FILE, "on_stream_created() failed to reopen sound " "device, status=%d", status)); } status = pjmedia_snd_port_connect(g_snd_port, conf); if (status != PJ_SUCCESS) { PJ_LOG(1,(THIS_FILE, "on_stream_created() failed to connect sound " "device to conference, status=%d", status)); } pjmedia_snd_port_destroy(g_snd_port); g_snd_port = NULL; } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090216/5ee33317/attachment-0001.html>