Hi Jun, You just need to check if there's any other media flow in the bridge. As the doc says, the sound device will only be closed if there is no media flow at all currently running, and this means there must be no connection between any ports in the bridge (so not only to/from the sound device). You can verify this by calling pjmedia_conf_get_connect_count(). Best regards, ?Benny On Tue, Aug 24, 2010 at 8:52 PM, Jun Cui <Jun.Cui at optimobile.se> wrote: > Hi Benny, > > Thanks for your reply. I have checked our code and find snd_auto_close_time > was set to 0. However, when call was hold the sound device does not close. > Could you please have a look of our code? Did we do something wrong set the > values or hold the call? > > Code below show how did we set the snd_auto_close_time to 0, > > ? ? ? ?pjsua_media_config med_cfg; > ? ? ? ?pjsua_media_config_default(&med_cfg); > ? ? ? ?med_cfg.snd_auto_close_time = 0; > ? ? ? ?.... > ? ? ?.... > ? ? ? ?// Init PJSUA > ? ? ? ?status = pjsua_init(&cfg, &log_cfg, &med_cfg); > > > The code below show how did we hold the call > ? ? ? ?pjsua_call_info ci; > ? ? ? ?// Get call id > ? ? ? ?status = pjsua_call_get_info(m_pjsua_call_id, &ci); > ? ? ? ?if (status != PJ_SUCCESS) > ? ? ? ?{ > ? ? ? ? ? ? ? ?LOG(TR_ERROR, TEXT("Failed to get call info (err %d)"), > status); > ? ? ? ?} > > ? ? ? ?// Disconnect media flow OUT > ? ? ? ?status = pjsua_conf_disconnect(0, ci.conf_slot); > > ? ? ? ?// Disconnect media flow IN > ? ? ? ?status = pjsua_conf_disconnect(ci.conf_slot, 0); > > > Best regards, > > Jun Cui > > > > > > -----Original Message----- > From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org] > On Behalf Of Benny Prijono > Sent: 20 August 2010 14:05 > To: pjsip list > Subject: Re: How to release sound device on symbian platform. > > On Fri, Aug 20, 2010 at 4:51 PM, Jun Cui <Jun.Cui at optimobile.se> wrote: >> Hi guys, >> >> >> >> Does anyone know how to release sound device on symbian platform, I use > VAS. >> >> >> >> Here is the scenario: >> >> >> >> I have implemented a sip application using pjsip. When I have one VoIP > call >> on hold and then a normal GSM call is incoming, I want device to play the >> profile?s ring tone. I find if I can release sound device, the phone will >> play the ring tone correctly. I try to use pjsua_set_null_snd_dev to > release >> the sound device, but get error message >> >> >> >> pjsua_media.c? Unable to create null sound device: Unknown pjlib error > 70012 >> [status=70012]. >> >> >> >> Error 70012 means PJ_ENOTSUP--The specified option is not supported. >> >> >> >> Dose anyone know how to use pjsua_set_null_snd_dev API. Should I call some >> other function before call it? >> > > The null sound device needs thread, which is not implemented on Symbian. > > The sound device should be closed automatically if nothing is using > it. See pjsua_media_config.snd_auto_close_time for more info. > > ?-benny > > _______________________________________________ > 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 >