Please check the pjsua/pjsua_app.c source file. Before your could use the ringback_start/stop functions you have to create your ringtones. Check the "/* Create ringback tones */" section in the app_init function. 2009/1/6 Gang Liu <gangban.lau at gmail.com>: > pjsua sample program works well for ringback tone as I remember. > > check your soure code. > > On Tue, Jan 6, 2009 at 11:43 AM, nitu dhanurved <nitudhanurved16 at gmail.com> > wrote: >> >> hi, >> i had tried with these fuctions-> >> static void ringback_start(pjsua_call_id call_id); >> static void ring_start(pjsua_call_id call_id); >> static void ring_stop(pjsua_call_id call_id); >> >> but i am not getting any ring, will please tell again what i should do, >> and also i tried with playfile.c, >> i am making a different function as >> static void ring(){ >> status = pj_init(); >> pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0); >> status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt); >> pool = pj_pool_create( &cp.factory, /* pool factory */ >> "wav", /* pool name. */ >> 4000, /* init size */ >> 4000, /* increment size */ >> NULL /* callback on error */ >> ); >> status = pjmedia_wav_player_port_create( pool, /* memory pool >> */ >> playfile, /* file to play */ >> 20, /* ptime. */ >> 0, /* flags */ >> 0, /* default buffer */ >> &file_port/* returned port */ >> ); >> status = pjmedia_snd_port_create_player( >> pool, /* pool */ >> -1, /* use default dev. */ >> file_port->info.clock_rate, /* clock rate. */ >> file_port->info.channel_count, /* # of channels. */ >> file_port->info.samples_per_frame, /* samples per frame. */ >> file_port->info.bits_per_sample, /* bits per sample. */ >> 0, /* options */ >> &snd_port /* returned port */ >> ); >> status = pjmedia_snd_port_connect( snd_port, file_port); >> } >> >> //*after this i am calling a dialog box, there if i'll press ok means stop >> the ring and connect that call like*/ >> >> if(ringbox.DoModal()) >> pjmedia_snd_port_disconnect(snd_port); >> } >> >> this is my complete code and i am calling this function inside the >> static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, >> pjsip_rx_data *rdata){} >> before pjsua_call_answer(call_id,200,NULL,NULL); >> but is giving me break point in mutex-lock, can you tell me where is the >> problem... >> >> >> Regards >> New_bie >> >> >> >> _______________________________________________ >> 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 >> > > > _______________________________________________ > 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 > >