I think I am missing pjmedia_port here.? What is the API to check the currently active pjmedia_port ??? The sound port is already active in symbian_ua I suppose. So I need to grab that pjmedia instead of creating new one???????? Rawshan > > > > I am trying to play ringtone to the caller at 180 response. What I > wrote in on_call_state callback is given below. The code just execute fine > but no ringtone in my earpiece. I am now using APS-DIRECT. > > > case PJSIP_INV_STATE_EARLY: > if (g_call_id == > PJSUA_INVALID_ID) > g_call_id = call_id; > if (g_cb.on_call_connected) { > static wchar_t > msg[256]; > > > > > > g_cb.on_call_ringing(msg); > ? > > /*******************Ring Tone Code*********************/ > > > ? > #define SAMPLES_PER_FRAME 64 > #define ON_DURATION 100 > #define OFF_DURATION 100 > ? > pj_pool_t *ring_pool; > pjmedia_port *ring_port; > pj_status_t status; > ? > ring_pool = pjsua_pool_create("krypt_ring", > 4000, 4000); > ? > ? > status = pjmedia_tonegen_create(ring_pool, > 8000, 1, SAMPLES_PER_FRAME, 16, 0, > &ring_port); > if (status != PJ_SUCCESS) > return; > ? > { > pjmedia_tone_desc tones[3]; > ? > tones[0].freq1 = 200; > tones[0].freq2 = 0; > tones[0].on_msec = ON_DURATION; > tones[0].off_msec = OFF_DURATION; > ? > tones[1].freq1 = 400; > tones[1].freq2 = 0; > tones[1].on_msec = ON_DURATION; > tones[1].off_msec = OFF_DURATION; > ? > tones[2].freq1 = 800; > tones[2].freq2 = 0; > tones[2].on_msec = ON_DURATION; > tones[2].off_msec = OFF_DURATION; > ? > status = pjmedia_tonegen_play(ring_port, 3, > tones, 0); > > > > > > > > > > > > > > > > > > > > > > > > > } > ? > pjmedia_port_destroy(ring_port); > > pj_pool_release( ring_pool ); > > ? > > > /*****************************end > ringtone*****************************/ > } > ? > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090215/c1e4bf75/attachment.html>